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_frame_from_recordbatch() {
let record_batches: Vec<RecordBatch> = create_record_batches();
let df = DataFrame::try_from(record_batches).expect("frame can be initialized");
assert_eq!(
Vec::from(df.column("bar").unwrap().i64().unwrap()),
&[Some(1)... | rust_cleaned_test_functions.jsonl/18788 | {
"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,
8929,
5673,
14192,
14049,
368,
341,
286,
1077,
3255,
57755,
25,
11312,
27,
6471,
21074,
29,
284,
1855,
14192,
57755,
1428,
286,
1077,
6764,
284,
45786,
486,
1539,
5673,
23794,
57755,
568,
17119,
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_hyperbolic_identites() {
for &c in all_consts.iter() {
assert!(close(c.tanh(), c.sinh() / c.cosh()));
assert!(close(c.cosh() * c.cosh() - c.sinh() * c.sinh(), _1_0i));
assert!(close(c.... | rust_cleaned_test_functions.jsonl/105706 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 682
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
93416,
65,
7762,
38399,
3611,
368,
341,
310,
369,
609,
66,
304,
678,
48530,
19471,
368,
341,
6360,
394,
2060,
10297,
5552,
1337,
734,
27924,
1507,
272,
16318,
71,
368,
608,
272,
520,
9267,
7392,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_signature_rsa_primitive_verification() {
test::run(
test_file!("rsa_primitive_verify_tests.txt"),
|section, test_case| {
assert_eq!(section, "");
let n = test_case.consume_bytes("n");
let e = test_case.consume_bytes("e");
let ms... | rust_cleaned_test_functions.jsonl/17915 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 372
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39859,
82522,
84087,
84245,
368,
341,
262,
1273,
486,
6108,
1006,
286,
1273,
2458,
17223,
60869,
84087,
35638,
32509,
3909,
4461,
286,
760,
2809,
11,
1273,
19096,
91,
341,
310,
2060,
10714,
10297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_aes128_ctr() {
let pt = "6BC1BEE22E409F96E93D7E117393172AAE2D8A571E03AC9C9EB76FAC45AF8E5130C81C46A35CE411\
E5FBC1191A0A52EFF69F2445DF4F9B17AD2B417BE66C3710";
let ct = "874D6191B620E3261BEF6864990DB6CE9806F66B7970FDFF8617187BB9FFFDFF5AE4DF3EDBD5D35E\
... | rust_cleaned_test_functions.jsonl/110535 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 353
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
90958,
16,
17,
23,
69096,
368,
341,
286,
1077,
10817,
284,
330,
21,
4897,
16,
33,
7099,
17,
17,
36,
19,
15,
24,
37,
24,
21,
36,
24,
18,
35,
22,
36,
16,
16,
22,
18,
24,
18,
16,
22,
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_rpc_client() {
let rt = tokio::runtime::Builder::new_current_thread()
.build()
.unwrap();
let transport = MockTransport::new();
let builder = session::Builder::default();
let client = RpcClient::new(Box::new(transport.clone()), builder);
... | rust_cleaned_test_functions.jsonl/86351 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 505
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60799,
8179,
368,
341,
286,
1077,
16677,
284,
9628,
815,
486,
22255,
486,
3297,
486,
931,
11080,
10814,
741,
310,
659,
5834,
741,
310,
659,
15454,
543,
286,
1077,
7557,
284,
14563,
27560,
486,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_table_reordering() {
let toml = r#"
[[bin]] # bin 1
[a.b.c.e]
[a]
[other.table]
[[bin]] # bin 2
[a.b.c.d]
[a.b.c]
[[bin]] # bin 3
"#;
let expected = r#"
[[bin]] # bin 1
[[bin]] # bin 2
[[bin]] # bin 3
[a]
[a.b.c]
[a.b.c.e]
[a.b.c.d]
[other.table]
"#;
let doc = toml.parse::<Document>(... | rust_cleaned_test_functions.jsonl/60155 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 251
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5237,
1288,
51869,
368,
341,
262,
1077,
311,
1014,
284,
435,
2,
698,
15505,
6863,
5053,
671,
9544,
220,
16,
198,
15481,
948,
520,
1734,
921,
15481,
921,
58,
1575,
10336,
921,
15505,
6863,
5053,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_make_target_no_valid_record() {
let nodename = DomainBuilder::from_str("foo._fuchsia._udp.local").unwrap();
let record = RecordBuilder::new(
nodename,
Type::Ptr,
Class::Any,
true,
4500,
&[0x03, 'f' as u8, 'o'... | rust_cleaned_test_functions.jsonl/15632 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 412
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28230,
11123,
6536,
8337,
14192,
368,
341,
286,
1077,
16004,
1840,
284,
21070,
3297,
486,
1499,
2895,
445,
7975,
1436,
69,
73391,
1436,
31101,
11033,
1827,
15454,
543,
286,
1077,
3255,
284,
13583,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_archiver_startup_ledger_hang() {
solana_logger::setup();
info!("starting archiver test");
let mut validator_config = ValidatorConfig::default();
validator_config.storage_slots_per_turn = SLOTS_PER_TURN_TEST;
let cluster = LocalCluster::new_with_equal_stakes(2, 10_000, 100);
... | rust_cleaned_test_functions.jsonl/57915 | {
"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,
34330,
1524,
80858,
38367,
1389,
1523,
524,
368,
341,
262,
2048,
3362,
27413,
486,
15188,
543,
262,
3546,
17223,
39289,
5325,
1524,
1273,
797,
262,
1077,
5206,
22935,
5332,
284,
32566,
2648,
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_vcx_schema_get_state() {
let _setup = SetupMocks::init();
let did = settings::get_config_value(settings::CONFIG_INSTITUTION_DID).unwrap();
let (handle, _) = schema::prepare_schema_for_endorser("testid", did, "name".to_string(), "1.0".to_string(), "[\"name\":\"male\"]".to... | rust_cleaned_test_functions.jsonl/118210 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 598
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
25844,
25371,
3062,
4387,
368,
341,
286,
1077,
716,
15188,
284,
18626,
72577,
486,
2327,
1428,
286,
1077,
1521,
284,
5003,
486,
455,
5332,
3142,
23369,
486,
24652,
2158,
25765,
28617,
1557,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_empty_line() {
assert_eq!(parse_empty_line("\n").unwrap(), ("", Value::Ignore));
assert_eq!(parse_empty_line(" \n").unwrap(), ("", Value::Ignore));
} | rust_cleaned_test_functions.jsonl/49943 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 92
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
15124,
6528,
368,
341,
286,
2060,
10714,
10297,
6400,
15124,
6528,
4921,
77,
1827,
15454,
1507,
3489,
497,
5162,
486,
12497,
1106,
286,
2060,
10714,
10297,
6400,
15124,
6528,
445,
256,
1124,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_neuron_split_fails() {
let from = *TEST_NEURON_1_OWNER_PRINCIPAL;
// Compute the subaccount to which the transfer would have been made
let nonce = 1234u64;
let block_height = 543212234;
let dissolve_delay_seconds = MIN_DISSOLVE_DELAY_FOR_VOTE_ELIGIBILITY_SECONDS;
let neu... | rust_cleaned_test_functions.jsonl/1159 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1682
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13925,
36090,
17052,
761,
6209,
368,
341,
262,
1077,
504,
284,
353,
10033,
14039,
1511,
711,
62,
16,
74323,
10571,
38439,
3298,
969,
280,
262,
442,
22603,
279,
1186,
4608,
311,
892,
279,
8317,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_sub() {
let mat = ArcArray::linspace(0., 15., 16).reshape((2, 4, 2));
let s1 = mat.index_axis(Axis(0), 0);
let s2 = mat.index_axis(Axis(0), 1);
assert_eq!(s1.shape(), &[4, 2]);
assert_eq!(s2.shape(), &[4, 2]);
let n = ArcArray::linspace(8., 15., 8).reshape((4, 2));
as... | rust_cleaned_test_functions.jsonl/92616 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 224
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
368,
341,
262,
1077,
5517,
284,
19689,
1857,
486,
75,
30313,
7,
15,
2572,
220,
16,
20,
2572,
220,
16,
21,
568,
16137,
1188,
17,
11,
220,
19,
11,
220,
17,
1106,
262,
1077,
274,
16,
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_mempool_notify_committed_txns() {
// Create runtime for the mempool notifier and listener
let runtime = Builder::new_multi_thread().enable_all().build().unwrap();
let _enter = runtime.enter();
let (mempool_notifier, mempool_listener) =
mempool_notifications::new_mem... | rust_cleaned_test_functions.jsonl/5689 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 643
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
3262,
1749,
36654,
2965,
5483,
17805,
4412,
368,
341,
262,
442,
4230,
15592,
369,
279,
1833,
10285,
73169,
323,
11446,
198,
262,
1077,
15592,
284,
20626,
486,
931,
25133,
10814,
1005,
12552,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_calculate_storage_count_and_alive_bytes_2_accounts() {
let accounts = AccountsDb::new_single_for_tests();
let keys = [
solana_sdk::pubkey::Pubkey::new(&[0; 32]),
solana_sdk::pubkey::Pubkey::new(&[255; 32]),
];
// make sure accounts are in 2... | rust_cleaned_test_functions.jsonl/7054 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 859
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24005,
11207,
23310,
3180,
8378,
58850,
12524,
62,
17,
55665,
368,
341,
286,
1077,
9618,
284,
40655,
7994,
486,
931,
19487,
5478,
32509,
543,
286,
1077,
6894,
284,
2278,
310,
2048,
3362,
61783,
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... | 2 |
#[test]
fn test_emit_jcc_non_zero() {
let mut buf = MacroAssembler::new();
let lbl = buf.create_label();
emit_jcc(&mut buf, CondCode::NonZero, lbl);
emit_nop(&mut buf);
buf.bind_label(lbl);
assert_eq!(vec![0x0f, 0x85, 1, 0, 0, 0, 0x90], buf.data());
} | rust_cleaned_test_functions.jsonl/85426 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 166
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
69082,
5374,
638,
21637,
19359,
368,
341,
286,
1077,
5206,
6607,
284,
53317,
77858,
486,
931,
543,
286,
1077,
16421,
284,
6607,
2520,
6106,
543,
286,
16691,
5374,
638,
2099,
6984,
6607,
11,
44826,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_output_format_from_matches() {
let app = App::new("test").arg(
Arg::with_name("output_format")
.long("output")
.value_name("FORMAT")
.global(true)
.takes_value(true)
.possible_values(&["json", "js... | rust_cleaned_test_functions.jsonl/94256 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 797
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7645,
8955,
5673,
38344,
368,
341,
286,
1077,
906,
284,
1845,
486,
931,
445,
1944,
1827,
858,
1006,
310,
7638,
486,
4197,
1269,
445,
3006,
8955,
1138,
394,
659,
4825,
445,
3006,
1138,
394,
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_simplify_composed_and() {
let expr = binary_expr(
binary_expr(col("c2").gt(lit(5)), Operator::And, col("c1").lt(lit(6))),
Operator::And,
col("c2").gt(lit(5)),
);
let expected =
binary_expr(col("c2").gt(lit(5)), Oper... | rust_cleaned_test_functions.jsonl/77795 | {
"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,
643,
70206,
2965,
3865,
8378,
368,
341,
1789,
286,
1077,
15169,
284,
7868,
21915,
1006,
310,
7868,
21915,
19611,
445,
66,
17,
1827,
5178,
2333,
275,
7,
20,
5731,
28498,
486,
3036,
11,
1375,
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_try_from_alogithm_id() {
assert_eq!(
RsaSignatureScheme::try_from(TPM2_ALG_RSASSA).unwrap(),
RsaSignatureScheme::RsaSsa
);
assert_eq!(
RsaSignatureScheme::try_from(TPM2_ALG_RSAPSS).unwrap(),
RsaSignatureScheme::RsaPss
... | rust_cleaned_test_functions.jsonl/41506 | {
"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,
53283,
5673,
8418,
538,
410,
76,
842,
368,
341,
286,
2060,
10714,
33673,
310,
431,
9081,
25088,
28906,
486,
1539,
5673,
4140,
8795,
17,
8912,
38,
59138,
4939,
32,
568,
15454,
3148,
310,
431,
908... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_thread_signal_swap() {
let mut mask = SigSet::empty();
mask.add(SIGUSR1);
mask.thread_block().unwrap();
assert!(SigSet::thread_get_mask().unwrap().contains(SIGUSR1));
let mut mask2 = SigSet::empty();
mask2.add(SIGUSR2);
let oldmask = mas... | rust_cleaned_test_functions.jsonl/8930 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 267
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10814,
21137,
40991,
368,
341,
286,
1077,
5206,
6911,
284,
41560,
1649,
486,
3194,
543,
286,
6911,
1364,
52516,
49558,
16,
317,
286,
6911,
45210,
7113,
1005,
15454,
1428,
286,
2060,
10297,
47246,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_timestamp_diff_add_assign() {
let mut tmsp_diff_a = TimestampDiff::from_millis(2000);
let tmsp_diff_b = TimestampDiff::from_millis(1000);
let tmsp_diff_old = tmsp_diff_a;
tmsp_diff_a += tmsp_diff_b;
assert_eq!(tmsp_diff_a.as_millis(), tmsp_diff_old.as_millis() + tmsp_diff_b.... | rust_cleaned_test_functions.jsonl/32117 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 166
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23073,
15850,
2891,
20688,
368,
341,
262,
1077,
5206,
259,
92545,
15850,
4306,
284,
32758,
21751,
486,
1499,
717,
56212,
7,
17,
15,
15,
15,
317,
262,
1077,
259,
92545,
15850,
880,
284,
32758,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_push_number() {
let mut script = Script::new(32);
script.i8(8);
script.i16(16);
script.i32(32);
script.i64(64);
let mut exector = Exector::new();
exector.exec(&script, &TestEnv {}).unwrap();
assert_eq!(exector.len(), 4);
let d1: i64 = exector.top(1).try_into()... | rust_cleaned_test_functions.jsonl/78509 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 285
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14218,
5500,
368,
341,
262,
1077,
5206,
5316,
284,
13710,
486,
931,
7,
18,
17,
317,
262,
5316,
8607,
23,
7,
23,
317,
262,
5316,
8607,
16,
21,
7,
16,
21,
317,
262,
5316,
8607,
18,
17,
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_connection_close() {
let conn = Connection::open_in_memory().unwrap();
conn.prepare_cached("SELECT * FROM sqlite_master;")
.unwrap();
conn.close().expect("connection not closed");
} | rust_cleaned_test_functions.jsonl/54426 | {
"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,
15866,
12704,
368,
341,
286,
1077,
4534,
284,
11032,
486,
2508,
1243,
19195,
1005,
15454,
543,
286,
4534,
21934,
64369,
445,
4858,
353,
4295,
22003,
24582,
91812,
310,
659,
15454,
1428,
286,
4534,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_normal_distribution() {
let mut dataset = Dataset::from_f64_vec(generate_normal_dataset(150.0, 1.2, 100));
evaluate_sketch(dataset);
dataset = Dataset::from_f64_vec(generate_normal_dataset(-30.0, 4.4, 100));
evaluate_sketch(dataset);
} | rust_cleaned_test_functions.jsonl/7528 | {
"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,
13973,
41465,
368,
341,
286,
1077,
5206,
10337,
284,
39183,
486,
1499,
761,
21,
19,
13251,
3268,
13220,
13973,
18999,
7,
16,
20,
15,
13,
15,
11,
220,
16,
13,
17,
11,
220,
16,
15,
15,
1106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_delete_record() {
init!("false");
let xtype = CStringUtils::string_to_cstring("record_type".to_string());
let id = CStringUtils::string_to_cstring("123".to_string());
let value = CStringUtils::string_to_cstring("Record Value".to_string());
let tags = CStri... | rust_cleaned_test_functions.jsonl/37984 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1201
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11353,
14192,
368,
341,
286,
2930,
17223,
3849,
797,
286,
1077,
60614,
284,
356,
34780,
486,
917,
2346,
666,
917,
445,
8548,
1819,
3263,
983,
3904,
1423,
286,
1077,
877,
284,
356,
34780,
486,
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_chain_insert() {
let base_rope: Rope = vec![0, 1, 2, 3].into();
let mut delta_builder = DeltaBuilder::new(base_rope.len());
delta_builder.replace(1..1, Into::<Rope>::into(vec![5]).into_node());
let insertion1 = delta_builder.build();
let mid_rope = base_ro... | rust_cleaned_test_functions.jsonl/10027 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 588
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30583,
17678,
368,
341,
286,
1077,
2331,
26608,
375,
25,
97896,
284,
7486,
20703,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
936,
18122,
543,
286,
1077,
5206,
9477,
28532,
284,
24957,
3297,
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_nearest_neighbor() {
let linestring_geojson = r#"{
"type": "FeatureCollection",
"name": "FunctionalClassRoads",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:EPSG::26915" } },
"features": [
{ "type": "Feature", "properties": { "STREETALL": "280TH ST W", "ALT_NAM1": "HIGHW... | rust_cleaned_test_functions.jsonl/2873 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1164
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13925,
15432,
71888,
368,
341,
262,
1077,
9805,
65040,
60308,
2236,
284,
435,
55543,
515,
44470,
788,
330,
13859,
6482,
756,
31486,
788,
330,
71271,
1957,
56959,
82,
756,
1,
5082,
82,
788,
314,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_duration() {
assert_eq!(
duration("1 year"),
Ok((
"",
crate::time::Duration {
years: Some(1),
..Default::default()
}
))
... | rust_cleaned_test_functions.jsonl/71131 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 5740
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25454,
368,
341,
310,
2060,
10714,
33673,
394,
8090,
445,
16,
1042,
4461,
394,
7622,
94702,
503,
8324,
503,
17717,
486,
1678,
486,
12945,
341,
664,
1635,
25,
4329,
7,
16,
1326,
664,
5241,
3675,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_third_date() {
let start_date = dt(1959, 7, 19, 0, 0, 0);
assert_eq!(gigasecond::after(start_date), dt(1991, 3, 27, 1, 46, 40));
} | rust_cleaned_test_functions.jsonl/111677 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 80
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79519,
4164,
368,
341,
262,
1077,
1191,
4164,
284,
7594,
7,
16,
24,
20,
24,
11,
220,
22,
11,
220,
16,
24,
11,
220,
15,
11,
220,
15,
11,
220,
15,
626,
262,
2060,
10714,
10297,
70,
343,
51... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_balance_via_meta() {
let _pool = ConstPool::new();
let text = r#"
/// signers: 0x1
script {
use 0x1::Dfinance;
use 0x1::Coins::ETH;
fun register_coins(standard_account: &signer) {
Dfinance::register_coin<ETH>(standard_account, b"eth", 18);
}
}
/// signers: 0... | rust_cleaned_test_functions.jsonl/43939 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 463
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
29396,
80710,
13381,
368,
341,
262,
1077,
716,
10285,
284,
24522,
10551,
486,
931,
543,
262,
1077,
1467,
284,
435,
2,
698,
2575,
1841,
388,
25,
220,
15,
87,
16,
198,
2282,
341,
262,
990,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_keep_selected_index() {
let mut res = StatusTree::default();
res.update(&string_vec_to_status(&["a", "b"])).unwrap();
res.selection = Some(1);
res.update(&string_vec_to_status(&["d", "c", "a"])).unwrap();
assert_eq!(res.selection, Some(1));
} | rust_cleaned_test_functions.jsonl/34455 | {
"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,
50293,
23755,
3560,
368,
341,
286,
1077,
5206,
592,
284,
8104,
6533,
486,
2258,
543,
286,
592,
5317,
2099,
917,
13251,
2346,
4773,
2099,
1183,
64,
497,
330,
65,
1341,
4579,
15454,
543,
286,
592,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_declaration6() {
use ast::Expression::AlignOf;
use ast::StorageClassSpecifier::Typedef;
use ast::TypeSpecifier::{Double, Long};
use parser::declaration;
assert_eq!(
declaration(
r"typedef struct {
long long __max_align_ll __attribute__((__al... | rust_cleaned_test_functions.jsonl/107568 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3009
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77926,
21,
368,
341,
262,
990,
11763,
486,
9595,
486,
10069,
2124,
280,
262,
990,
11763,
486,
5793,
1957,
87297,
486,
12834,
4219,
280,
262,
990,
11763,
486,
929,
87297,
22964,
7378,
11,
5724,
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_get_ruby_stack_trace_2_5_0() {
let current_thread_addr = 0x55dd8c3b7758;
let stack_trace = ruby_version::ruby_2_5_0::get_stack_trace::<CoreDump>(
current_thread_addr,
0,
None,
&coredump_2_5_0(),
0,
)
.unw... | rust_cleaned_test_functions.jsonl/718 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 225
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
1710,
20028,
15528,
23575,
62,
17,
62,
20,
62,
15,
368,
341,
286,
1077,
1482,
10814,
7387,
284,
220,
15,
87,
20,
20,
631,
23,
66,
18,
65,
22,
22,
20,
23,
280,
286,
1077,
5611,
23575,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_candidate_for_shrink() {
solana_logger::setup();
let mut accounts = AccountsDb::new_single_for_tests();
let common_store_path = Path::new("");
let store_file_size = 2 * PAGE_SIZE;
let entry = Arc::new(AccountStorageEntry::new(
common_store_... | rust_cleaned_test_functions.jsonl/7051 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 708
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
62360,
5478,
3712,
34365,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
1428,
286,
1077,
5206,
9618,
284,
40655,
7994,
486,
931,
19487,
5478,
32509,
543,
286,
1077,
4185,
14809,
2638,
284,
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... | 2 |
#[test]
fn test_optflagmulti_mix() {
let args = vec![
"--verbose".to_string(),
"-v".to_string(),
"-vv".to_string(),
"verbose".to_string(),
];
match Options::new()
.optflagmulti("v", "verbose", "verbosity")
.parse(&args)
{
Ok(ref m) => {
... | rust_cleaned_test_functions.jsonl/52374 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 248
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15032,
9903,
26268,
67729,
368,
341,
262,
1077,
2827,
284,
7486,
90515,
286,
14482,
14883,
3263,
983,
3904,
3148,
286,
6523,
85,
3263,
983,
3904,
3148,
286,
6523,
33075,
3263,
983,
3904,
3148,
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_from_hex() {
assert_eq!(from_hex(""), Ok(vec![]));
assert_eq!(from_hex("00000000"), Ok(vec![0, 0, 0, 0]));
assert_eq!(from_hex("0a0b0c0d"), Ok(vec![10, 11, 12, 13]));
assert_eq!(from_hex("000000ff"), Ok(vec![0, 0, 0, 255]));
assert_eq!(from_hex("0x000000ff"), Ok(vec![0, 0, 0, 255]));
... | rust_cleaned_test_functions.jsonl/15828 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 288
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
32655,
368,
341,
197,
6948,
10714,
10297,
1499,
32655,
86076,
7622,
25592,
0,
1294,
1106,
197,
6948,
10714,
10297,
1499,
32655,
445,
15,
15,
15,
15,
15,
15,
15,
15,
3975,
7622,
25592,
2070... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_wired_classic() {
let dev = LinuxIPLinkInterface {
ifname: "eth0".to_string(),
link_type: "ether".to_string(),
operstate: OperState::UP,
flags: vec![],
};
assert![WiredLinuxIPLinkInterface::try_from(dev.clone()).is_ok()];
... | rust_cleaned_test_functions.jsonl/33474 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 195
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1670,
2690,
4790,
292,
368,
341,
286,
1077,
3483,
284,
14340,
40,
2916,
766,
5051,
341,
310,
421,
606,
25,
330,
769,
15,
3263,
983,
3904,
3148,
310,
2656,
1819,
25,
330,
2723,
3263,
983,
3904,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_statsd_client_as_histogrammed() {
let client: Box<dyn Histogrammed> = Box::new(StatsdClient::from_sink("prefix", NopMetricSink));
client.histogram("some.histogram", 4).unwrap();
} | rust_cleaned_test_functions.jsonl/48396 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 96
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15381,
67,
8179,
11898,
68564,
2061,
368,
341,
286,
1077,
2943,
25,
8261,
92846,
82138,
2061,
29,
284,
8261,
486,
931,
7,
16635,
67,
2959,
486,
1499,
51567,
445,
11849,
497,
451,
453,
54310,
450... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_keep_selected_index_if_not_collapsed() {
let mut res = StatusTree::default();
res.update(&string_vec_to_status(&["a/b", "c"])).unwrap();
res.collapse("a/b", 0);
res.selection = Some(2);
res.update(&string_vec_to_status(&["a/b"])).unwrap();
asser... | rust_cleaned_test_functions.jsonl/34456 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 338
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
50293,
23755,
3560,
11119,
7913,
43597,
9200,
368,
341,
286,
1077,
5206,
592,
284,
8104,
6533,
486,
2258,
543,
286,
592,
5317,
2099,
917,
13251,
2346,
4773,
2099,
1183,
64,
3470,
497,
330,
66,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_median() {
assert_eq!(Arcsine::new_unchecked(0.0, 1.0).median(), 0.5);
assert_eq!(Arcsine::new_unchecked(-1.0, 1.0).median(), -0.5);
assert_eq!(Arcsine::new_unchecked(-1.0, 2.0).median(), 0.0);
} | rust_cleaned_test_functions.jsonl/107414 | {
"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,
83003,
368,
341,
286,
2060,
10714,
10297,
36809,
82,
482,
486,
931,
4907,
7549,
7,
15,
13,
15,
11,
220,
16,
13,
15,
568,
55651,
1507,
220,
15,
13,
20,
317,
286,
2060,
10714,
10297,
36809,
82... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_andb_imm_reg() {
assert_emit!(0x24, 1; emit_andb_imm_reg(1, RAX));
assert_emit!(0x80, 0xe1, 2; emit_andb_imm_reg(2, RCX));
assert_emit!(0x41, 0x80, 0xe0, 3; emit_andb_imm_reg(3, R8));
assert_emit!(0x41, 0x80, 0xe7, 4; emit_andb_imm_reg(4, R15));
} | rust_cleaned_test_functions.jsonl/85446 | {
"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,
8378,
65,
71370,
4920,
368,
341,
286,
2060,
69082,
10297,
15,
87,
17,
19,
11,
220,
16,
26,
16691,
8378,
65,
71370,
4920,
7,
16,
11,
431,
2954,
1106,
286,
2060,
69082,
10297,
15,
87,
23,
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_change_rocksdb_config() {
let (mut cfg, _dir) = TiKvConfig::with_tmp().unwrap();
cfg.rocksdb.max_background_jobs = 2;
cfg.rocksdb.defaultcf.disable_auto_compactions = false;
cfg.rocksdb.defaultcf.target_file_size_base = ReadableSize::mb(64);
cfg.rocksdb.de... | rust_cleaned_test_functions.jsonl/55420 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 920
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15947,
26608,
14553,
1999,
5332,
368,
341,
286,
1077,
320,
6984,
13286,
11,
716,
3741,
8,
284,
22325,
42,
85,
2648,
486,
4197,
16125,
1005,
15454,
543,
286,
13286,
30842,
14553,
1999,
6678,
24103,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_variant_to_string() {
let ident = token::str_to_ident("principal_skinner");
let var = codemap::respan(codemap::DUMMY_SP, ast::Variant_ {
name: ident,
attrs: Vec::new(),
data: ast::VariantData::Unit(ast::DUMMY_NODE_ID),
... | rust_cleaned_test_functions.jsonl/297 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 240
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46112,
2346,
3904,
368,
341,
286,
1077,
3524,
284,
3950,
486,
495,
2346,
38399,
445,
66450,
33811,
4382,
3071,
286,
1077,
762,
284,
20329,
42040,
486,
416,
848,
1337,
347,
42040,
486,
35,
58673,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_left() {
let cases = vec![
(
Datum::Bytes(b"hello".to_vec()),
Datum::I64(-1),
Datum::Bytes(b"".to_vec()),
),
(
Datum::Bytes(b"hello".to_vec()),
Datum::I64(0),
... | rust_cleaned_test_functions.jsonl/44148 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 917
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9579,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
2399,
394,
68459,
486,
7078,
1883,
1,
14990,
3263,
983,
13251,
14702,
394,
68459,
486,
40,
21,
19,
4080,
16,
1326,
394,
68459,
486,
7078,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_keywords_after_if() {
check(
r#"fn quux() { if true { () } $0 }"#,
expect![[r#"
kw unsafe
kw fn
kw const
kw type
kw use
kw impl
kw trait
... | rust_cleaned_test_functions.jsonl/72502 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 619
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51354,
19844,
11119,
368,
341,
286,
1779,
1006,
310,
435,
55543,
8822,
922,
2200,
368,
314,
421,
830,
314,
1719,
335,
400,
15,
335,
57676,
345,
310,
1720,
0,
15505,
81,
2,
698,
394,
29525,
198... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_gdef_too_small_classdef_offset() {
// Offset is not past the end of the header
let data = make_gdef_header(1);
let gdef = ReadScope::new(&data).read::<GDEFTable>().unwrap();
assert!(gdef.opt_glyph_classdef.is_none());
} | rust_cleaned_test_functions.jsonl/93745 | {
"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,
6443,
1889,
750,
2346,
78,
31966,
4790,
750,
6917,
368,
341,
286,
442,
16861,
374,
537,
3267,
279,
835,
315,
279,
4247,
198,
286,
1077,
821,
284,
1281,
1889,
750,
8757,
7,
16,
317,
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_error_into_response() {
// Generic error.
let mut buf: [u8; 150] = [0; 150];
let response: Response =
Error::Generic(StatusCode::BadRequest, "message".to_string()).into();
assert!(response.write_all(&mut buf.as_mut()).is_ok());
let expected_res... | rust_cleaned_test_functions.jsonl/43137 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1932
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4096,
45514,
9655,
368,
341,
286,
442,
21281,
1465,
624,
286,
1077,
5206,
6607,
25,
508,
84,
23,
26,
220,
16,
20,
15,
60,
284,
508,
15,
26,
220,
16,
20,
15,
935,
286,
1077,
2033,
25,
5949,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_composite_with_compiler() {
use crate::compiler::{
CompiledBindRules, CompositeBindRules, CompositeNode, Symbol, SymbolicInstruction,
SymbolicInstructionInfo,
};
use crate::parser::bind_library::ValueType;
let primary_node_inst = vec![Symb... | rust_cleaned_test_functions.jsonl/24066 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1466
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2965,
13607,
6615,
80910,
368,
341,
286,
990,
17717,
486,
33620,
74843,
310,
96471,
9950,
26008,
11,
40639,
9950,
26008,
11,
40639,
1955,
11,
19612,
11,
19612,
292,
16664,
345,
310,
19612,
292,
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_adding() {
let err = add(&value!("a"), &value!(42)).unwrap_err();
assert_eq!(
err.to_string(),
"impossible operation: tried to use + operator on unsupported types"
);
assert_eq!(add(&value!(1), &value!(2)), Ok(value!(3)));
} | rust_cleaned_test_functions.jsonl/108531 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 124
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
287,
368,
341,
262,
1077,
1848,
284,
912,
2099,
957,
17223,
64,
3975,
609,
957,
10297,
19,
17,
4579,
15454,
9266,
543,
262,
2060,
10714,
33673,
286,
1848,
2389,
3904,
3148,
286,
330,
318,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tgl_jnz() {
let input = "tgl 1
jnz 42 a";
let regs = compute(input);
assert_eq!(42, regs.get('a'));
} | rust_cleaned_test_functions.jsonl/21656 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 65
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
6072,
5374,
50824,
368,
341,
10217,
1946,
284,
330,
45078,
220,
16,
198,
73,
50824,
220,
19,
17,
264,
876,
10217,
44498,
284,
12564,
5384,
317,
6948,
10714,
10297,
19,
17,
11,
44498,
670,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_drain() {
let mut s = String::from("αβγ");
assert_eq!(s.drain(2..4).collect::<String>(), "β");
assert_eq!(s, "αγ");
let mut t = String::from("abcd");
t.drain(..0);
assert_eq!(t, "abcd");
t.drain(..1);
assert_eq!(t, "bcd");
t.drain(3..);
assert_eq!(t, "bcd... | rust_cleaned_test_functions.jsonl/3182 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 198
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26680,
466,
368,
341,
262,
1077,
5206,
274,
284,
923,
486,
1499,
445,
18945,
51255,
59374,
797,
262,
2060,
10714,
10297,
82,
950,
29093,
7,
17,
496,
19,
568,
17384,
27638,
703,
39019,
330,
51255... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_usize() {
check_round_trip(vec![1, 2, 3, ::std::usize::MIN, 0, 1, ::std::usize::MAX, 2, 1]);
} | rust_cleaned_test_functions.jsonl/24185 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 63
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11306,
551,
368,
341,
262,
1779,
29896,
63883,
25592,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
3504,
1834,
486,
51878,
486,
16413,
11,
220,
15,
11,
220,
16,
11,
3504,
1834,
486,
51878,
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 |
#[test]
fn test_flattened_internally_tagged_unit_enum_with_unknown_fields() {
#[derive(Deserialize, PartialEq, Debug)]
struct S {
#[serde(flatten)]
x: X,
#[serde(flatten)]
y: Y,
}
#[derive(Deserialize, PartialEq, Debug)]
#[serde(tag = "typeX")]
enum X {
... | rust_cleaned_test_functions.jsonl/59178 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 484
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5081,
1587,
6758,
4042,
932,
745,
9372,
3556,
14832,
31054,
6615,
57507,
12132,
368,
341,
262,
11506,
27098,
7,
64465,
11,
55039,
11,
11091,
5563,
262,
2036,
328,
341,
286,
11506,
47024,
49747,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_primitive_min_max_1() {
let a = Primitive::<i32>::from(&[None, None, Some(5), Some(2)]).to(DataType::Int32);
assert_eq!(Some(2), min(&a));
assert_eq!(Some(5), max(&a));
} | rust_cleaned_test_functions.jsonl/101319 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 114
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84087,
7260,
6345,
62,
16,
368,
341,
286,
1077,
264,
284,
51460,
27638,
72,
18,
17,
6831,
1499,
2099,
58,
4064,
11,
2240,
11,
4329,
7,
20,
701,
4329,
7,
17,
7252,
568,
983,
63941,
486,
1072,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_permissions_net_listen_allow_localhost_4555() {
let (_, err) = util::run_and_collect_output(
true,
"run --allow-net=localhost:4558 complex_permissions_test.ts netListen localhost:4558",
None,
None,
false,
);
assert!(!err.contains(util::PERMISSION_DENIED_PATTERN));
} | rust_cleaned_test_functions.jsonl/5607 | {
"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,
44767,
19722,
79286,
55731,
62,
8301,
62,
19,
20,
20,
20,
368,
341,
220,
1077,
39464,
1848,
8,
284,
4094,
486,
6108,
8378,
68140,
7645,
1006,
262,
830,
345,
298,
197,
1,
6108,
1177,
7183,
6649... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sandbox_recv_and_send() {
let sandbox = timestamping_sandbox();
// As far as all validators have connected to each other during
// keypair.
let consensus = KeyPair::random();
let service = KeyPair::random();
let validator_keys = ValidatorK... | rust_cleaned_test_functions.jsonl/77265 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 579
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
31536,
36118,
8378,
13565,
368,
341,
286,
1077,
42754,
284,
11441,
287,
643,
31536,
543,
286,
442,
1634,
3041,
438,
678,
38588,
614,
8433,
311,
1817,
1008,
2337,
8945,
286,
442,
1376,
12670,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cow() {
let mut mat = ArcArray::zeros((2, 2));
mat[[0, 0]] = 1;
let n = mat.clone();
mat[[0, 1]] = 2;
mat[[1, 0]] = 3;
mat[[1, 1]] = 4;
assert_eq!(mat[[0, 0]], 1);
assert_eq!(mat[[0, 1]], 2);
assert_eq!(n[[0, 0]], 1);
assert_eq!(n[[0, 1]], 0);
assert_e... | rust_cleaned_test_functions.jsonl/92614 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 435
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
363,
368,
341,
262,
1077,
5206,
5517,
284,
19689,
1857,
486,
35716,
1188,
17,
11,
220,
17,
1106,
262,
5517,
15505,
15,
11,
220,
15,
5053,
284,
220,
16,
280,
262,
1077,
308,
284,
5517,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_same_bytes_different_chars() {
let inputs = ["€a"]; // E2 82 AC 61
let outputs: Vec<&str> = vec![];
assert_eq!(
anagram::anagrams_for(
"a⬂", // 61 E2 AC 82
&inputs),
outputs
);
} | rust_cleaned_test_functions.jsonl/65516 | {
"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,
33574,
12524,
82741,
37418,
368,
341,
262,
1077,
11127,
284,
4383,
15056,
64,
27533,
442,
468,
17,
220,
23,
17,
10584,
220,
21,
16,
198,
262,
1077,
16275,
25,
11312,
52244,
495,
29,
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_executor_status() {
let executor = TestExecutor::new();
let txn0 = wrap_user_txn(encode_mint_transaction(gen_address(0), 100));
let txn1 = wrap_user_txn(encode_mint_transaction(gen_address(1), 100));
let txn2 = wrap_user_txn(encode_transfer_transaction(
gen_address(0),
... | rust_cleaned_test_functions.jsonl/73893 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 432
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
81207,
4773,
368,
341,
262,
1077,
31558,
284,
3393,
25255,
486,
931,
1428,
262,
1077,
49721,
15,
284,
15061,
3317,
92299,
7,
6180,
717,
396,
28884,
36884,
6744,
7,
15,
701,
220,
16,
15,
15,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_short_format_combined_arg() {
assert_eq!(
parse_format_flags_str(&["od", "-tu8"]).unwrap(),
vec![FORMAT_ITEM_DEC64U]
);
} | rust_cleaned_test_functions.jsonl/78706 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 88
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16673,
8955,
89945,
6057,
368,
341,
262,
2060,
10714,
33673,
286,
4715,
8955,
14130,
2895,
2099,
1183,
347,
497,
6523,
24494,
23,
45014,
15454,
3148,
286,
7486,
20703,
46559,
16461,
23773,
21,
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 |
#[test]
fn test_push() {
let mut heap = PriorityQueue::from_vec(vec!(2i, 4, 9));
assert_eq!(heap.len(), 3);
assert!(*heap.top().unwrap() == 9);
heap.push(11);
assert_eq!(heap.len(), 4);
assert!(*heap.top().unwrap() == 11);
heap.push(5);
assert_eq!(... | rust_cleaned_test_functions.jsonl/2828 | {
"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,
14218,
368,
341,
286,
1077,
5206,
17364,
284,
84102,
486,
1499,
13251,
25592,
10297,
17,
72,
11,
220,
19,
11,
220,
24,
1106,
286,
2060,
10714,
10297,
15961,
19406,
1507,
220,
18,
317,
286,
2060,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_gen_outputs_for_txn_fees() {
init!("true");
let mut cost = 5;
let (remainder, _, refund_address) = inputs(cost).unwrap();
let mut expected_output = format!(r#"[{{"amount":1,"recipient":"{}"}}]"#, refund_address);
assert_eq!(outputs(remainder, &refund_addr... | rust_cleaned_test_functions.jsonl/10479 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 301
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16322,
35189,
5478,
92299,
761,
5516,
368,
341,
286,
2930,
17223,
1866,
3071,
286,
1077,
5206,
2783,
284,
220,
20,
280,
286,
1077,
320,
77381,
11,
8358,
20965,
6744,
8,
284,
11127,
62143,
568,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_int_counter_vec() {
let vec = IntCounterVec::new(Opts::new("foo", "bar"), &["l1", "l2"]).unwrap();
vec.with_label_values(&["v1", "v3"]).inc();
assert_eq!(vec.with_label_values(&["v1", "v3"]).get(), 1);
vec.with_label_values(&["v1", "v2"]).inc_by(12);
ass... | rust_cleaned_test_functions.jsonl/46520 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 493
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
15730,
13251,
368,
341,
286,
1077,
7486,
284,
1333,
14099,
10050,
486,
931,
19238,
12754,
486,
931,
445,
7975,
497,
330,
2257,
3975,
609,
1183,
75,
16,
497,
330,
75,
17,
45014,
15454,
1428... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_drawing() {
let img = test_image_4_2();
let res = img.drawing(5, DrawingMode::Gray);
assert_eq!(img.width(), res.width());
assert_eq!(img.height(), res.height());
let res = img.drawing(5, DrawingMode::Colored);
assert_eq!(img.width(), res.width()... | rust_cleaned_test_functions.jsonl/119729 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 241
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
1696,
368,
341,
286,
1077,
4964,
284,
1273,
4954,
62,
19,
62,
17,
1428,
286,
1077,
592,
284,
4964,
950,
1696,
7,
20,
11,
37759,
3636,
486,
28174,
317,
286,
2060,
10714,
10297,
1892,
5441,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bytes() {
let input = &[0, 1, 2, 3];
let res: NomResult<Vec<u8>> = bytes(input);
assert_eq!(res, Ok((&[][..], vec![0, 1, 2, 3])))
} | rust_cleaned_test_functions.jsonl/39176 | {
"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,
12524,
368,
341,
286,
1077,
1946,
284,
44590,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
935,
286,
1077,
592,
25,
36900,
2077,
50439,
34837,
23,
2452,
284,
5820,
5384,
317,
286,
2060,
10714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decode_rsb_reg_w() {
assert_eq!(
decode_32(0xebc01046),
Instruction::RSB_reg {
params: Reg3ShiftParams {
rd: Reg::R0,
rn: Reg::R0,
rm: Reg::R6,
setflags: SetFlags::False,
shift_t:... | rust_cleaned_test_functions.jsonl/64852 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 538
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
1710,
16892,
4920,
1670,
368,
341,
1066,
262,
2060,
10714,
33673,
286,
16895,
62,
18,
17,
7,
15,
54468,
66,
15,
16,
15,
19,
21,
1326,
286,
29051,
486,
11451,
33,
4920,
341,
310,
3628,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_get_name() {
let context = Context::create();
let bool_type = context.bool_type();
let i8_type = context.i8_type();
let i16_type = context.i16_type();
let i32_type = context.i32_type();
let i64_type = context.i64_type();
let i128_type = context.i128_type();
le... | rust_cleaned_test_functions.jsonl/122300 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2786
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
3062,
1269,
368,
341,
262,
1077,
2266,
284,
9608,
486,
3182,
543,
262,
1077,
1807,
1819,
284,
2266,
28791,
1819,
543,
262,
1077,
600,
23,
1819,
284,
2266,
8607,
23,
1819,
543,
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_fin_with_data() {
let mut s = socket_established();
s.send_slice(b"abcdef").unwrap();
s.close();
recv!(s, [TcpRepr {
control: TcpControl::Fin,
seq_number: LOCAL_SEQ + 1,
ack_number: Some(REMOTE_SEQ + 1),
payload: ... | rust_cleaned_test_functions.jsonl/1758 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 224
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39737,
6615,
1769,
368,
341,
286,
1077,
5206,
274,
284,
7575,
18583,
5102,
291,
543,
286,
274,
5219,
26488,
1883,
1,
41202,
1827,
15454,
543,
286,
274,
4653,
543,
286,
27006,
10297,
82,
11,
508,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_with_additional() {
let input = r#"["test","x",21,42,null]"#;
let output = r#"["test","x",21,42]"#;
let remark = Remark::with_range(RemarkType::Removed, "test", (21, 42));
assert_eq_dbg!(remark, serde_json::from_str(input).unwrap());
assert_eq_str!(output... | rust_cleaned_test_functions.jsonl/126374 | {
"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,
6615,
81742,
368,
341,
286,
1077,
1946,
284,
435,
55543,
1183,
1944,
2198,
87,
497,
17,
16,
11,
19,
17,
23075,
19177,
2,
280,
286,
1077,
2550,
284,
435,
55543,
1183,
1944,
2198,
87,
497,
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_execute_script_with_custom_signer() {
let _pool = ConstPool::new();
let text = r"
/// signers: 0x2
script {
use 0x2::Record;
fun test_create_record(s1: &signer) {
let r1 = Record::create(20);
Record::save(s1, r1);
}
}
";
... | rust_cleaned_test_functions.jsonl/43922 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 455
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44329,
14660,
6615,
15875,
11172,
261,
368,
341,
262,
1077,
716,
10285,
284,
24522,
10551,
486,
931,
1428,
262,
1077,
1467,
284,
435,
698,
262,
1048,
1841,
388,
25,
220,
15,
87,
17,
198,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_metrics_report_omaha_event_lost() {
block_on(async {
// This is sufficient to trigger a lost Omaha event as oneshot triggers an
// in the UpdateCheckResponseTime and RequestsPerCheck events being generated
// reporting success... | rust_cleaned_test_functions.jsonl/59681 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 965
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37686,
14813,
62,
316,
13546,
6748,
88661,
368,
341,
286,
2504,
4470,
18285,
341,
310,
442,
1096,
374,
14016,
311,
8183,
264,
5558,
67205,
1538,
438,
389,
4288,
354,
30754,
458,
18574,
3374,
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_add() {
assert_eq!(u5(1) + u5(2), u5(3));
assert_eq!(i7::MAX + i7::MIN, i7(-1));
assert_eq!(i7(4) + i7(-3), i7(1));
assert_eq!(i7(-4) + i7(3), i7(-1));
assert_eq!(i7(-3) + i7(-20), i7(-23));
} | rust_cleaned_test_functions.jsonl/112529 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 166
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
368,
341,
286,
2060,
10714,
10297,
84,
20,
7,
16,
8,
488,
575,
20,
7,
17,
701,
575,
20,
7,
18,
3237,
286,
2060,
10714,
10297,
72,
22,
486,
10586,
488,
600,
22,
486,
16413,
11,
600,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tls_overwrite() {
static my_key: Key<String> = &Key;
my_key.replace(Some("first data".to_string()));
my_key.replace(Some("next data".to_string())); // Shouldn't leak.
assert!(my_key.get().unwrap().as_slice() == "next data");
} | rust_cleaned_test_functions.jsonl/99471 | {
"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,
71262,
15431,
4934,
368,
341,
286,
1099,
847,
3097,
25,
5309,
3464,
29,
284,
609,
1592,
280,
286,
847,
3097,
6980,
65405,
445,
3896,
821,
3263,
983,
3904,
7392,
286,
847,
3097,
6980,
65405,
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_version() -> Result<(), EtError> {
let mut out = Vec::new();
assert!(run(["entab", "--version"], &b""[..], io::Cursor::new(&mut out)).is_ok());
assert_eq!(&out[..], b"");
Ok(())
} | rust_cleaned_test_functions.jsonl/49290 | {
"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,
9438,
368,
1464,
5714,
68843,
18888,
1454,
29,
341,
286,
1077,
5206,
700,
284,
11312,
486,
931,
543,
286,
2060,
10297,
6108,
19065,
306,
370,
497,
14482,
4366,
7914,
609,
65,
3014,
95874,
1125,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dev_random() {
let mut buf = [0; 2048];
let mut proc = new_ucmd!().args(&["/dev/random"]).run_no_wait();
let mut proc_stdout = proc.stdout.take().unwrap();
proc_stdout.read_exact(&mut buf).unwrap();
let num_zeroes = buf.iter().fold(0, |mut acc, &n| {
if n == 0 {
... | rust_cleaned_test_functions.jsonl/90942 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 235
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10433,
22644,
368,
341,
262,
1077,
5206,
6607,
284,
508,
15,
26,
220,
17,
15,
19,
23,
935,
262,
1077,
5206,
13674,
284,
501,
68887,
2277,
0,
1005,
2116,
2099,
1183,
14,
3583,
79442,
45014,
610... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_merged_mappings() {
let page_size = nix::unistd::sysconf(nix::unistd::SysconfVar::PAGE_SIZE).unwrap();
let page_size = page_size.unwrap() as usize;
let map_size = 3 * page_size;
let path: &'static str = std::env!("CARGO_BIN_EXE_test");
let file = std::fs::File::open(path).un... | rust_cleaned_test_functions.jsonl/126015 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 665
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
90702,
84153,
368,
341,
262,
1077,
2150,
2368,
284,
308,
941,
486,
27483,
486,
7791,
6135,
1445,
941,
486,
27483,
486,
32792,
6135,
3962,
486,
37374,
4098,
568,
15454,
543,
262,
1077,
2150,
2368,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_start_and_stop_starts_and_stops_the_logging() {
let mut target = LogWriter::new(Vec::new());
target.write(&[0, 1, 2, 3]).unwrap();
assert_eq!(target.logged(), &vec![0, 1, 2, 3]);
target.stop();
target.write(&[4, 5, 6, 7]).unwrap();
assert_eq!(targ... | rust_cleaned_test_functions.jsonl/118890 | {
"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,
4906,
8378,
19039,
86552,
8378,
1261,
3721,
16068,
59982,
368,
341,
286,
1077,
5206,
2169,
284,
2835,
6492,
486,
931,
49923,
486,
931,
1423,
286,
2169,
3836,
2099,
58,
15,
11,
220,
16,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_repr_enum() {
let repr_enum_struct = ReprEnumStruct { e: ReprEnum::B };
let re: ReprEnumStruct = from_slice(&to_vec(&repr_enum_struct).unwrap()).unwrap();
assert_eq!(repr_enum_struct, re);
} | rust_cleaned_test_functions.jsonl/18961 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 101
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68535,
31054,
368,
341,
262,
1077,
30636,
31054,
15126,
284,
1032,
649,
10766,
9422,
314,
384,
25,
1032,
649,
10766,
486,
33,
2605,
262,
1077,
312,
25,
1032,
649,
10766,
9422,
284,
504,
26488,
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_try_explode() {
let lines = [
"[[[[[9,8],1],2],3],4]",
"[7,[6,[5,[4,[3,2]]]]]",
"[[6,[5,[4,[3,2]]]],1]",
"[[3,[2,[1,[7,3]]]],[6,[5,[4,[3,2]]]]]",
"[[3,[2,[8,0]]],[9,[5,[4,[3,2]]]]]",
];
let results = [
... | rust_cleaned_test_functions.jsonl/124063 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 499
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
2702,
70744,
368,
341,
286,
1077,
5128,
284,
2278,
310,
10545,
15505,
15505,
24,
11,
23,
1125,
16,
1125,
17,
1125,
18,
1125,
19,
45016,
310,
10545,
22,
17259,
21,
17259,
20,
17259,
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... | 2 |
#[test]
fn test_cast_i32_to_dim() {
let t_i32: Tensor = tensor1(&[0i32, 0]);
t_i32.cast_to::<TDim>().unwrap();
} | rust_cleaned_test_functions.jsonl/4232 | {
"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,
5303,
5318,
18,
17,
2346,
10791,
368,
341,
286,
1077,
259,
5318,
18,
17,
25,
26036,
284,
15626,
16,
2099,
58,
15,
72,
18,
17,
11,
220,
15,
2558,
286,
259,
5318,
18,
17,
35091,
2346,
27638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_diff_in_diff() {
let options = get_command_line_options();
let output = strip_ansi_codes(&run_delta(DIFF_IN_DIFF, &options)).to_string();
assert!(output.contains("\n ---\n"));
assert!(output.contains("\n Subject: [PATCH] Init\n"));
} | rust_cleaned_test_functions.jsonl/61851 | {
"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,
15850,
1243,
15850,
368,
341,
286,
1077,
2606,
284,
633,
10811,
6528,
8743,
543,
286,
1077,
2550,
284,
13316,
62,
52067,
38482,
2099,
6108,
26710,
5432,
29035,
2158,
53984,
11,
609,
2875,
4579,
98... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_obsolete_extras() {
new_ucmd!()
.args(&["-5zv"])
.pipe_in("1\x002\x003\x004\x005\x006")
.succeeds()
.stdout_is("==> standard input <==\n1\x002\x003\x004\x005\0");
} | rust_cleaned_test_functions.jsonl/32777 | {
"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,
36322,
27246,
2702,
13503,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
12,
20,
89,
85,
14108,
286,
659,
13768,
1243,
445,
16,
3462,
15,
15,
17,
3462,
15,
15,
18,
346... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_topn_executor() {
// prepare data and store
let tid = 1;
let cis = vec![
new_col_info(1, FieldTypeTp::LongLong),
new_col_info(2, FieldTypeTp::VarChar),
new_col_info(3, FieldTypeTp::NewDecimal),
];
let raw_data = vec![
... | rust_cleaned_test_functions.jsonl/77889 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1587
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10426,
77,
81207,
368,
341,
286,
442,
10549,
821,
323,
3553,
198,
286,
1077,
13112,
284,
220,
16,
280,
286,
1077,
66404,
284,
7486,
90515,
310,
501,
10211,
3109,
7,
16,
11,
84614,
62241,
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... | 3 |
#[test]
fn test_multiple_vars() {
let s = schema(&[
("a", DataType::Int64),
("b", DataType::Int64),
("c", DataType::Utf8),
]);
let extract = |sql| PartitionFilter::extract(&s, &[parse(sql, &s)]);
assert_eq!(
extract("b <= 10").min_... | rust_cleaned_test_functions.jsonl/65531 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 284
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45233,
11168,
368,
341,
286,
1077,
274,
284,
10802,
2099,
9640,
310,
3489,
64,
497,
33172,
486,
1072,
21,
19,
1326,
310,
3489,
65,
497,
33172,
486,
1072,
21,
19,
1326,
310,
3489,
66,
497,
3317... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_top_ten() {
let names = vec![
String::from("Oakland"),
String::from("Oakland"),
String::from("Oakland"),
String::from("Alameda"),
String::from("San Francisco"),
String::from("San Francisco"),
];
let t... | rust_cleaned_test_functions.jsonl/83600 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 209
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10426,
75827,
368,
341,
286,
1077,
5036,
284,
7486,
90515,
310,
923,
486,
1499,
445,
85839,
1933,
4461,
310,
923,
486,
1499,
445,
85839,
1933,
4461,
310,
923,
486,
1499,
445,
85839,
1933,
4461,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_wallet_token_info() {
init!("true");
create_address(None).unwrap();
let balance = get_wallet_token_info().unwrap().to_string();
assert_eq!(balance, r#"{"balance":6,"balance_str":"6","addresses":[{"address":"pay:null:9UFgyjuJxi1i1HD","balance":3,"utxo":[{"sourc... | rust_cleaned_test_functions.jsonl/10473 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 354
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
62308,
6458,
3109,
368,
341,
286,
2930,
17223,
1866,
797,
286,
1855,
6744,
26717,
568,
15454,
543,
286,
1077,
8172,
284,
633,
62308,
6458,
3109,
1005,
15454,
1005,
983,
3904,
543,
286,
2060,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_instance_pool() -> Result<()> {
let module_limits = ModuleLimits {
imported_functions: 0,
imported_tables: 0,
imported_memories: 0,
imported_globals: 0,
types: 0,
functions: 0,
tables: 1,
memo... | rust_cleaned_test_functions.jsonl/132219 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2201
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11904,
15709,
368,
1464,
5714,
71698,
341,
286,
1077,
4688,
31820,
284,
13711,
94588,
341,
310,
24928,
31708,
25,
220,
15,
345,
310,
24928,
35632,
25,
220,
15,
345,
310,
24928,
12976,
2433,
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... | 5 |
#[test]
fn test_embed_description_limit() {
let mut embed = base_embed();
embed.description.replace(str::repeat("a", 2048));
assert!(super::embed(&embed).is_ok());
embed.description.replace(str::repeat("a", 4096));
assert!(super::embed(&embed).is_ok());
embed.de... | rust_cleaned_test_functions.jsonl/4828 | {
"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,
24007,
11448,
14763,
368,
341,
286,
1077,
5206,
11579,
284,
2331,
24007,
543,
286,
11579,
13178,
6980,
4199,
486,
30624,
445,
64,
497,
220,
17,
15,
19,
23,
1106,
286,
2060,
10297,
9522,
486,
122... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_refs_invalid_program_id() {
let key = Keypair::new();
let instructions = vec![CompiledInstruction::new(1, &(), vec![])];
let tx = Transaction::new_with_compiled_instructions(
&[&key],
&[],
Hash::default(),
vec![],
... | rust_cleaned_test_functions.jsonl/11231 | {
"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,
60638,
31433,
25096,
842,
368,
341,
286,
1077,
1376,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
11221,
284,
7486,
20703,
90383,
16664,
486,
931,
7,
16,
11,
609,
1507,
7486,
0,
1294,
12587,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_apple_crash_report() -> Result<(), Error> {
let (service, _cache_dir) = setup_service();
let (_symsrv, source) = test::symbol_server();
let report_file = Bytes::from(fs::read("./tests/fixtures/apple_crash_report.txt")?);
let request_id = service.symbolication().p... | rust_cleaned_test_functions.jsonl/84408 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 267
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8191,
273,
32331,
988,
14813,
368,
1464,
5714,
68843,
4600,
29,
341,
286,
1077,
320,
7936,
11,
716,
9360,
4334,
8,
284,
6505,
12267,
543,
286,
1077,
5453,
22860,
1011,
10553,
11,
2530,
8,
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... | 4 |
#[test]
fn test_rename_branch() {
let (_td, repo) = repo_init().unwrap();
let root = repo.path().parent().unwrap();
let repo_path = root.as_os_str().to_str().unwrap();
create_branch(repo_path, "branch1").unwrap();
checkout_branch(repo_path, "refs/heads/branch1").unwrap();
assert_eq!(
repo.bran... | rust_cleaned_test_functions.jsonl/510 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 370
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79399,
28031,
368,
341,
197,
10217,
5453,
1296,
11,
15867,
8,
284,
15867,
6137,
1005,
15454,
543,
197,
10217,
3704,
284,
15867,
3875,
1005,
3765,
1005,
15454,
543,
197,
10217,
15867,
2638,
284,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_value_alias() {
assert::is_true(
r#"
v1 = [1, 2, 3]
v2 = v1
v2[2] = 4
v1 == [1, 2, 4] and v2 == [1, 2, 4]
"#,
);
} | rust_cleaned_test_functions.jsonl/25213 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 113
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3142,
35947,
368,
341,
286,
2060,
486,
285,
16082,
1006,
310,
435,
2,
698,
85,
16,
284,
508,
16,
11,
220,
17,
11,
220,
18,
921,
85,
17,
284,
348,
16,
198,
85,
17,
58,
17,
60,
284,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_negative_zero_lines() {
new_ucmd!()
.arg("--lines=-0")
.pipe_in("a\nb\n")
.succeeds()
.stdout_is("a\nb\n");
new_ucmd!()
.arg("--lines=-0")
.pipe_in("a\nb")
.succeeds()
.stdout_is("a\nb");
} | rust_cleaned_test_functions.jsonl/32770 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 177
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53865,
19359,
18323,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
858,
21549,
7969,
10829,
15,
1138,
286,
659,
13768,
1243,
445,
64,
1699,
65,
1699,
1138,
286,
659,
82,
29264,
82,
741,
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_update_spec_device_list_guest_host_conflict() {
let null_rdev = fs::metadata("/dev/null").unwrap().rdev();
let zero_rdev = fs::metadata("/dev/zero").unwrap().rdev();
let full_rdev = fs::metadata("/dev/full").unwrap().rdev();
let host_major_a = stat::major(null_rd... | rust_cleaned_test_functions.jsonl/53138 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2631
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
13594,
9204,
2019,
62739,
12848,
16059,
21242,
368,
341,
286,
1077,
845,
1710,
3583,
284,
8619,
486,
17637,
4283,
3583,
19293,
1827,
15454,
1005,
81,
3583,
543,
286,
1077,
7168,
1710,
3583,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_date() {
let datetime = Datetime(blpapi_Datetime_t {
parts: BLPAPI_DATETIME_DATE_PART as u8,
hours: 0,
minutes: 0,
seconds: 0,
milliSeconds: 0,
month: 1,
day: 1,
year: 2020,
offset... | rust_cleaned_test_functions.jsonl/117265 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 518
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4164,
368,
341,
286,
1077,
8874,
284,
21631,
4107,
1883,
13545,
2068,
1557,
27662,
528,
341,
310,
5479,
25,
425,
12567,
7082,
36347,
44618,
18500,
28278,
438,
575,
23,
345,
310,
4115,
25,
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... | 1 |
#[test]
fn test_parse_css_color_6() {
assert_eq!(parse_css_color("rgba(192, 14, 12, 80)"), Err(CssColorParseError::FloatValueOutOfRange(80.)));
} | rust_cleaned_test_functions.jsonl/37101 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 77
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
25924,
6714,
62,
21,
368,
341,
286,
2060,
10714,
10297,
6400,
25924,
6714,
445,
20400,
7,
16,
24,
17,
11,
220,
16,
19,
11,
220,
16,
17,
11,
220,
23,
15,
8,
3975,
15495,
3025,
778,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_bn128_mul() {
// zero-point multiplication
{
let x = FromHex::from_hex(
"0000000000000000000000000000000000000000000000000000000000000000"
).unwrap();
let y = FromHex::from_hex(
"000000000000000000000000000000000... | rust_cleaned_test_functions.jsonl/103159 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 787
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58112,
16,
17,
23,
24944,
368,
341,
286,
442,
7168,
16574,
46444,
198,
286,
341,
310,
1077,
856,
284,
5542,
20335,
486,
1499,
32655,
1006,
394,
330,
15,
15,
15,
15,
15,
15,
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... | 1 |
#[test]
fn test_encode_occurance_2() {
let mut once_upto_u8 = NONEUPTO_U8.clone();
let mut once_upto_u16 = NONEUPTO_U16.clone();
once_upto_u8[0] = 0x01;
once_upto_u16[0] = 0x01;
let dec2: Occurrences =
Occurrences::strict_decode(&once_upto_u16[..]).unwrap();... | rust_cleaned_test_functions.jsonl/45939 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 285
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
49648,
2352,
681,
62,
17,
368,
341,
286,
1077,
5206,
3055,
7300,
57991,
7300,
23,
284,
42869,
52,
2828,
46,
6665,
23,
15997,
543,
286,
1077,
5206,
3055,
7300,
57991,
7300,
16,
21,
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_origin_from_str() {
assert_eq!(
Origin::from_str("cyber").unwrap(),
HeaderValue::from_static("cyber")
);
assert!(Origin::from_str("\n").is_err());
} | rust_cleaned_test_functions.jsonl/59753 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 118
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34043,
5673,
2895,
368,
341,
286,
2060,
10714,
33673,
310,
17116,
486,
1499,
2895,
445,
11130,
652,
1827,
15454,
3148,
310,
12104,
1130,
486,
1499,
25360,
445,
11130,
652,
1138,
286,
3475,
286,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_determines_types() {
assert_eq!(
JmespathType::Object,
Variable::from_json(&"{\"foo\": \"bar\"}")
.unwrap()
.get_type()
);
assert_eq!(
JmespathType::Array,
Variable::from_json(&"[\"foo\"]").un... | rust_cleaned_test_functions.jsonl/108379 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 412
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
16483,
288,
9763,
368,
341,
286,
2060,
10714,
33673,
310,
619,
8828,
2343,
929,
486,
1190,
345,
310,
12407,
486,
1499,
9455,
2099,
14129,
2105,
7975,
11693,
7245,
2257,
2105,
14451,
394,
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_table_cipher() {
let message = "hello world";
let key = "keykeykk";
let mut enc = TableCipher::new(key.as_bytes(), CryptoMode::Encrypt);
let mut dec = TableCipher::new(key.as_bytes(), CryptoMode::Decrypt);
let mut encrypted_msg = Vec::new();
enc.update(message.as_bytes()... | rust_cleaned_test_functions.jsonl/19220 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 195
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5237,
76692,
368,
341,
262,
1077,
1943,
284,
330,
14990,
1879,
876,
262,
1077,
1376,
284,
330,
792,
792,
19196,
3302,
262,
1077,
5206,
3209,
284,
6633,
79460,
486,
931,
4857,
5357,
12524,
1507,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.