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_without_projection() -> Result<()> {
let schema = Arc::new(Schema::new(vec![
Field::new("a", DataType::Int32, false),
Field::new("b", DataType::Int32, false),
Field::new("c", DataType::Int32, false),
]));
let batch = RecordBatch::try_n... | rust_cleaned_test_functions.jsonl/20927 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 481
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39904,
72738,
368,
1464,
5714,
71698,
341,
286,
1077,
10802,
284,
19689,
486,
931,
3759,
3416,
486,
931,
25592,
90515,
310,
8601,
486,
931,
445,
64,
497,
33172,
486,
1072,
18,
17,
11,
895,
1326,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_next_with_bars() {
fn bar(close: f64) -> Bar {
Bar::new().close(close)
}
let mut sd = StandardDeviation::new(4).unwrap();
assert_eq!(sd.next(&bar(10.0)), 0.0);
assert_eq!(sd.next(&bar(20.0)), 5.0);
assert_eq!(round(sd.next(&bar(30.0)))... | rust_cleaned_test_functions.jsonl/65296 | {
"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,
11257,
6615,
880,
1561,
368,
341,
286,
5168,
3619,
68890,
25,
282,
21,
19,
8,
1464,
4716,
341,
310,
4716,
486,
931,
1005,
5552,
68890,
340,
286,
555,
286,
1077,
5206,
20585,
284,
11766,
14592,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_consensus_withdraw_handler() {
let denom: Denomination = Denomination::from_str("TEST").unwrap();
let mut mock = mock::Mock::default();
let mut ctx = mock.create_ctx();
let mut meta = Metadata {
..Default::default()
};
Accounts::init_or_migrate(
&mut ctx,... | rust_cleaned_test_functions.jsonl/52602 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 798
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31971,
13626,
6615,
7633,
10183,
368,
341,
262,
1077,
49744,
25,
9774,
80380,
284,
9774,
80380,
486,
1499,
2895,
445,
10033,
1827,
15454,
543,
262,
1077,
5206,
7860,
284,
7860,
486,
11571,
486,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_validate_interface_config() {
let fake_factory_path = "/fake_factory_path";
let test_config = create_test_config("/doesntmatter", fake_factory_path, "/doesntmatter");
let mut intf = create_test_interface();
// Should pass because an interface must have exactly on... | rust_cleaned_test_functions.jsonl/83805 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 956
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
20546,
5332,
368,
341,
286,
1077,
12418,
24269,
2638,
284,
3521,
30570,
24269,
2638,
876,
286,
1077,
1273,
5332,
284,
1855,
4452,
5332,
4283,
27057,
406,
58965,
497,
12418,
24269,
2638,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_remove_mounts() {
skip_if_not_root!();
#[derive(Debug)]
struct TestData<'a> {
mounts: Vec<String>,
// else assume no error.
error_contains: &'a str,
}
let dir = tempdir().expect("failed to create tmpdir")... | rust_cleaned_test_functions.jsonl/32168 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1657
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
57593,
82,
368,
341,
286,
10706,
11119,
7913,
12993,
0,
1428,
286,
11506,
27098,
42618,
5563,
286,
2036,
93200,
18291,
64,
29,
341,
310,
56222,
25,
11312,
3464,
29,
3554,
3374,
310,
442,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_config_complete_config() {
let toml = r#"
environment_path = "/path/to/env"
use_dangerous_test_keystore = true
[passphrase_service]
type = "cmd"
[network]
type = "sim2h"
url = "ws://localhost:9000"
encryption_service_uri = "ws://localhost:9001"
decr... | rust_cleaned_test_functions.jsonl/121441 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 809
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5332,
27675,
5332,
368,
341,
286,
1077,
311,
1014,
284,
435,
2,
698,
262,
4573,
2638,
284,
3521,
2343,
32429,
14358,
698,
262,
990,
814,
4003,
782,
4452,
45476,
63373,
284,
830,
271,
262,
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_get_highest_bank_snapshot_post() {
solana_logger::setup();
let temp_snapshots_dir = tempfile::TempDir::new().unwrap();
let min_slot = 99;
let max_slot = 123;
common_create_bank_snapshot_files(temp_snapshots_dir.path(), min_slot, max_slot);
let hig... | rust_cleaned_test_functions.jsonl/75080 | {
"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,
1523,
7504,
35733,
53265,
6333,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
2730,
74175,
27634,
4334,
284,
54819,
486,
12151,
6184,
486,
931,
1005,
15454,
543,
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... | 1 |
#[test]
fn test_build() -> Result<(), Box<dyn std::error::Error>> {
let mut reference_sequences = ReferenceSequences::default();
reference_sequences.insert(
String::from("sq0"),
sam::header::ReferenceSequence::new(String::from("sq0"), 8),
);
let mut build... | rust_cleaned_test_functions.jsonl/42566 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1088
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20801,
368,
1464,
5714,
68843,
8261,
92846,
1460,
486,
841,
486,
1454,
2452,
341,
286,
1077,
5206,
5785,
58732,
284,
17207,
1514,
43945,
486,
2258,
543,
286,
5785,
58732,
7030,
1006,
310,
923,
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... | 9 |
#[test]
fn test_collapse_prev_rollback() {
let engine = TestEngineBuilder::new().build().unwrap();
let (key, value) = (b"key", b"value");
// Add a Rollback whose start ts is 1.
must_prewrite_put(&engine, key, value, key, 1);
must_rollback_collapsed(&engine, key, 1);
... | rust_cleaned_test_functions.jsonl/16083 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 423
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
10786,
25566,
62,
33559,
368,
341,
286,
1077,
4712,
284,
3393,
4571,
3297,
486,
931,
1005,
5834,
1005,
15454,
543,
286,
1077,
320,
792,
11,
897,
8,
284,
320,
65,
1,
792,
497,
293,
63307,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_reader_rng_insufficient_bytes() {
let mut rng = ReaderRng::new(&[][..]);
let mut v = [0; 3];
rng.fill_bytes(&mut v);
} | rust_cleaned_test_functions.jsonl/29282 | {
"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,
22306,
66849,
34386,
26683,
12524,
368,
341,
286,
1077,
5206,
28422,
284,
25166,
49,
968,
486,
931,
2099,
63449,
496,
2558,
286,
1077,
5206,
348,
284,
508,
15,
26,
220,
18,
935,
286,
28422,
1246... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_ack_settings_frame() {
let frame = SettingsFrame::ack();
let mut b = Vec::new();
b.write_frame(frame.clone()).unwrap();
assert_eq!(b, [0, 0, 0, 4, 1, 0, 0, 0, 0]);
let mut sl = &b[..];
if let FrameKind::Settings(res) = sl.read_frame().unwrap() {
... | rust_cleaned_test_functions.jsonl/93805 | {
"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,
48447,
10853,
8929,
368,
341,
286,
1077,
4034,
284,
11296,
4369,
486,
473,
543,
286,
1077,
5206,
293,
284,
11312,
486,
931,
543,
286,
293,
3836,
8929,
15046,
15997,
6011,
15454,
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... | 2 |
#[test]
fn test_iteration_sub() {
// Test difference in range.
{
assert_eq!(Iteration::new() - Iteration::new(), 0);
let test_difference = 240924246i32;
let a = Iteration::new();
let b = Iteration{current_iteration: test_difference.into()};
assert_eq!(b - a, test_... | rust_cleaned_test_functions.jsonl/101304 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 289
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62772,
5228,
368,
341,
262,
442,
3393,
6672,
304,
2088,
624,
262,
341,
286,
2060,
10714,
10297,
53101,
486,
931,
368,
481,
13704,
367,
486,
931,
1507,
220,
15,
317,
286,
1077,
1273,
47525,
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_enc_size() {
let pack = ControlPacket {
timestamp: TimeStamp::from_micros(0),
dest_sockid: SocketId(0),
control_type: ControlTypes::Handshake(HandshakeControlInfo {
init_seq_num: SeqNumber(0),
max_packet_size: 1816,
... | rust_cleaned_test_functions.jsonl/5474 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 573
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13781,
2368,
368,
341,
286,
1077,
3769,
284,
7779,
16679,
341,
310,
11441,
25,
4120,
20906,
486,
1499,
73003,
82,
7,
15,
1326,
310,
3201,
33103,
307,
25,
20954,
764,
7,
15,
1326,
310,
2524,
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_encode_operations_hash() -> Result<(), failure::Error> {
let decoded = HashType::OperationListListHash.bytes_to_string(&hex::decode("acecbfac449678f1d68b90c7b7a86c9280fd373d872e072f3fb1b395681e7149")?);
let expected = "LLoads9N8uB8v659hpNhpbrLzuzLdUCjz5euiR6Lm2hd7C6sS2Vep";
... | rust_cleaned_test_functions.jsonl/65921 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 191
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
57345,
8950,
368,
1464,
5714,
68843,
7901,
486,
1454,
29,
341,
286,
1077,
29213,
284,
6531,
929,
486,
8432,
852,
852,
6370,
42697,
2346,
3904,
2099,
17308,
486,
18196,
445,
578,
7221,
22185... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_with_given_data() {
let input = vec![
35, 20, 15, 25, 47, 40, 62, 55, 65, 95, 102, 117, 150, 182, 127, 219, 299, 277, 309,
576,
];
let result = find_first_outlier(&input, 5);
assert_eq!(result, 127);
} | rust_cleaned_test_functions.jsonl/83363 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 153
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6615,
57653,
1769,
368,
341,
286,
1077,
1946,
284,
7486,
90515,
310,
220,
18,
20,
11,
220,
17,
15,
11,
220,
16,
20,
11,
220,
17,
20,
11,
220,
19,
22,
11,
220,
19,
15,
11,
220,
21,
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_aggregate_partition_timestamps() {
let metrics = ExecutionPlanMetricsSet::new();
// 1431648000000000 == 1970-01-17 13:40:48 UTC
let t1 = Utc.timestamp_nanos(1431648000000000);
// 1531648000000000 == 1970-01-18 17:27:28 UTC
let t2 = Utc.timestamp_nanos(153... | rust_cleaned_test_functions.jsonl/28188 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1153
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20587,
14240,
43840,
23073,
82,
368,
341,
286,
1077,
16734,
284,
30928,
20485,
27328,
1649,
486,
931,
1428,
286,
442,
220,
16,
19,
18,
16,
21,
19,
23,
15,
15,
15,
15,
15,
15,
15,
15,
15,
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... | 5 |
#[test]
fn test_hashing() {
// swapping the indices should change the hashes!
let a: i64 = 6;
let b: i64 = 2;
let mut counter: i64 = 0;
let mut s = FileStorage::new("file_test").unwrap();
s.flush().unwrap();
assert_eq!(a * b, cache!(s, test_func_2(a, b, &m... | rust_cleaned_test_functions.jsonl/123187 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 253
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
287,
368,
341,
286,
442,
63719,
279,
14937,
1265,
2297,
279,
50257,
4894,
286,
1077,
264,
25,
600,
21,
19,
284,
220,
21,
280,
286,
1077,
293,
25,
600,
21,
19,
284,
220,
17,
280,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_complex_tree() {
assert_eq!(
use_tree_names(
"use std::collections::{self, hash_map::{HashMap}, HashSet as MyHashSet};"
),
vec![
named("collections", "use std::collections;"),
named("HashMap", "use std::c... | rust_cleaned_test_functions.jsonl/37349 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 249
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41522,
11663,
368,
341,
286,
2060,
10714,
33673,
310,
990,
11663,
9187,
1006,
394,
330,
810,
1460,
486,
51137,
22964,
721,
11,
5175,
5376,
22964,
18497,
2137,
18931,
438,
3017,
44601,
11061,
698,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_drop_setuid_bit_on_own_exe() -> Result<(), Box<dyn error::Error>> {
let image = build_image(&[
"RUN chmod u+s,g+s /sbin/matchhostfsowner",
"RUN addgroup --gid 1234 app",
"RUN adduser --uid 1234 --gid 1234 --gecos '' --disabled-password app",
])?;
let output = ... | rust_cleaned_test_functions.jsonl/90916 | {
"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,
29584,
2602,
2423,
13996,
4470,
82100,
76074,
368,
1464,
5714,
68843,
8261,
92846,
1465,
486,
1454,
2452,
341,
262,
1077,
2168,
284,
1936,
4954,
2099,
9640,
286,
330,
47390,
59615,
575,
67797,
21644... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_from_config_reverse() {
let yaml_string = "sorting:\n reverse: true";
let yaml = YamlLoader::load_from_str(yaml_string).unwrap()[0].clone();
assert_eq!(
Some(SortOrder::Reverse),
SortOrder::from_config(&Config::with_yaml(yaml))
);
} | rust_cleaned_test_functions.jsonl/54309 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 157
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
5332,
43277,
368,
341,
286,
1077,
32246,
3904,
284,
330,
67039,
7190,
77,
220,
9931,
25,
830,
876,
286,
1077,
32246,
284,
809,
9467,
9181,
486,
1078,
5673,
2895,
7021,
9467,
3904,
568,
154... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_crds_records() {
fn check_crds_records(crds: &Crds) {
assert_eq!(
crds.table.len(),
crds.records.values().map(IndexSet::len).sum::<usize>()
);
for (pubkey, indices) in &crds.records {
for index in indices... | rust_cleaned_test_functions.jsonl/10458 | {
"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,
32331,
5356,
31279,
368,
341,
286,
5168,
1779,
32331,
5356,
31279,
38962,
5356,
25,
609,
16001,
5356,
8,
341,
310,
2060,
10714,
33673,
394,
1560,
5356,
10336,
19406,
3148,
394,
1560,
5356,
64516,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_filtered_search_results_moves_up_down_list() {
let search = get_blank_search().append_search_string("t");
assert!(search.down().selection().unwrap().as_slice() == "three");
let search = get_blank_search().append_search_string("t");
assert!(search.up().selection()... | rust_cleaned_test_functions.jsonl/96104 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 142
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51429,
10716,
13576,
45390,
8237,
13998,
2019,
368,
341,
286,
1077,
2711,
284,
633,
56103,
10716,
1005,
5090,
10716,
3904,
445,
83,
797,
286,
2060,
10297,
1836,
18148,
1005,
23617,
1005,
15454,
1005... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sanitize_unsanitary() {
let unsanitary_tx58 = "ju9xZWuDBX4pRxX2oZkTjxU5jB4SSTgEGhX8bQ8PURNzyzqKMPPpNvWihx8zUe\
FfrbVNoAaEsNKZvGzAnTDy5bhNT9kt6KFCTBixpvrLCzg4M5UdFUQYrn1gdgjX\
pLHxcaShD81xBNaFDgnA2nkkdHnKtZt4hVSfKAmw3VRZbjrZ7L2fKZBx21CwsG\
hD6onjM2M3... | rust_cleaned_test_functions.jsonl/36140 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 542
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
58652,
4907,
33082,
44806,
368,
341,
286,
1077,
6975,
276,
44806,
17805,
20,
23,
284,
330,
8613,
24,
87,
81756,
84,
3506,
55,
19,
79,
50639,
55,
17,
78,
57,
74,
51,
73,
87,
52,
20,
73... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cmp_x_lt_m() {
let code = vec![0xE0, 0x7];
let mut nes = Cpu::new();
let mut memory = new_memory(code);
nes.X = 0x05;
nes.next(&mut memory).unwrap();
assert_eq!(0, nes.C);
assert_eq!(0, nes.Z);
assert_eq!(1, nes.N);
} | rust_cleaned_test_functions.jsonl/38736 | {
"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,
35193,
3212,
39164,
717,
368,
341,
286,
1077,
2038,
284,
7486,
20703,
15,
12606,
15,
11,
220,
15,
87,
22,
935,
286,
1077,
5206,
308,
288,
284,
356,
5584,
486,
931,
543,
286,
1077,
5206,
4938,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_serialize() {
assert_eq!(mem::size_of::<SecretKey>(), 32);
assert_eq!(mem::size_of::<PublicKey>(), 48 * 3);
assert_eq!(mem::size_of::<Signature>(), 48 * 2 * 3);
let msg = "abc".as_bytes();
let mut seckey = unsafe { SecretKey::uninit() };
seckey.set_by_csprng();
... | rust_cleaned_test_functions.jsonl/8590 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 237
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11172,
88686,
368,
341,
262,
2060,
10714,
10297,
10536,
486,
2141,
3575,
27638,
19773,
1592,
39019,
220,
18,
17,
317,
262,
2060,
10714,
10297,
10536,
486,
2141,
3575,
27638,
61822,
39019,
220,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_process_vote_skips_old_vote() {
let mut vote_state = VoteState::default();
let vote = Vote::new(vec![0], Hash::default());
let slot_hashes: Vec<_> = vec![(0, vote.hash)];
assert_eq!(vote_state.process_vote(&vote, &slot_hashes, 0), Ok(()));
let recent = re... | rust_cleaned_test_functions.jsonl/43739 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 253
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
54360,
33811,
3077,
21108,
54360,
368,
341,
286,
1077,
5206,
6910,
4387,
284,
34034,
1397,
486,
2258,
1428,
286,
1077,
6910,
284,
34034,
486,
931,
25592,
20703,
15,
1125,
6531,
486,
2258,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_process_token_allocations() {
let alice = Keypair::new();
let test_validator =
TestValidator::with_no_fees(alice.pubkey(), None, SocketAddrSpace::Unspecified);
let url = test_validator.rpc_url();
let client = RpcClient::new_with_commitment(url, Commit... | rust_cleaned_test_functions.jsonl/18250 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 179
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
6458,
14802,
804,
368,
341,
286,
1077,
70433,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
1273,
64959,
4035,
310,
3393,
14256,
486,
4197,
6536,
761,
5516,
17643,
558,
47773,
792,
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 |
#[test]
fn test_capsule_support_1() {
let capsule = Capsule::new(2., 1.);
let direction = Vector3::new(1., 0., 0.);
let transform = transform(0., 0., 0., 0.);
let point = capsule.support_point(&direction, &transform);
assert_ulps_eq!(Point3::new(1., 2., 0.), point);
} | rust_cleaned_test_functions.jsonl/18383 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 144
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
52955,
1111,
25827,
62,
16,
368,
341,
286,
1077,
47639,
284,
43365,
1111,
486,
931,
7,
17,
2572,
220,
16,
58957,
286,
1077,
5106,
284,
4196,
18,
486,
931,
7,
16,
2572,
220,
15,
2572,
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_restore_memory() {
let page_size: usize = sysconf::page::pagesize();
let mem_regions = [
(GuestAddress(0), page_size * 2),
(GuestAddress(page_size as u64 * 3), page_size * 2),
];
let guest_memory = GuestMemoryMmap::from_ranges(&me... | rust_cleaned_test_functions.jsonl/30209 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1617
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62677,
19195,
368,
341,
286,
1077,
2150,
2368,
25,
22301,
284,
5708,
6135,
486,
2893,
486,
84917,
1428,
1789,
286,
1077,
1833,
58035,
284,
2278,
310,
320,
37804,
4286,
7,
15,
701,
2150,
2368,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_term() {
let mut p = make_parser_with(r#"{{true}}"#);
p.next();
let t = p.term();
// broken for now
assert!(t.is_ok());
let t = t.unwrap();
assert!(t.is_some());
let t = t.unwrap();
assert_eq!(t.typ(), &NodeType::Bool);
... | rust_cleaned_test_functions.jsonl/8632 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 528
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17464,
368,
341,
286,
1077,
5206,
281,
284,
1281,
18517,
6615,
2601,
55543,
2979,
1866,
23386,
2,
317,
286,
281,
4529,
543,
286,
1077,
259,
284,
281,
47770,
543,
286,
442,
10865,
369,
1431,
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... | 3 |
#[test]
fn test_is_f64(){
let json_value = Json::from_str("12").unwrap();
assert!(!json_value.is_f64());
let json_value = Json::from_str("-12").unwrap();
assert!(!json_value.is_f64());
let json_value = Json::from_str("12.0").unwrap();
assert!(json_value.is_f64()... | rust_cleaned_test_functions.jsonl/22748 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 212
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
761,
21,
19,
3032,
286,
1077,
2951,
3142,
284,
8308,
486,
1499,
2895,
445,
16,
17,
1827,
15454,
543,
286,
2060,
0,
3471,
2236,
3142,
2079,
761,
21,
19,
5231,
286,
1077,
2951,
3142,
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_propose_before_split_and_merge() {
let mut cluster = new_node_cluster(0, 3);
let pd_client = cluster.pd_client.clone();
pd_client.disable_default_operator();
cluster.run();
cluster.must_transfer_leader(1, new_peer(1, 1));
cluster.must_put(b"k", b"v");
let propose_bat... | rust_cleaned_test_functions.jsonl/50885 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 954
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21663,
960,
23708,
17052,
8378,
20888,
368,
341,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
220,
18,
317,
262,
1077,
7744,
8179,
284,
10652,
556,
67,
8179,
15997,
543,
262,
7744,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parsing_text_with_byte_order_mark() {
let mut parser = Parser::new();
parser.set_language(get_language("rust")).unwrap();
// Parse UTF16 text with a BOM
let tree = parser
.parse_utf16(
&"\u{FEFF}fn a() {}".encode_utf16().collect::<Vec<_>>(),
None,... | rust_cleaned_test_functions.jsonl/15862 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 900
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
28598,
4326,
6615,
19737,
7869,
18924,
368,
341,
262,
1077,
5206,
6729,
284,
21102,
486,
931,
543,
262,
6729,
980,
29021,
5433,
29021,
445,
35788,
15197,
15454,
1428,
262,
442,
14775,
20076,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_recovers_from_invalid_dynamic_config() {
let dynamic_config = make_temp_file(|writer| write!(writer, "invalid"));
let rule = rule!("test.com" => "test.com", "/a" => "/b");
{
let (builder, _) = RewriteManagerBuilder::new(Some(&dynamic_config)).unwrap_err();
... | rust_cleaned_test_functions.jsonl/46496 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 403
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7080,
8969,
5673,
31433,
45992,
5332,
368,
341,
286,
1077,
8741,
5332,
284,
1281,
11771,
2458,
22428,
18189,
91,
3270,
10297,
18189,
11,
330,
11808,
4010,
286,
1077,
5912,
284,
5912,
17223,
1944,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_minus_real() {
let test_cases = vec![
(
Real::new(1.01001).ok(),
Real::new(-0.01).ok(),
Real::new(1.02001).ok(),
false,
),
(
Real::new(f64::MIN).ok(),
Real:... | rust_cleaned_test_functions.jsonl/78964 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 696
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38457,
15266,
368,
341,
286,
1077,
1273,
41427,
284,
7486,
90515,
310,
2399,
394,
8800,
486,
931,
7,
16,
13,
15,
16,
15,
15,
16,
568,
562,
3148,
394,
8800,
486,
931,
4080,
15,
13,
15,
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... | 3 |
#[test]
fn test_pool_acquire_order_no_timeout() {
let disposed = Arc::new(AtomicCounter::default());
let dcopy = disposed.clone();
let mut pool = counter_pool_config()
.dispose(move |_res, _| {
dcopy.increment();
})
.build()
.unwrap();
block_on(async ... | rust_cleaned_test_functions.jsonl/99432 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 445
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15709,
97523,
7869,
6536,
20537,
368,
341,
262,
1077,
25574,
284,
19689,
486,
931,
7,
65857,
14099,
486,
2258,
1423,
262,
1077,
294,
8560,
284,
25574,
15997,
543,
262,
1077,
5206,
7314,
284,
5546,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_serve_rpc() -> Result<()> {
let server = make_arc_test_server();
let reply = dispatch(
server,
"echo".to_string(),
RequestMessage::from_static(&[0x08, 0x07]),
)?;
assert_eq!(ReplyMessage::from_static(&[0x07, 0x08]), reply);
... | rust_cleaned_test_functions.jsonl/112196 | {
"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,
643,
5852,
60799,
368,
1464,
5714,
71698,
341,
286,
1077,
3538,
284,
1281,
62914,
4452,
12015,
1428,
286,
1077,
9851,
284,
6845,
1006,
310,
3538,
345,
310,
330,
3047,
3263,
983,
3904,
3148,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_bank_fees_account() {
let (mut genesis_config, _) = create_genesis_config(500);
genesis_config.fee_calculator.lamports_per_signature = 12345;
let bank = Arc::new(Bank::new(&genesis_config));
let fees_account = bank.get_account(&sysvar::fees::id()).unwrap();
... | rust_cleaned_test_functions.jsonl/42420 | {
"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,
35733,
761,
5516,
13500,
368,
341,
286,
1077,
320,
6984,
59366,
5332,
11,
27439,
284,
1855,
16322,
13774,
5332,
7,
20,
15,
15,
317,
286,
59366,
5332,
833,
2127,
24005,
20022,
918,
309,
3394,
567... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_js_doc_tag_serialization() {
assert_eq!(
serde_json::to_value(JsDocTag::Callback {
name: "Predicate".to_string(),
doc: None,
})
.unwrap(),
json!({
"kind": "callback",
"name": "Predicate",
})
);
assert_eq!(
serde_json... | rust_cleaned_test_functions.jsonl/119533 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2152
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26250,
18869,
9372,
25602,
2022,
368,
341,
262,
2060,
10714,
33673,
414,
61570,
9455,
486,
983,
3142,
16368,
82,
9550,
5668,
486,
7494,
341,
286,
829,
25,
330,
36329,
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... | 1 |
#[test]
fn test_is_unified() {
let storage = StorageReadPoolConfig {
use_unified_pool: Some(false),
..Default::default()
};
assert!(!storage.use_unified_pool());
let coprocessor = CoprReadPoolConfig::default();
assert!(coprocessor.use_unified_pool(... | rust_cleaned_test_functions.jsonl/2142 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 326
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
4907,
1870,
368,
341,
286,
1077,
5819,
284,
14693,
4418,
10551,
2648,
341,
310,
990,
4907,
1870,
15709,
25,
4329,
3576,
1326,
310,
5241,
3675,
486,
2258,
741,
286,
2605,
286,
2060,
0,
3471... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bank_new_no_parent() {
solana_logger::setup();
let (genesis_block, _) = GenesisBlock::new(10_000);
let bank = Bank::new(&genesis_block);
trace!("get balance {}", genesis_block.mint_id);
let bal = bank.get_balance(&genesis_block.mint_id);
trace!("do... | rust_cleaned_test_functions.jsonl/41878 | {
"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,
35733,
5921,
6536,
15960,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
320,
77894,
7113,
11,
27439,
284,
40788,
4713,
486,
931,
7,
16,
15,
62,
15,
15,
15,
317,
286,
1077,
6073... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_part2() {
assert_eq!(solve(&as_input(INPUT)).1, 32);
assert_eq!(solve(&as_input(INPUT2)).1, 126);
} | rust_cleaned_test_functions.jsonl/82251 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 78
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10495,
17,
368,
341,
286,
2060,
10714,
10297,
59419,
2099,
300,
5898,
57911,
4579,
16,
11,
220,
18,
17,
317,
286,
2060,
10714,
10297,
59419,
2099,
300,
5898,
57911,
17,
4579,
16,
11,
220,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_apply_without_alpha_rgba() {
let mut rgba = Rgba([0, 0, 0, 0]);
rgba.apply_without_alpha(|s| s + 1);
assert_eq!(rgba, Rgba([1, 1, 1, 0]));
} | rust_cleaned_test_functions.jsonl/46642 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 107
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36551,
39904,
26633,
95229,
368,
341,
286,
1077,
5206,
23524,
284,
431,
56380,
2561,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
2558,
286,
23524,
13045,
39904,
26633,
22428,
82,
91,
274,
488,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_status_service_fail_endpoints_can_trigger_fails() {
let _guard = fail::FailScenario::setup();
let temp_dir = tempfile::TempDir::new().unwrap();
let mut status_server = StatusServer::new(
1,
ConfigController::default(),
Arc::new(Security... | rust_cleaned_test_functions.jsonl/6917 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 768
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4773,
12267,
22121,
6213,
7706,
27421,
32925,
761,
6209,
368,
341,
286,
1077,
716,
26098,
284,
3690,
486,
19524,
54031,
486,
15188,
543,
286,
1077,
2730,
4334,
284,
54819,
486,
12151,
6184,
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... | 2 |
#[test]
fn test_read_array() {
assert_eq!(from_str("["), Err(SyntaxError(EOFWhileParsingValue, 1, 2)));
assert_eq!(from_str("[1"), Err(SyntaxError(EOFWhileParsingArray, 1, 3)));
assert_eq!(from_str("[1,"), Err(SyntaxError(EOFWhileParsingValue, 1, 4)));
assert_eq!(from_st... | rust_cleaned_test_functions.jsonl/6547 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 600
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
3858,
368,
341,
286,
2060,
10714,
10297,
1499,
2895,
445,
1183,
701,
257,
15495,
93549,
1454,
7,
23483,
7983,
68839,
1130,
11,
220,
16,
11,
220,
17,
4945,
286,
2060,
10714,
10297,
1499,
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_begin_end() {
let _executor = fasync::Executor::new().expect("unable to create executor");
let tmp_dir = TempDir::new().expect("should have created tempdir");
let file_path = tmp_dir.path().join("tmp_file");
let tmp_file = File::create(&file_path).expect("should h... | rust_cleaned_test_functions.jsonl/113585 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 944
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23338,
6213,
368,
341,
286,
1077,
716,
80787,
284,
282,
7692,
486,
25255,
486,
931,
1005,
17119,
445,
45928,
311,
1855,
31558,
797,
286,
1077,
4174,
4334,
284,
19944,
6184,
486,
931,
1005,
17119,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parsing_https() {
let svcb = parse_record("crypto.cloudflare.com. 299 IN HTTPS 1 . alpn=h2, ipv4hint=162.159.135.79,162.159.136.79, echconfig=\"/gkAQwATY2xvdWRmbGFyZS1lc25pLmNvbQAgUbBtC3UeykwwE6C87TffqLJ/1CeaAvx3iESGyds85l8AIAAEAAEAAQAAAAA=\" ipv6hint=2606:4700:7::a29f:874f,2606:4700:7::... | rust_cleaned_test_functions.jsonl/62129 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 244
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
28598,
26817,
368,
341,
286,
1077,
13559,
7221,
284,
4715,
14192,
445,
35772,
38299,
905,
13,
220,
17,
24,
24,
1964,
61044,
220,
16,
659,
452,
19958,
54113,
17,
11,
45475,
19,
46125,
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_not_applicable_cursor_position() {
check_assist_not_applicable(introduce_named_lifetime, r#"impl Cursor<'_><|> {"#);
check_assist_not_applicable(introduce_named_lifetime, r#"impl Cursor<|><'_> {"#);
} | rust_cleaned_test_functions.jsonl/109552 | {
"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,
7913,
8191,
46114,
28601,
9661,
368,
341,
286,
1779,
12083,
380,
7913,
8191,
46114,
1548,
47845,
71834,
98827,
11,
435,
55543,
6383,
28067,
18291,
62,
1784,
91,
29,
5212,
2,
317,
286,
1779,
12083,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_option() {
let value: Option<string::String> = super::decode("null").unwrap();
assert_eq!(value, None);
let value: Option<string::String> = super::decode("\"jodhpurs\"").unwrap();
assert_eq!(value, Some("jodhpurs".into_string()));
} | rust_cleaned_test_functions.jsonl/6555 | {
"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,
15227,
9672,
368,
341,
286,
1077,
897,
25,
6959,
4947,
486,
703,
29,
284,
2256,
486,
18196,
445,
2921,
1827,
15454,
543,
286,
2060,
10714,
10297,
957,
11,
2240,
626,
286,
1077,
897,
25,
6959,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mac_parsing() {
for test in wycheproof::mac::TestName::all() {
let _kat = wycheproof::mac::TestSet::load(test).unwrap();
}
} | rust_cleaned_test_functions.jsonl/5837 | {
"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,
22802,
620,
28598,
368,
341,
262,
369,
1273,
304,
289,
5641,
747,
75636,
486,
11948,
486,
2271,
675,
486,
541,
368,
341,
286,
1077,
716,
33755,
284,
289,
5641,
747,
75636,
486,
11948,
486,
2271,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_dep() {
let array = [0xA, 0xB, 0xC, 0xD, 0xE, 0xF];
let data = Data {
twentyone: 21u64,
twentytwo: 22u64,
twentythree: 23u64,
twentyfour: 24u64,
twentyfive: 25u32,
array: &array,
};
assert_eq!... | rust_cleaned_test_functions.jsonl/21192 | {
"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,
49258,
368,
341,
286,
1077,
1334,
284,
508,
15,
14673,
11,
220,
15,
14377,
11,
220,
15,
12125,
11,
220,
15,
15764,
11,
220,
15,
12606,
11,
220,
15,
9770,
935,
286,
1077,
821,
284,
2885,
341,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_safe_head() {
let rope: Rope = Rope::from_str("foo");
let res = safe_head(rope);
assert_eq!(res, Some(('f', Rope::from_str("oo"))));
} | rust_cleaned_test_functions.jsonl/20278 | {
"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,
34067,
13138,
368,
341,
262,
1077,
33420,
25,
97896,
284,
97896,
486,
1499,
2895,
445,
7975,
797,
262,
1077,
592,
284,
6092,
13138,
78009,
375,
317,
262,
2060,
10714,
10297,
416,
11,
4329,
45675,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bomful_invalid_utf8_to_cow_without_bom_handling_and_without_replacement() {
assert!(UTF_8
.decode_without_bom_handling_and_without_replacement(
b"\xEF\xBB\xBF\xE2\x82\xAC\x80\xC3\xA4"
)
.is_none());
} | rust_cleaned_test_functions.jsonl/90262 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 176
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
880,
316,
1262,
31433,
39453,
23,
2346,
666,
363,
39904,
880,
316,
75642,
8378,
39904,
1288,
16101,
368,
341,
286,
2060,
10297,
8561,
62,
23,
198,
310,
659,
18196,
39904,
880,
316,
75642,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_debug_local() {
let vi = get_version_info!();
let s = format!("{:?}", vi);
assert_eq!(
s,
"VersionInfo { crate_name: \"rustc_tools_util\", major: 0, minor: 2, patch: 0 }"
);
} | rust_cleaned_test_functions.jsonl/19653 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 140
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15446,
13564,
368,
341,
286,
1077,
3275,
284,
633,
9438,
3109,
0,
543,
286,
1077,
274,
284,
3561,
88928,
25,
52652,
3275,
317,
286,
2060,
10714,
33673,
310,
274,
345,
310,
330,
5637,
1731,
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... | 1 |
#[test]
fn test_lddw() {
test_interpreter_and_jit_asm!(
"
lddw r0, 0x1122334455667788
exit",
[],
(),
{ |_vm, res: Result| { res.unwrap() == 0x1122334455667788 } },
2
);
} | rust_cleaned_test_functions.jsonl/58991 | {
"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,
50573,
29406,
368,
341,
262,
1273,
15318,
28637,
8378,
5374,
275,
67529,
33673,
286,
6228,
286,
326,
631,
86,
435,
15,
11,
220,
15,
87,
16,
16,
17,
17,
18,
18,
19,
19,
20,
20,
21,
21,
22,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_decimal_str() {
assert_eq!(U256::from_decimal_str(""), Err(ParseError::Empty));
assert_eq!(U256::from_decimal_str("0"), Ok(U256::ZERO));
assert_eq!(U256::from_decimal_str("00"), Ok(U256::ZERO));
assert_eq!(U256::from_decimal_str("00000000000000000000000000000... | rust_cleaned_test_functions.jsonl/68066 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 642
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
74429,
2895,
368,
341,
286,
2060,
10714,
10297,
52,
17,
20,
21,
486,
1499,
74429,
2895,
86076,
15495,
71812,
1454,
486,
3522,
1106,
286,
2060,
10714,
10297,
52,
17,
20,
21,
486,
1499,
7442... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_file_reader_into_iter_project() {
let path = get_test_path("alltypes_plain.parquet");
let result = vec![path]
.iter()
.map(|p| SerializedFileReader::try_from(p.as_path()).unwrap())
.flat_map(|r| {
let schema = "message schema { ... | rust_cleaned_test_functions.jsonl/27259 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 403
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
22306,
45514,
11723,
16352,
368,
341,
286,
1077,
1815,
284,
633,
4452,
2638,
445,
541,
9242,
41015,
33277,
23300,
797,
286,
1077,
1102,
284,
7486,
20703,
2343,
921,
310,
659,
2015,
741,
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_poll_timeouts_if_source_has_no_events() {
let source = FakeSource::default();
let mut reader = InternalEventReader {
events: VecDeque::new(),
source: Some(Box::new(source)),
};
assert!(!reader
.poll(Some(Duration::from_secs(0)... | rust_cleaned_test_functions.jsonl/101473 | {
"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,
40002,
3009,
11672,
11119,
10347,
21778,
6536,
19691,
368,
341,
286,
1077,
2530,
284,
36965,
3608,
486,
2258,
1428,
286,
1077,
5206,
6604,
284,
15412,
1556,
5062,
341,
310,
4357,
25,
11312,
73891,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sum_of_potentials() {
let left_image = [[1, 9].to_vec(), [5, 6].to_vec()].to_vec();
let right_image = [[6, 3].to_vec(), [6, 6].to_vec()].to_vec();
let mut diffusion_graph = DiffusionGraph::initialize(left_image, right_image, 2, 1.);
diffusion_graph.potentials[0][0... | rust_cleaned_test_functions.jsonl/70576 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 541
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10160,
3575,
57952,
8476,
368,
341,
286,
1077,
2115,
4954,
284,
4318,
16,
11,
220,
24,
936,
983,
13251,
1507,
508,
20,
11,
220,
21,
936,
983,
13251,
57590,
983,
13251,
543,
286,
1077,
1290,
49... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_inc_multiple() {
for i in 0..250 {
let source = "+".repeat(i);
let instructions = Parser::parse_instructions(&Parser::parse_string(source.as_str()));
assert_eq!(instructions, vec![Instruction::INC(1); i]);
}
} | rust_cleaned_test_functions.jsonl/56691 | {
"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,
21039,
31285,
45233,
368,
341,
262,
369,
600,
304,
220,
15,
496,
17,
20,
15,
341,
286,
1077,
2530,
284,
6630,
3263,
30624,
1956,
317,
286,
1077,
11221,
284,
21102,
486,
6400,
82427,
2099,
6570,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parse_css_border_1() {
assert_eq!(
parse_style_border("5px solid red"),
Ok(StyleBorderSide {
border_width: PixelValue::px(5.0),
border_style: BorderStyle::Solid,
border_color: ColorU {
r: 255,
... | rust_cleaned_test_functions.jsonl/114000 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 293
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
25924,
31940,
62,
16,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
15117,
31940,
445,
20,
1767,
6437,
2518,
4461,
310,
7622,
7,
2323,
10691,
16384,
341,
394,
3886,
7927,
25,
27469,
1130,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_new_expression() {
expect_printed("new MyClass()", "new MyClass();\n");
expect_printed("new MyClass(a, b, c)", "new MyClass(a, b, c);\n");
expect_printed("new function() {}()", "new function() {}();\n");
expect_printed("new a.b.c(e)", "new a.b.c(e);\n");
expect_printed("new a... | rust_cleaned_test_functions.jsonl/93445 | {
"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,
5921,
28068,
368,
341,
262,
1720,
10064,
291,
445,
931,
83826,
50514,
330,
931,
83826,
2129,
59,
77,
797,
262,
1720,
10064,
291,
445,
931,
83826,
2877,
11,
293,
11,
272,
11583,
330,
931,
83826,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_collect_root_ancestors() {
{
let mut graph = graph::CachedStableGraph::new();
let idx0 = graph.add_node(&("0".to_string().into()));
let idx1 = graph.add_node(&("1".to_string().into()));
let idx2 = graph.add_node(&("2".to_string().into()));
let idx3 = ... | rust_cleaned_test_functions.jsonl/56154 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3277
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68140,
12993,
62,
681,
267,
1087,
368,
341,
262,
341,
286,
1077,
5206,
4771,
284,
4771,
486,
70293,
623,
480,
11212,
486,
931,
1428,
286,
1077,
7187,
15,
284,
4771,
1364,
5084,
2099,
445,
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_hash_url() {
let specifier = deno_core::resolve_url(
"data:application/javascript,console.log(\"Hello%20Deno\");",
)
.unwrap();
assert_eq!(hash_url(&specifier, &MediaType::JavaScript), "data:///d300ea0796bd72b08df10348e0b70514c021f2e45bfe59cec24e12e97cd79c58.js");
} | rust_cleaned_test_functions.jsonl/2837 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 146
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
2903,
368,
341,
262,
1077,
97616,
284,
3371,
78,
15467,
486,
17325,
2903,
1006,
414,
330,
691,
25,
5132,
9837,
11,
5354,
1665,
36014,
9707,
4,
17,
15,
35,
11790,
59,
5038,
756,
262,
1727... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_max_encoded_bytes_size() {
let n = bytes::ENC_GROUP_SIZE;
let tbl: Vec<(usize, usize)> = vec![
(0, n + 1 + number::U64_SIZE),
(n / 2, n + 1 + number::U64_SIZE),
(n, 2 * (n + 1) + number::U64_SIZE),
];
for (x, y) in tbl {
... | rust_cleaned_test_functions.jsonl/79736 | {
"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,
6345,
73069,
12524,
2368,
368,
341,
286,
1077,
308,
284,
5820,
486,
16226,
20130,
4098,
280,
286,
1077,
21173,
25,
11312,
28706,
51878,
11,
22301,
16018,
284,
7486,
90515,
310,
320,
15,
11,
308,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_1() {
let inp = "start-A
start-b
A-c
A-b
b-d
A-end
b-end";
let parsed = input_generator(inp);
assert_eq!(solve_part1(&parsed), 10);
} | rust_cleaned_test_functions.jsonl/115634 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 107
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
16,
368,
341,
286,
1077,
32344,
284,
330,
2468,
6691,
198,
2468,
1455,
198,
32,
1786,
198,
32,
1455,
198,
65,
1737,
198,
32,
13068,
198,
65,
13068,
876,
286,
1077,
15676,
284,
1946,
25813,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_valid_separator() {
assert_eq!(is_valid_separator(b'_'), true);
assert_eq!(is_valid_separator(b'\''), true);
assert_eq!(is_valid_separator(b'0'), false);
assert_eq!(is_valid_separator(128), false);
} | rust_cleaned_test_functions.jsonl/88903 | {
"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,
6892,
8337,
58204,
368,
341,
286,
2060,
10714,
10297,
285,
8337,
58204,
1883,
36777,
4567,
830,
317,
286,
2060,
10714,
10297,
285,
8337,
58204,
1883,
6,
10169,
4567,
830,
317,
286,
2060,
10714,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_no_city() {
let res = ",1997,20.5".parse::<Climate>();
assert_eq!(res, Err(ParseClimateError::NoCity));
assert_eq!(res.unwrap_err().to_string(), "no city name");
} | rust_cleaned_test_functions.jsonl/10205 | {
"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,
6536,
24971,
368,
341,
286,
1077,
592,
284,
3670,
16,
24,
24,
22,
11,
17,
15,
13,
20,
3263,
6400,
27638,
82046,
3913,
286,
2060,
10714,
10297,
416,
11,
15495,
71812,
82046,
1454,
486,
2753,
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 |
#[test]
fn test_regions() {
// No regions provided should return error.
assert_eq!(
format!("{:?}", GuestMemory::new(&vec![]).err().unwrap()),
format!("{:?}", Error::NoMemoryRegions)
);
let start_addr1 = GuestAddress(0x0);
let start_addr2 = GuestA... | rust_cleaned_test_functions.jsonl/35877 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 446
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58035,
368,
341,
286,
442,
2308,
13604,
3897,
1265,
470,
1465,
624,
286,
2060,
10714,
33673,
310,
3561,
88928,
25,
52652,
26215,
10642,
486,
931,
2099,
4083,
0,
1294,
568,
615,
1005,
15454,
14702,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rename_for_macro_args() {
test_rename(
r#"
macro_rules! foo {($i:ident) => {$i} }
fn main() {
let a<|> = "test";
foo!(a);
}"#,
"b",
r#"
macro_rules! foo {($i:ident) => {$i} }
fn main() {
let b = "test";
... | rust_cleaned_test_functions.jsonl/16209 | {
"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,
79399,
5478,
58810,
8384,
368,
341,
286,
1273,
79399,
1006,
310,
435,
2,
698,
262,
18072,
21407,
0,
15229,
314,
699,
72,
25,
1713,
8,
589,
13924,
72,
92,
456,
262,
5168,
1887,
368,
341,
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_tokenize_simplified() {
let sentence = "人人生而自由﹐在尊严和权利上一律平等。他们赋有理性和良心﹐并应以兄弟关系的精神互相对待。";
let tokens = vec![
"人人", "生", "而", "自由", "在", "尊严", "和", "权利", "上", "一律", "平等", "他们",
"赋", "有理", "性", "和", "良心", "并", "应", "以", "兄弟", "关系", "的", "精神",
"互相", "对待",
];
assert_eq!(tokens, tokeniz... | rust_cleaned_test_functions.jsonl/64484 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 296
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86508,
643,
73837,
368,
341,
197,
10217,
11652,
284,
330,
17340,
101986,
68536,
101972,
123930,
238,
18493,
112201,
33108,
102445,
17447,
109929,
105987,
1773,
99650,
100970,
18830,
21887,
105178,
111770,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decrypting_files_with_short_ciphertext() {
let kp1 = KeyPair::from_secret("000081c29e8142bb6a81bef5a92bda7a8328a5c85bb2f9542e76f9b0f94fc018".parse().unwrap()).unwrap();
let kp2 = KeyPair::from_secret("00fa7b3db73dc7dfdf8c5fbdb796d741e4488628c41fc4febd9160a866ba0f35".parse().unwrap()).unwra... | rust_cleaned_test_functions.jsonl/16264 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 466
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
80764,
287,
10931,
6615,
16673,
666,
45043,
368,
341,
1572,
10217,
60319,
16,
284,
5309,
12443,
486,
1499,
21962,
445,
15,
15,
15,
15,
23,
16,
66,
17,
24,
68,
23,
16,
19,
17,
6066,
21,
64,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_8xy5_sub_assign_with_borrow() {
let mut machine = Machine::new(TestContext::new());
machine.register_set(0xB, 0xA);
machine.register_set(0xC, 0xD);
machine.test_opcode(0x8BC5);
assert_eq!(machine.register_get(0xB), 0xAu8.wrapping_sub(0xD));
// Should not affect... | rust_cleaned_test_functions.jsonl/127963 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 230
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
23,
4130,
20,
5228,
20688,
6615,
880,
7768,
368,
341,
262,
1077,
5206,
5662,
284,
12960,
486,
931,
31159,
1972,
486,
931,
1423,
1066,
262,
5662,
9929,
2602,
7,
15,
14377,
11,
220,
15,
1467... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_current_user_guild_member() {
let route = Route::GetCurrentUserGuildMember { guild_id: GUILD_ID };
assert_eq!(
route.to_string(),
format!("users/@me/guilds/{guild_id}/member", guild_id = GUILD_ID)
)
} | rust_cleaned_test_functions.jsonl/119927 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 142
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
11080,
3317,
1889,
1498,
19388,
368,
341,
286,
1077,
6021,
284,
9572,
486,
62981,
1474,
72574,
9366,
314,
26411,
842,
25,
479,
18023,
3450,
2605,
286,
2060,
10714,
33673,
310,
6021,
2389,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_symbol() {
let arena = Arena::new();
assert_syntaxes(
&parse(&arena, ".foo", &lang()),
&[Syntax::new_atom(
&arena,
vec![SingleLineSpan {
line: 0.into(),
start_col: 0,
... | rust_cleaned_test_functions.jsonl/52646 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 303
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
21179,
368,
341,
286,
1077,
24902,
284,
27047,
486,
931,
1428,
286,
2060,
78894,
288,
1006,
310,
609,
6400,
2099,
30527,
11,
5933,
7975,
497,
609,
5205,
14702,
310,
44590,
33890,
486,
931,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rent_eager_pubkey_range_noop_range() {
let test_map = map_to_test_bad_range();
let range = Bank::pubkey_range_from_partition((0, 0, 3));
assert_eq!(
range,
Pubkey::new_from_array([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x... | rust_cleaned_test_functions.jsonl/2546 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1533
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
83127,
2204,
1409,
34014,
792,
9698,
6536,
453,
9698,
368,
341,
286,
1077,
1273,
5376,
284,
2415,
2346,
4452,
34199,
9698,
1428,
286,
1077,
2088,
284,
8547,
486,
9585,
792,
9698,
5673,
43840,
1188... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_scan_black_four() {
let result = Sequence::scan(Black, Four, 0b0011110, 0b0100000, 7, 0);
let expected = [Sequence::new(1, 5, Some(5), None)];
assert_eq!(result, expected);
let result = Sequence::scan(Black, Four, 0b0101110, 0b0010000, 7, 0);
let expected... | rust_cleaned_test_functions.jsonl/56139 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1064
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28857,
40272,
56142,
368,
341,
286,
1077,
1102,
284,
28871,
486,
16405,
7,
14417,
11,
13322,
11,
220,
15,
65,
15,
15,
16,
16,
16,
16,
15,
11,
220,
15,
65,
15,
16,
15,
15,
15,
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_new() {
let bv = BitVec::new(5);
assert_eq!(
bv.iter().collect::<Vec<bool>>(),
vec![false, false, false, false, false]
);
assert_eq!(bv.count_ones(), 0);
assert_eq!(bv.count_zeros(), 5);
} | rust_cleaned_test_functions.jsonl/128587 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 160
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
368,
341,
286,
1077,
56937,
284,
6495,
10050,
486,
931,
7,
20,
317,
286,
2060,
10714,
33673,
310,
56937,
19471,
1005,
17384,
27638,
10050,
17028,
2452,
3148,
310,
7486,
20703,
3849,
11,
895,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_nat_config() {
let expected_subnet_lifip =
LifIpAddr { address: "192.168.0.0".parse().unwrap(), prefix: 24 };
let expected_lifip = LifIpAddr { address: "17.0.0.1".parse().unwrap(), prefix: 32 };
let ip: IpAddr = "192.168.0.0".parse().unwrap();
let... | rust_cleaned_test_functions.jsonl/52758 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1597
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
38169,
5332,
368,
341,
286,
1077,
3601,
95681,
907,
333,
573,
4035,
310,
64763,
23378,
13986,
314,
2621,
25,
330,
16,
24,
17,
13,
16,
21,
23,
13,
15,
13,
15,
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... | 4 |
#[test]
fn test_compiled_literals() {
assert::is_true(
"
def f():
return [[]]
y = f()
y.append(1)
y == [[],1]",
);
assert::is_true(
"
def f():
return {1:2}
y = f()
y[3] = 4
y == {1:2, 3:4}",
);
// This test breaks if we compile constants deep compile the literals
... | rust_cleaned_test_functions.jsonl/92429 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18177,
2181,
49643,
368,
341,
262,
2060,
486,
285,
16082,
1006,
286,
6228,
750,
282,
3932,
262,
470,
84507,
921,
88,
284,
282,
741,
88,
2057,
7,
16,
340,
88,
621,
4318,
1125,
16,
45016,
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_multi_arg_method_ordering() -> TestResult {
let mut p = Polar::new();
p.load_str(
r#"bar(2, 1);
bar(1, 1);
bar(1, 2);
bar(2, 2);"#,
)?;
qvars(
&mut p,
"bar(a, b)",
&["a", "b"],
values![[2, 1], [1, 1], [1, 2]... | rust_cleaned_test_functions.jsonl/97614 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 221
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25133,
6057,
9032,
7869,
287,
368,
1464,
3393,
2077,
341,
262,
1077,
5206,
281,
284,
55896,
486,
931,
543,
262,
281,
5104,
2895,
1006,
286,
435,
55543,
2257,
7,
17,
11,
220,
16,
317,
1843,
361... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ignore_too_many_messages_in_ihave() {
let config = GossipsubConfigBuilder::default()
.max_ihave_messages(10)
.max_ihave_length(10)
.build()
.unwrap();
//build gossipsub with full mesh
let (mut gs, _, topics) = inject_nodes1(... | rust_cleaned_test_functions.jsonl/66939 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1708
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58493,
2346,
78,
22101,
23428,
1243,
5318,
19016,
368,
341,
286,
1077,
2193,
284,
479,
41473,
1966,
2648,
3297,
486,
2258,
741,
310,
659,
2810,
5318,
19016,
23428,
7,
16,
15,
340,
310,
659,
2810... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_kdtree_search() {
let m = Matrix::new(5, 2, vec![1., 2.,
8., 0.,
6., 10.,
3., 6.,
0., 3.]);
let mut tree = KDTree::new(3);
... | rust_cleaned_test_functions.jsonl/114538 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 837
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4698,
8047,
765,
10716,
368,
341,
286,
1077,
296,
284,
11631,
486,
931,
7,
20,
11,
220,
17,
11,
7486,
20703,
16,
2572,
220,
17,
38088,
11070,
220,
23,
2572,
220,
15,
38088,
11070,
220,
21,
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_content_type_colliions() {
assert!(mt_mt_collide("application/json", "application/json"));
assert!(mt_mt_collide("*/json", "application/json"));
assert!(mt_mt_collide("*/*", "application/json"));
assert!(mt_mt_collide("application/*", "application/json"));
... | rust_cleaned_test_functions.jsonl/67666 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 387
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7495,
1819,
10211,
742,
908,
368,
341,
286,
2060,
10297,
2501,
65944,
43597,
577,
445,
5132,
8931,
497,
330,
5132,
8931,
4010,
286,
2060,
10297,
2501,
65944,
43597,
577,
445,
1812,
2236,
497,
330,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_concurrent_write_error() {
let dir = tempfile::Builder::new()
.prefix("test_concurrent_write_error")
.tempdir()
.unwrap();
let cfg = Config {
dir: dir.path().to_str().unwrap().to_owned(),
bytes_per_sync: ReadableSize::kb(1024),
target_file_... | rust_cleaned_test_functions.jsonl/55361 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1356
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3382,
3231,
9165,
4096,
368,
341,
262,
1077,
5419,
284,
54819,
486,
3297,
486,
931,
741,
286,
659,
11849,
445,
1944,
3382,
3231,
9165,
4096,
1138,
286,
659,
3888,
3741,
741,
286,
659,
15454,
543... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_get_header_type_with_commit() {
let header = [0x63, 0x6F, 0x6D, 0x6D, 0x69, 0x74, 32u8, 0x31, 0x35, 0x0];
assert_eq!(Object::Commit, get_header_type(&header));
} | rust_cleaned_test_functions.jsonl/108328 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
8757,
1819,
6615,
36346,
368,
341,
286,
1077,
4247,
284,
508,
15,
87,
21,
18,
11,
220,
15,
87,
21,
37,
11,
220,
15,
87,
21,
35,
11,
220,
15,
87,
21,
35,
11,
220,
15,
87,
21,
24,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fair_reads() {
let (tx, rx) = futures::sync::mpsc::channel(10);
let (trigger, tripwire) = Tripwire::new();
let dir = tempdir().unwrap();
let config = file::FileConfig {
include: vec![dir.path().join("*")],
start_at_beginning: true,
... | rust_cleaned_test_functions.jsonl/13347 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 950
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
1310,
66628,
368,
341,
286,
1077,
320,
3998,
11,
19111,
8,
284,
36823,
486,
12996,
486,
1307,
2388,
486,
10119,
7,
16,
15,
317,
286,
1077,
320,
18468,
11,
8411,
35531,
8,
284,
26754,
3553... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rejects_empty_exception_fields() {
let mut processor = NormalizeProcessor::new(Arc::new(StoreConfig::default()), None);
let mut exception = Annotated::new(Exception {
value: Annotated::new("".to_string().into()),
ty: Annotated::new("".to_string()),
..Default::def... | rust_cleaned_test_functions.jsonl/14078 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 191
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
583,
82,
15124,
17499,
12132,
368,
341,
262,
1077,
5206,
17654,
284,
68092,
22946,
486,
931,
4346,
1287,
486,
931,
7,
6093,
2648,
486,
2258,
11858,
2240,
626,
262,
1077,
5206,
4683,
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... | 1 |
#[test]
fn test_treesitter_indent_rust_2() {
test_treesitter_indent("indent.rs", "source.rust");
// Currently this fails because we can't align the parameters of a closure yet
} | rust_cleaned_test_functions.jsonl/18666 | {
"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,
75791,
3248,
69045,
1710,
590,
62,
17,
368,
341,
262,
1273,
75791,
3248,
69045,
445,
32840,
25638,
497,
330,
2427,
1746,
590,
797,
1066,
262,
442,
24150,
419,
14525,
1576,
582,
646,
944,
5285,
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 |
#[test]
fn test_in_memory_write() -> anyhow::Result<()> {
let schema = Arc::new(DataSchema::new(vec![
DataField::new("col_i", DataType::Int64, false),
DataField::new("col_s", DataType::String, false),
]));
let col0 = Series::new(vec![0 as i64, 1, 2]);
let... | rust_cleaned_test_functions.jsonl/115548 | {
"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,
1243,
19195,
9165,
368,
1464,
88964,
486,
2077,
71698,
341,
286,
1077,
10802,
284,
19689,
486,
931,
18959,
8632,
486,
931,
25592,
90515,
310,
2885,
1877,
486,
931,
445,
2074,
5318,
497,
33172,
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_params_from_route() {
let mut request = Request::new().with_route("/test/route/query?arg1=1&arg2=2".to_string());
let params: HashMap<String, String> = [("arg1".to_string(), "1".to_string()),
("arg2".to_string(), "2".to_string())]
... | rust_cleaned_test_functions.jsonl/60431 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 237
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6745,
5673,
28109,
368,
341,
262,
1077,
5206,
1681,
284,
6145,
486,
931,
1005,
4197,
28109,
4283,
1944,
7382,
2133,
66762,
30,
858,
16,
28,
16,
5,
858,
17,
28,
17,
3263,
983,
3904,
1423,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_small_packet() {
let tx = test_tx();
let mut packet = sigverify::make_packet_from_transaction(tx);
packet.data[0] = 0xff;
packet.data[1] = 0xff;
packet.meta.size = 2;
let res = sigverify::do_get_packet_offsets(&packet, 0);
assert_eq!(res,... | rust_cleaned_test_functions.jsonl/22073 | {
"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,
31966,
21078,
368,
341,
286,
1077,
9854,
284,
1273,
17805,
543,
286,
1077,
5206,
10151,
284,
8366,
12446,
486,
6927,
21078,
5673,
28884,
27301,
626,
286,
10151,
2196,
58,
15,
60,
284,
220,
15,
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_open_sync() {
use std::io::prelude::*;
let tmp = tempfile::tempdir().unwrap();
let dir = tmp.path().to_owned();
crate::write_sync(&dir, "my-key", b"hello world").unwrap();
let mut handle = crate::SyncReader::open(&dir, "my-key").unwrap();
let mut ... | rust_cleaned_test_functions.jsonl/64593 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 216
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11311,
23008,
368,
341,
286,
990,
1460,
486,
815,
486,
1726,
52538,
56162,
286,
1077,
4174,
284,
54819,
486,
3888,
3741,
1005,
15454,
543,
286,
1077,
5419,
284,
4174,
3875,
1005,
983,
51973,
543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_clean_and_unclean_slot() {
let mut index = AccountsIndex::<bool>::default();
assert_eq!(0, index.uncleaned_roots.len());
index.add_root(1);
assert_eq!(1, index.uncleaned_roots.len());
index.clean_dead_slot(1);
assert_eq!(0, index.uncleaned_roots.le... | rust_cleaned_test_functions.jsonl/20860 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 156
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19573,
8378,
76576,
2675,
27563,
368,
341,
286,
1077,
5206,
1922,
284,
40655,
1552,
27638,
2641,
6831,
2258,
543,
286,
2060,
10714,
10297,
15,
11,
1922,
13,
1347,
2675,
291,
26608,
2412,
19406,
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_two_channel() {
let commands = super::channels_to_commands(
&vec![
"trades.BTC-26MAR21.raw".to_string(),
"ticker.BTC-26MAR21.100ms".to_string(),
],
true,
);
assert_eq!(2, commands.len());
assert_e... | rust_cleaned_test_functions.jsonl/133008 | {
"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,
23241,
14571,
368,
341,
286,
1077,
11293,
284,
2256,
486,
32425,
2346,
44151,
1006,
310,
609,
4083,
90515,
394,
330,
376,
3452,
1785,
7749,
12,
17,
21,
60661,
17,
16,
18152,
3263,
983,
3904,
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... | 1 |
#[test]
fn test_variable_sized_nulls() {
let array =
StringArray::from(vec![Some("a"), Some("bc"), None, Some("defh")]).data();
let arrays = vec![array.as_ref()];
let mut mutable = MutableArrayData::new(arrays, false, 0);
mutable.extend(0, 1, 3);
let result... | rust_cleaned_test_functions.jsonl/102339 | {
"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,
14635,
643,
1506,
15162,
82,
368,
341,
286,
1077,
1334,
4035,
310,
923,
1857,
486,
1499,
25592,
20703,
8373,
445,
64,
3975,
4329,
445,
8904,
3975,
2240,
11,
4329,
445,
750,
71,
899,
10697,
691,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_primary_expression_identifier_reference() {
assert_parse_success!(
primary_expression(false, false),
"abc123",
Expression::Identifier {
loc: Some(((1, 0), (1, 6)).into()),
name: "abc123".to_string()
}
);
} | rust_cleaned_test_functions.jsonl/66469 | {
"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,
45314,
28068,
33176,
25433,
368,
341,
262,
2060,
21039,
18632,
33673,
286,
6028,
28068,
3576,
11,
895,
1326,
286,
330,
13683,
16,
17,
18,
756,
286,
16378,
486,
8714,
341,
310,
1329,
25,
4329,
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 |
#[test]
fn test_parse_valid_s3_get_bucket_policy() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"s3-get-bucket-policy.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let c... | rust_cleaned_test_functions.jsonl/29199 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 250
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
8337,
643,
18,
3062,
38749,
22773,
368,
341,
286,
1077,
7860,
9655,
284,
14563,
2582,
5062,
486,
878,
9655,
1006,
310,
330,
1944,
35569,
79372,
14,
1891,
756,
310,
330,
82,
18,
22491,
145... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_u64_leading_zero_bytes() {
proptest!(niters(2000), |(x in any::<u64>())| {
prop_assert_eq!(u64_leading_zero_bytes_ref(x), u64_leading_zero_bytes(x));
});
} | rust_cleaned_test_functions.jsonl/97281 | {
"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,
7300,
21,
19,
11751,
2228,
19359,
12524,
368,
341,
286,
462,
70334,
10297,
44068,
388,
7,
17,
15,
15,
15,
701,
760,
7,
87,
304,
894,
27638,
84,
21,
19,
92783,
91,
341,
310,
2004,
16553,
1071... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_null_array_slice() {
let array1 = NullArray::new(32);
let array2 = array1.slice(8, 16);
assert_eq!(array2.len(), 16);
assert_eq!(array2.null_count(), 16);
assert_eq!(array2.offset(), 8);
} | rust_cleaned_test_functions.jsonl/29645 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 128
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15162,
3858,
26488,
368,
341,
286,
1077,
1334,
16,
284,
18084,
1857,
486,
931,
7,
18,
17,
626,
286,
1077,
1334,
17,
284,
1334,
16,
14530,
7,
23,
11,
220,
16,
21,
317,
286,
2060,
10714,
10297... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.