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_append_invalid_blocks() {
let mut rng: StdRng = SeedableRng::from_seed([1u8; 32]);
let mut ledger_db = create_db();
let account_key = AccountKey::random(&mut rng);
let (origin_block, origin_block_contents) = get_origin_block_and_contents(&account_key);
/... | rust_cleaned_test_functions.jsonl/118281 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1410
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26041,
31433,
25201,
368,
341,
286,
1077,
5206,
28422,
25,
42517,
49,
968,
284,
35822,
480,
49,
968,
486,
1499,
33809,
2561,
16,
84,
23,
26,
220,
18,
17,
2558,
286,
1077,
5206,
46933,
8685,
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_persisted_dht() {
let log = NullLoggerBuilder.build().unwrap();
let store: HotColdDB<
MinimalEthSpec,
MemoryStore<MinimalEthSpec>,
MemoryStore<MinimalEthSpec>,
> = HotColdDB::open_ephemeral(StoreConfig::default(), ChainSpec::minimal(), ... | rust_cleaned_test_functions.jsonl/76980 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 456
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
4975,
291,
814,
426,
368,
341,
286,
1077,
1487,
284,
18084,
7395,
3297,
13239,
1005,
15454,
543,
286,
1077,
3553,
25,
8007,
76418,
3506,
30558,
310,
75112,
65390,
8327,
345,
310,
13850,
6093,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bad_workers_values() {
// Take the lock so changing the environment doesn't cause races.
let _env_lock = ENV_LOCK.lock().unwrap();
env::remove_var(CONFIG_ENV);
assert!(FullConfig::parse(r#"
[development]
workers = true
"#.to_string... | rust_cleaned_test_functions.jsonl/54709 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 480
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34199,
43557,
9146,
368,
341,
286,
442,
11778,
279,
5296,
773,
10018,
279,
4573,
3171,
944,
5240,
20588,
624,
286,
1077,
716,
3160,
9818,
284,
32791,
27661,
21003,
1005,
15454,
543,
286,
6105,
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_get_schema_none() {
let mut transaction_context = MockTransactionContext::default();
let state = TrackAndTraceState::new(&mut transaction_context);
let result = state.get_schema("not_an_schema").unwrap();
assert!(result.is_none())
} | rust_cleaned_test_functions.jsonl/116992 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 116
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
25371,
31488,
368,
341,
286,
1077,
5206,
7745,
8467,
284,
14563,
8070,
1972,
486,
2258,
543,
286,
1077,
1584,
284,
19785,
3036,
6550,
1397,
486,
931,
2099,
6984,
7745,
8467,
626,
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 |
#[test]
fn test_accepting_nan(){
assert_eq!(
WeightedIndex::new(&[core::f32::NAN, 0.5]).unwrap_err(),
WeightedError::InvalidWeight,
);
assert_eq!(
WeightedIndex::new(&[core::f32::NAN]).unwrap_err(),
WeightedError::InvalidWeight,
);
... | rust_cleaned_test_functions.jsonl/86248 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 396
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35728,
287,
73936,
3032,
286,
2060,
10714,
33673,
310,
16516,
291,
1552,
486,
931,
2099,
58,
2153,
486,
69,
18,
17,
486,
45,
1093,
11,
220,
15,
13,
20,
10697,
15454,
9266,
3148,
310,
16516,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_find_floki_yaml_sibling() -> Result<(), Error> {
let tmp_dir = tempdir::TempDir::new("")?;
let floki_yaml_path = tmp_dir.path().join("src/floki.yaml");
touch_file(&floki_yaml_path)?;
assert!(find_floki_yaml(&tmp_dir.path().join("include")).is_err());
Ok(()... | rust_cleaned_test_functions.jsonl/69267 | {
"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,
21814,
761,
385,
6642,
64380,
96328,
368,
1464,
5714,
68843,
4600,
29,
341,
286,
1077,
4174,
4334,
284,
2730,
3741,
486,
12151,
6184,
486,
931,
39047,
37445,
286,
1077,
9744,
6642,
64380,
2638,
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... | 3 |
#[test]
fn test_clone_path() {
let home = Path::new("/src");
[
(
"https://github.com/influxdata/influxdb2-sample-data.git",
"/src/github.com/influxdata/influxdb2-sample-data",
),
(
"https://github.com/influxdata/... | rust_cleaned_test_functions.jsonl/117918 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 866
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54742,
2638,
368,
341,
286,
1077,
2114,
284,
7933,
486,
931,
4283,
3548,
797,
286,
2278,
310,
2399,
394,
330,
2428,
1110,
5204,
905,
17996,
36706,
691,
17996,
36706,
1999,
17,
83879,
13945,
32799,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_all_tables() -> common_exception::Result<()> {
// prepare test data
let mut fake_apis = FakeStoreApis::new();
fake_apis.insert_db(0, "test");
fake_apis.insert_tbl("test", TableInfo {
id: 0,
ver: 0,
name: "t1".to_string(),
schema: Arc::new(DataS... | rust_cleaned_test_functions.jsonl/59318 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 544
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
5705,
35632,
368,
1464,
4185,
17499,
486,
2077,
71698,
341,
262,
442,
10549,
1273,
821,
198,
262,
1077,
5206,
12418,
62,
13725,
284,
36965,
6093,
91121,
486,
931,
543,
262,
12418,
62,
13725,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_shabal384_hash_bytes() {
let bytes = b"password";
let hash = Shabal384Hasher.hash((), bytes).unwrap();
assert_eq!("673f98958f04371edad63fe095e6903fdf894324b9944f36a6828e2b8b6dd2f4986cd4a61e29bf2866f021bbbaa02e8a", hash.as_hex());
} | rust_cleaned_test_functions.jsonl/65768 | {
"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,
3712,
62794,
18,
23,
19,
8950,
12524,
368,
341,
286,
1077,
5820,
284,
293,
1,
3833,
3302,
286,
1077,
5175,
284,
1417,
62794,
18,
23,
19,
6370,
261,
15101,
7,
1507,
5820,
568,
15454,
1428,
286,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bittestandset() {
unsafe {
let mut a = 0b0101_0000i32;
assert_eq!(_bittestandset(&mut a as _, 4), 1);
assert_eq!(_bittestandset(&mut a as _, 4), 1);
assert_eq!(_bittestandset(&mut a as _, 5), 0);
assert_eq!(_bittestandset(&mut a... | rust_cleaned_test_functions.jsonl/46671 | {
"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,
880,
14267,
437,
746,
368,
341,
286,
19860,
341,
310,
1077,
5206,
264,
284,
220,
15,
65,
15,
16,
15,
16,
62,
15,
15,
15,
15,
72,
18,
17,
280,
310,
2060,
10714,
0,
2490,
65,
14267,
437,
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_named_struct() {
let test_data: Vec<u8> = [
0xFF,
0b1001_0110,
0xAA,
0xBB,
0xCC,
0xDD,
0b1001_0110,
0xCC,
0xDD,
0x02,
0xBE,
0xEF,
]
.to_vec();
// Read
let ret_read = samples::Name... | rust_cleaned_test_functions.jsonl/123224 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 615
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71834,
15126,
368,
341,
262,
1077,
1273,
1769,
25,
11312,
34837,
23,
29,
284,
2278,
286,
220,
15,
9264,
345,
286,
220,
15,
65,
16,
15,
15,
16,
62,
15,
16,
16,
15,
345,
286,
220,
15,
60051,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lerp() {
let c1 = XyY::new(0.3, 0.1, 0.6);
let c2 = XyY::new(0.8, 0.2, 0.6);
assert_relative_eq!(c1.lerp(&c2, 0.00), c1);
assert_relative_eq!(c1.lerp(&c2, 1.00), c2);
assert_relative_eq!(c1.lerp(&c2, 0.50), XyY::new(0.55, 0.15, 0.6));
} | rust_cleaned_test_functions.jsonl/67707 | {
"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,
907,
22632,
368,
341,
286,
1077,
272,
16,
284,
1599,
88,
56,
486,
931,
7,
15,
13,
18,
11,
220,
15,
13,
16,
11,
220,
15,
13,
21,
317,
286,
1077,
272,
17,
284,
1599,
88,
56,
486,
931,
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_assert_token() {
assert!(assert_token(Some("a"), "a").is_ok());
assert!(assert_token(Some("a"), "b").is_err());
assert!(assert_token(None, "b").is_err());
} | rust_cleaned_test_functions.jsonl/37568 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 100
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16553,
6458,
368,
341,
286,
2060,
10297,
2207,
6458,
65405,
445,
64,
3975,
330,
64,
1827,
285,
19817,
1423,
286,
2060,
10297,
2207,
6458,
65405,
445,
64,
3975,
330,
65,
1827,
285,
9266,
1423,
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 |
#[test]
fn test_serde_hashmap_reader() {
let mut map = HashMap::new();
map.insert(SmolStr::new("a"), SmolStr::new("ohno"));
let s = serde_json::to_string(&map).unwrap();
let _s: HashMap<SmolStr, SmolStr> =
serde_json::from_reader(std::io::Cursor::new(s)).unwrap();
... | rust_cleaned_test_functions.jsonl/106854 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 159
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75861,
450,
8950,
2186,
22306,
368,
341,
286,
1077,
5206,
2415,
284,
10528,
486,
931,
543,
286,
2415,
7030,
3759,
44344,
2580,
486,
931,
445,
64,
3975,
4388,
337,
2580,
486,
931,
445,
2267,
2152... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_peekable() {
let path = TempDir::new("test-raftstore").unwrap();
let engine = new_temp_engine(&path);
let mut r = Region::new();
r.set_id(10);
r.set_start_key(b"key0".to_vec());
r.set_end_key(b"key4".to_vec());
let store = new_peer_storage(... | rust_cleaned_test_functions.jsonl/37247 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 574
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
29107,
480,
368,
341,
286,
1077,
1815,
284,
19944,
6184,
486,
931,
445,
1944,
12,
2944,
4314,
1827,
15454,
543,
286,
1077,
4712,
284,
501,
11771,
24823,
2099,
2343,
317,
286,
1077,
5206,
435... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_load_words() {
let w = load_pgpwords();
assert_eq!(w.len(), 2);
assert_eq!(w[0][0], "adroitness");
assert_eq!(w[1][0], "aardvark");
assert_eq!(w[0][255], "yucatan");
assert_eq!(w[1][255], "zulu");
} | rust_cleaned_test_functions.jsonl/132782 | {
"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,
12411,
18981,
368,
341,
286,
1077,
289,
284,
2795,
620,
21888,
5761,
543,
286,
2060,
10714,
10297,
86,
19406,
1507,
220,
17,
317,
286,
2060,
10714,
10297,
86,
58,
15,
1457,
15,
1125,
330,
89676,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_pos() {
// The empty string is an error
assert!(parse_pos("").is_err());
// Zero is an error
let res = parse_pos("0");
assert!(res.is_err());
assert_eq!(res.unwrap_err().to_string(), "illegal list value: \"0\"",);
let res = parse_po... | rust_cleaned_test_functions.jsonl/34698 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1887
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
6479,
368,
341,
286,
442,
576,
4287,
914,
374,
458,
1465,
198,
286,
2060,
10297,
6400,
6479,
80821,
285,
9266,
5231,
286,
442,
18306,
374,
458,
1465,
198,
286,
1077,
592,
284,
4715,
6479,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ver_forces_meta_enabled() {
assert!(!ver_forces_meta_enabled(Version::V1));
assert!(!ver_forces_meta_enabled(Version::V2));
assert!(!ver_forces_meta_enabled(Version::V3));
assert!(ver_forces_meta_enabled(Version::V17));
assert!(ver_forces_meta_enabled(Version::V18));
asse... | rust_cleaned_test_functions.jsonl/107026 | {
"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,
26042,
5478,
1603,
13381,
18220,
368,
341,
262,
2060,
0,
3471,
423,
5478,
1603,
13381,
18220,
7,
5637,
486,
53,
16,
1106,
262,
2060,
0,
3471,
423,
5478,
1603,
13381,
18220,
7,
5637,
486,
53,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_wasted_bit_decode() {
let mut output = [0; 4];
let constant = Subframe {
data: subframe::Data::Constant(1),
wasted_bits: 10,
};
decode(&constant, 4, &mut output);
assert_eq!(&output, &[1024, 1024, 1024, 1024]);
} | rust_cleaned_test_functions.jsonl/61779 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1670,
15036,
13996,
15227,
368,
341,
262,
1077,
5206,
2550,
284,
508,
15,
26,
220,
19,
4821,
262,
1077,
6783,
284,
3719,
6763,
341,
414,
821,
25,
1186,
6763,
486,
1043,
486,
15472,
7,
16,
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... | 1 |
#[test]
fn test_deserialize() {
let p = Packet::deserialize(&vec![
SOP,
0b00010010,
0x00,
Device::SomeDevice1 as u8,
Command::SomeCommand1 as u8,
22,
1,
123,
EOP
]);
println!("{:?}... | rust_cleaned_test_functions.jsonl/43361 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 236
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
9050,
368,
341,
286,
1077,
281,
284,
28889,
486,
66777,
2099,
4083,
90515,
310,
86507,
345,
310,
220,
15,
65,
15,
15,
15,
16,
15,
15,
16,
15,
345,
310,
220,
15,
87,
15,
15,
345,
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_search_artist() {
let mut oauth = SpotifyOAuth::default().scope("user-read-private").build();
match get_token(&mut oauth) {
Some(token_info) => {
let client_credential = SpotifyClientCredentials::default()
.token_info(token_info)
.build... | rust_cleaned_test_functions.jsonl/79276 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 323
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10716,
66840,
368,
341,
262,
1077,
5206,
46415,
284,
40537,
57850,
486,
2258,
1005,
4186,
445,
872,
28806,
65277,
1827,
5834,
543,
262,
2432,
633,
6458,
2099,
6984,
46415,
8,
341,
286,
4329,
13274... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_nodeid() -> Result<(), Box<dyn std::error::Error>> {
let mut cmd = Command::cargo_bin(BIN_NAME)?;
cmd.arg("nodeid")
.arg("--pubkey")
.arg("cde8fbf86c44e4ed2095f83b6f3c97b7aec55a77e06e843f8b9ffeab66ad4b32");
cmd.assert()
.success()
.stdout(predicate::st... | rust_cleaned_test_functions.jsonl/118322 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 523
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5084,
307,
368,
1464,
5714,
68843,
8261,
92846,
1460,
486,
841,
486,
1454,
2452,
341,
262,
1077,
5206,
5439,
284,
7348,
486,
66715,
21816,
5349,
687,
4708,
40007,
262,
5439,
21186,
445,
3509,
307,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_json_basic_with_nulls() {
let builder = ReaderBuilder::new().infer_schema(None).with_batch_size(64);
let mut reader: Reader<File> = builder
.build::<File>(File::open("test/data/basic_nulls.json").unwrap())
.unwrap();
let batch = reader.next().unwra... | rust_cleaned_test_functions.jsonl/22587 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1065
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
34729,
6615,
15162,
82,
368,
341,
286,
1077,
7363,
284,
25166,
3297,
486,
931,
1005,
89559,
25371,
26717,
568,
4197,
14534,
2368,
7,
21,
19,
317,
286,
1077,
5206,
6604,
25,
25166,
52014,
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_buffered_stream() {
struct S;
impl io::Writer for S {
fn write(&mut self, _: &[u8]) -> io::IoResult<()> { Ok(()) }
}
impl io::Reader for S {
fn read(&mut self, _: &mut [u8]) -> io::IoResult<uint> {
Err(io::standard_error(i... | rust_cleaned_test_functions.jsonl/52988 | {
"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,
7776,
291,
12673,
368,
341,
286,
2036,
328,
401,
286,
11605,
6399,
486,
6492,
369,
328,
341,
310,
5168,
3270,
2099,
6984,
656,
11,
58536,
44590,
84,
23,
2467,
1464,
6399,
486,
42799,
2077,
71698... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_construct_subtree_three_siblings() {
// x
// [4; 32] c y
// z b [3; 32]
// node a [2; 32]
let key = b"hello".test_only_hash();
let blob = AccountStateBlob::from(b"world".to_vec());
let leaf_hash = hash_... | rust_cleaned_test_functions.jsonl/15411 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 525
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64803,
5228,
9344,
50016,
643,
24229,
368,
341,
262,
442,
394,
856,
7213,
262,
442,
414,
508,
19,
26,
220,
18,
17,
60,
272,
256,
379,
7213,
262,
442,
394,
1147,
256,
293,
508,
18,
26,
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_find_labels() {
check(
r#"
fn foo<'a>() -> &'a () {
'a: loop {
'b: loop {
continue 'a<|>;
}
break 'a;
}
}
"#,
expect![[r#"
'a Label FileId(0) 29..32 29..31 Lifetime
FileId(0) 80..82 Lifet... | rust_cleaned_test_functions.jsonl/79347 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 260
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
14547,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
8822,
15229,
18291,
64,
13555,
1464,
30136,
64,
1719,
341,
262,
364,
64,
25,
6337,
341,
286,
364,
65,
25,
6337,
341,
310,
3060,
364,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_skip_constraint_check() {
let engine = TestEngineBuilder::new().build().unwrap();
let (key, value) = (b"key", b"value");
must_prewrite_put(&engine, key, value, key, 5);
must_commit(&engine, key, 5, 10);
let ctx = Context::default();
let snapshot ... | rust_cleaned_test_functions.jsonl/35962 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 667
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44830,
46973,
7200,
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,
3071,
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_encode_decode_utf8_string_invalid() {
let bytes = b"\x80\xae".to_vec();
let src = unsafe { String::from_utf8_unchecked(bytes) };
let doc = doc!{ "key": src };
let mut buf = Vec::new();
encode_document(&mut buf, &doc).unwrap();
let expected = doc!{ "key": "��" };
le... | rust_cleaned_test_functions.jsonl/69699 | {
"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,
11224,
15227,
39453,
23,
3904,
31433,
368,
341,
262,
1077,
5820,
284,
293,
11934,
87,
23,
15,
3462,
5918,
3263,
983,
13251,
543,
262,
1077,
2286,
284,
19860,
314,
923,
486,
1499,
39453,
23,
4907... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ec_mul() {
let input = &hex_decode("089142debb13c461f61523586a60732d8b69c5b38a3380a74da7b2961d867dbf2d5fc7bbc013c16d7945f190b232eacc25da675c0eb093fe6b9f1b4b4e107b36ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff").unwrap();
let output = hex_decode("0bf982b98a2757878c051b... | rust_cleaned_test_functions.jsonl/51968 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1145
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36844,
24944,
368,
341,
262,
1077,
1946,
284,
609,
17308,
15227,
445,
15,
23,
24,
16,
19,
17,
450,
6066,
16,
18,
66,
19,
21,
16,
69,
21,
16,
20,
17,
18,
20,
23,
21,
64,
21,
15,
22,
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_add_full_ipv4() {
let event = DhcpEvent::LeaseAdded {
event_timestamp: DateTime::<FixedOffset>::from(Local::now()),
lease_info: full_lease_info_v4(),
};
assert_script_result_equal(event);
} | rust_cleaned_test_functions.jsonl/48439 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 131
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
16372,
49378,
19,
368,
341,
286,
1077,
1538,
284,
43227,
4672,
1556,
486,
2304,
519,
19337,
341,
310,
1538,
23073,
25,
6520,
27638,
13520,
6446,
6831,
1499,
42718,
486,
3328,
14702,
310,
250... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_temperature_converter_from_kelvin_to_celsius() {
let conv = TemperatureConverter::new(300.0, TemperatureUnit::Kelvin);
let res = conv.convert(TemperatureUnit::Celsius);
assert!(res.is_ok());
let res = res.unwrap();
assert!(is_close(26.85, res.scalar()), "... | rust_cleaned_test_functions.jsonl/76288 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 185
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53525,
74073,
5673,
59222,
9603,
2346,
666,
40247,
368,
341,
286,
1077,
5686,
284,
37022,
14920,
486,
931,
7,
18,
15,
15,
13,
15,
11,
37022,
4562,
486,
84599,
9603,
317,
286,
1077,
592,
284,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_packet_new() {
let p = Packet::new(Action::SERVER_TIME, &[]);
assert_eq!(1i16, p.event_size);
assert_eq!(&Action::SERVER_TIME, &p.action);
assert_eq!(&[] as &[u8], &p.data[..]);
assert_eq!(&[0x01, 0x00, 0xC6], &p.as_bytes()[..]);
let p = Packet::n... | rust_cleaned_test_functions.jsonl/54648 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 320
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21078,
5921,
368,
341,
286,
1077,
281,
284,
28889,
486,
931,
21905,
486,
12915,
10051,
11,
609,
56703,
286,
2060,
10714,
10297,
16,
72,
16,
21,
11,
281,
5773,
2368,
317,
286,
2060,
10714,
0,
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_rollback_while_other_transaction_running() {
let engine = TestEngineBuilder::new().build().unwrap();
let (k, v) = (b"k1", b"v1");
must_prewrite_put_async_commit(&engine, k, v, k, &Some(vec![]), 10, 0);
must_cleanup(&engine, k, 15, 0);
must_commit(&engine,... | rust_cleaned_test_functions.jsonl/16095 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1286
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
33559,
86069,
30456,
28884,
37333,
368,
341,
286,
1077,
4712,
284,
3393,
4571,
3297,
486,
931,
1005,
5834,
1005,
15454,
543,
286,
1077,
320,
74,
11,
348,
8,
284,
320,
65,
62911,
16,
497,
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_mutex_arc_condvar() {
let arc = Arc::new((Mutex::new(false), Condvar::new()));
let arc2 = arc.clone();
let (tx, rx) = channel();
spawn(move|| {
// wait until parent gets in
rx.recv();
let &(ref lock, ref cvar) = &*arc2;
... | rust_cleaned_test_functions.jsonl/49615 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 340
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14204,
62914,
24433,
947,
368,
341,
286,
1077,
15580,
284,
19689,
486,
931,
1188,
38099,
486,
931,
3576,
701,
44826,
947,
486,
931,
7392,
286,
1077,
15580,
17,
284,
15580,
15997,
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... | 3 |
#[test]
fn test_zeroize_client_login_start() -> Result<(), ProtocolError> {
let mut client_rng = OsRng;
let client_login_start_result = ClientLogin::<RistrettoSha5123dhNoSlowHash>::start(
&mut client_rng,
STR_PASSWORD.as_bytes(),
ClientLoginStartParameters::default(),
)?;
... | rust_cleaned_test_functions.jsonl/27847 | {
"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,
19359,
551,
8179,
13681,
4906,
368,
1464,
5714,
68843,
24572,
1454,
29,
341,
262,
1077,
5206,
2943,
66849,
284,
15433,
49,
968,
280,
262,
1077,
2943,
13681,
4906,
5287,
284,
8423,
6231,
27638,
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... | 3 |
#[test]
fn test_uses_index_on_second_iteration() {
let mut encoder: Encoder = Encoder::new();
let headers = vec![(b"custom-key".to_vec(), b"custom-value".to_vec())];
let _ = encoder.encode_for_test(headers.iter().map(|h| (&h.0[..], &h.1[..])));
// Encode the same header... | rust_cleaned_test_functions.jsonl/121975 | {
"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,
62,
4776,
3560,
4470,
29644,
62772,
368,
341,
286,
1077,
5206,
23668,
25,
55115,
284,
55115,
486,
931,
543,
286,
1077,
7102,
284,
7486,
0,
9697,
65,
1,
9163,
16173,
3263,
983,
13251,
1507,
293,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_waiter_notify() {
let (waiter, lock_info, f) = new_test_waiter(10.into(), 20.into(), 20);
waiter.notify();
expect_key_is_locked(f.wait().unwrap().unwrap(), lock_info);
// A waiter can conflict with other transactions more than once.
for conflict_times in ... | rust_cleaned_test_functions.jsonl/32484 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 728
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18760,
261,
36654,
368,
341,
286,
1077,
320,
11489,
261,
11,
5296,
3109,
11,
282,
8,
284,
501,
4452,
18760,
261,
7,
16,
15,
39860,
1507,
220,
17,
15,
39860,
1507,
220,
17,
15,
317,
286,
6716... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_established_send_fin() {
let mut s = socket_established();
s.send_slice(b"abcdef").unwrap();
send!(s, TcpRepr {
control: TcpControl::Fin,
seq_number: REMOTE_SEQ + 1,
ack_number: Some(LOCAL_SEQ + 1),
..SEND_TEMPL
});
... | rust_cleaned_test_functions.jsonl/1730 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 327
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18583,
5102,
291,
13565,
39737,
368,
341,
286,
1077,
5206,
274,
284,
7575,
18583,
5102,
291,
543,
286,
274,
5219,
26488,
1883,
1,
41202,
1827,
15454,
543,
286,
3624,
10297,
82,
11,
64876,
693,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dim_after_const_duplicate_definition() {
let program = r#"
CONST A = "hello"
DIM A AS STRING
"#;
assert_linter_err!(program, QError::DuplicateDefinition, 3, 17);
} | rust_cleaned_test_functions.jsonl/122455 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 116
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10791,
19844,
13610,
70434,
31698,
368,
341,
262,
1077,
2025,
284,
435,
2,
698,
310,
29602,
362,
284,
330,
14990,
698,
310,
50859,
362,
5752,
35255,
198,
310,
5869,
280,
262,
2060,
907,
2245,
92... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_size() {
let b = Box3D::from_size(size3(30.0, 40.0, 50.0));
assert!(b.min == Point3D::zero());
assert!(b.size().width == 30.0);
assert!(b.size().height == 40.0);
assert!(b.size().depth == 50.0);
} | rust_cleaned_test_functions.jsonl/7484 | {
"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,
5673,
2368,
368,
341,
286,
1077,
293,
284,
8261,
18,
35,
486,
1499,
2368,
6856,
18,
7,
18,
15,
13,
15,
11,
220,
19,
15,
13,
15,
11,
220,
20,
15,
13,
15,
1106,
286,
2060,
10297,
65,
4358,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_flow_control() {
// Disable CDC sink memory quota.
let (_server, client, mut task_rx) = new_rpc_suite();
// Create a event feed stream.
let (mut tx, mut rx) = client.event_feed().unwrap();
let mut req = ChangeDataRequest {
region_id: 1,
... | rust_cleaned_test_functions.jsonl/32183 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1076
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27441,
13436,
368,
341,
286,
442,
28027,
39309,
19309,
4938,
42042,
624,
286,
1077,
5453,
4030,
11,
2943,
11,
5206,
3383,
24330,
8,
284,
501,
60799,
57239,
543,
286,
442,
4230,
264,
1538,
5395,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_floor() {
let cases = vec![
("12345", "12345"),
("0.99999", "0"),
("-0.99999", "-1"),
("18446744073709551615", "18446744073709551615"),
("18446744073709551616", "18446744073709551616"),
("-18446744073709551615", "-18... | rust_cleaned_test_functions.jsonl/13672 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 500
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60044,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
3489,
16,
17,
18,
19,
20,
497,
330,
16,
17,
18,
19,
20,
4461,
310,
3489,
15,
13,
24,
24,
24,
24,
24,
497,
330,
15,
4461,
310,
986... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ident() {
assert_eq!(ident(b"abcde").unwrap().1, "abcde");
assert_eq!(ident(b"hello1").unwrap().1, "hello1");
assert_eq!(ident(b"hell_o").unwrap().1, "hell_o");
assert!(ident(b"12a").is_err());
} | rust_cleaned_test_functions.jsonl/68319 | {
"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,
38399,
368,
341,
286,
2060,
10714,
10297,
1713,
1883,
1,
13683,
450,
1827,
15454,
1005,
16,
11,
330,
13683,
450,
797,
286,
2060,
10714,
10297,
1713,
1883,
1,
14990,
16,
1827,
15454,
1005,
16,
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_approximate_float() {
assert_eq!(Ratio::from_f32(0.5f32), Some(Ratio::new(1i64, 2)));
assert_eq!(Ratio::from_f64(0.5f64), Some(Ratio::new(1i32, 2)));
assert_eq!(Ratio::from_f32(5f32), Some(Ratio::new(5i64, 1)));
assert_eq!(Ratio::from_f64(5f64), Some(Ratio::new(5i... | rust_cleaned_test_functions.jsonl/824 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1167
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
90425,
3426,
17586,
368,
341,
286,
2060,
10714,
10297,
22777,
486,
1499,
761,
18,
17,
7,
15,
13,
20,
69,
18,
17,
701,
4329,
2785,
6266,
486,
931,
7,
16,
72,
21,
19,
11,
220,
17,
4945,
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_hidden_prob_calc_active_connect() {
let mut network_config = NetworkConfig::new(
NetworkIdentifier::new(b"some_ssid".to_vec(), SecurityType::None),
Credential::None,
false,
)
.expect("Failed to create network config");
network_... | rust_cleaned_test_functions.jsonl/114361 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 395
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26739,
20794,
38241,
12930,
15720,
368,
341,
286,
1077,
5206,
3922,
5332,
284,
8141,
2648,
486,
931,
1006,
310,
8141,
8714,
486,
931,
1883,
1,
14689,
643,
21027,
3263,
983,
13251,
1507,
8234,
929,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compare_and_swap() {
let mut io_loop = Runtime::new().unwrap();
let (bg, mut client, origin) = create_sig0_ready_client(&mut io_loop);
// create a record
let mut record = Record::with(
Name::from_str("new.example.com").unwrap(),
RecordType::A,
Duration::m... | rust_cleaned_test_functions.jsonl/33940 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 897
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32235,
8378,
40991,
368,
341,
262,
1077,
5206,
6399,
17198,
284,
10954,
486,
931,
1005,
15454,
543,
262,
1077,
320,
12220,
11,
5206,
2943,
11,
6238,
8,
284,
1855,
29252,
15,
35456,
8179,
2099,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_contract_upgrade() {
let (master_account, _contract_account) = init();
master_account
.call(
accounts(0).to_string(),
"stage_upgrade",
&EVM_WASM_BYTES,
DEFAULT_GAS,
0,
)
.assert_success();
master_acco... | rust_cleaned_test_functions.jsonl/95435 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 300
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51499,
67794,
368,
341,
262,
1077,
320,
13629,
13500,
11,
716,
20257,
13500,
8,
284,
2930,
543,
262,
7341,
13500,
198,
286,
659,
6659,
1006,
310,
9618,
7,
15,
568,
983,
3904,
3148,
310,
330,
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_validate_rules() {
let mut kb = KnowledgeBase::new();
kb.register_constant(
sym!("Fruit"),
term!(Value::ExternalInstance(ExternalInstance {
instance_id: 1,
constructor: None,
repr: None
})),
... | rust_cleaned_test_functions.jsonl/39055 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1512
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
21407,
368,
341,
286,
1077,
5206,
38653,
284,
31925,
3978,
486,
931,
543,
286,
38653,
9929,
34967,
1006,
310,
7886,
17223,
37,
21026,
4461,
310,
4647,
10297,
1130,
486,
25913,
2523,
7,
2591... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_query_account_request() {
let msg =
QueryAccountRequest::new("cosmos1fknpjldck6n3v2wu86arpz8xjnfc60f99ylcjd".to_string());
let proto = msg.to_proto();
let decoded = QueryAccountRequest::from_proto(&proto).unwrap();
assert_eq!(msg, decoded);
} | rust_cleaned_test_functions.jsonl/105264 | {
"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,
5738,
13500,
7893,
368,
341,
286,
1077,
3750,
4035,
310,
11361,
7365,
1900,
486,
931,
445,
9407,
8631,
16,
41718,
62245,
507,
377,
21,
77,
18,
85,
17,
65465,
23,
21,
7876,
89,
23,
87,
93808,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_activity_secrets() {
let value = ActivitySecrets {
join: Some("a".to_owned()),
match_: Some("b".to_owned()),
spectate: Some("c".to_owned()),
};
serde_test::assert_tokens(
&value,
&[
Token::Struct... | rust_cleaned_test_functions.jsonl/67838 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 492
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30026,
3453,
52710,
368,
341,
286,
1077,
897,
284,
14981,
19773,
82,
341,
310,
5138,
25,
4329,
445,
64,
3263,
983,
51973,
14702,
310,
2432,
23211,
4329,
445,
65,
3263,
983,
51973,
14702,
310,
94... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_recording_for_structs() {
#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)]
struct R(u32);
#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)]
struct S {
a: u32,
}
#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)]
str... | rust_cleaned_test_functions.jsonl/23934 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 519
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3142,
7080,
2678,
5478,
15126,
82,
368,
341,
262,
11506,
27098,
3759,
9050,
11,
48440,
11,
55039,
11,
33122,
11,
11091,
11,
27913,
5563,
262,
2036,
431,
8154,
18,
17,
317,
262,
11506,
27098,
375... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_to_vote_instruction() {
let vote = Vote::default();
let mut decision = SwitchForkDecision::FailedSwitchThreshold;
assert!(decision
.to_vote_instruction(vote.clone(), &Pubkey::default(), &Pubkey::default())
.is_none());
decision = SwitchFork... | rust_cleaned_test_functions.jsonl/77014 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 510
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
54360,
54923,
368,
341,
286,
1077,
6910,
284,
34034,
486,
2258,
543,
286,
1077,
5206,
5480,
284,
15586,
37,
669,
74846,
486,
9408,
16837,
37841,
280,
286,
2060,
10297,
63938,
198,
310,
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_geo_invalid_p() {
assert!(Geometric::new(core::f64::NAN).is_err());
assert!(Geometric::new(core::f64::INFINITY).is_err());
assert!(Geometric::new(core::f64::NEG_INFINITY).is_err());
assert!(Geometric::new(-0.5).is_err());
assert!(Geometric::new(0.0).is_ok... | rust_cleaned_test_functions.jsonl/9273 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 213
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60308,
31433,
620,
368,
341,
286,
2060,
10297,
9499,
23375,
486,
931,
47867,
486,
69,
21,
19,
486,
45,
1093,
568,
285,
9266,
1423,
286,
2060,
10297,
9499,
23375,
486,
931,
47867,
486,
69,
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_user_playlist_remove_specific_occurrenes_of_tracks() {
let mut oauth = SpotifyOAuth::default()
.scope("playlist-modify-private playlist-modify-public")
.build();
match get_token(&mut oauth) {
Some(token_info) => {
let client_credential = SpotifyClientC... | rust_cleaned_test_functions.jsonl/79292 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1073
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3317,
69267,
18193,
56592,
57291,
843,
4873,
3575,
66953,
368,
341,
262,
1077,
5206,
46415,
284,
40537,
57850,
486,
2258,
741,
286,
659,
4186,
445,
34233,
17078,
1437,
65277,
26791,
17078,
1437,
564... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bytes_incomplete() {
let data: Vec<u8> = vec![];
let err = HeaderIdentAbiVersion::from_bytes((&data, 0));
assert!(matches!(err, Err(_)));
} | rust_cleaned_test_functions.jsonl/112406 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 95
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
12524,
1243,
14737,
368,
341,
286,
1077,
821,
25,
11312,
34837,
23,
29,
284,
7486,
0,
40901,
286,
1077,
1848,
284,
12104,
28301,
5830,
72,
5637,
486,
1499,
12524,
42902,
691,
11,
220,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_default_style() {
const FORMAT_STR: &str = "text";
let style = Some(Color::Red.bold());
let formatter = StringFormatter::new(FORMAT_STR).unwrap().map(empty_mapper);
let result = formatter.parse(style).unwrap();
let mut result_iter = result.iter();
... | rust_cleaned_test_functions.jsonl/71876 | {
"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,
9993,
15117,
368,
341,
286,
733,
52225,
7159,
25,
609,
495,
284,
330,
1318,
876,
286,
1077,
1707,
284,
4329,
15028,
486,
6033,
31675,
5231,
286,
1077,
24814,
284,
923,
14183,
486,
931,
7832,
980... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mediastream() {
let mut exec = fasync::Executor::new().expect("failed to create an executor");
let mut s = StreamEndpoint::new(
REMOTE_ID_VAL,
MediaType::Audio,
EndpointType::Sink,
vec![ServiceCapability::MediaTransport],
)
... | rust_cleaned_test_functions.jsonl/32977 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 966
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
19048,
559,
1237,
368,
341,
286,
1077,
5206,
3883,
284,
282,
7692,
486,
25255,
486,
931,
1005,
17119,
445,
16091,
311,
1855,
458,
31558,
797,
286,
1077,
5206,
274,
284,
9203,
27380,
486,
93... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_array_chunks_nth_back() {
let v: &[i32] = &[0, 1, 2, 3, 4, 5];
let mut c = v.array_chunks::<2>();
assert_eq!(c.nth_back(1).unwrap(), &[2, 3]);
assert_eq!(c.next().unwrap(), &[0, 1]);
assert_eq!(c.next(), None);
let v2: &[i32] = &[0, 1, 2, 3, 4];
let mut c2 = v2.array... | rust_cleaned_test_functions.jsonl/9645 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 316
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
65470,
78342,
3895,
368,
341,
262,
1077,
348,
25,
44590,
72,
18,
17,
60,
284,
44590,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
262,
1077,
5206,
272,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_keyword() {
assert_eq!(js_parser_rs::parse("var".chars()), Ok(vec![TokenType::Var]));
assert_eq!(js_parser_rs::parse("if".chars()), Ok(vec![TokenType::If]));
assert_eq!(js_parser_rs::parse("else".chars()), Ok(vec![TokenType::Else]));
assert_eq!(js_parser_rs::parse("do".char... | rust_cleaned_test_functions.jsonl/61524 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 988
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45824,
368,
341,
14808,
262,
2060,
10714,
10297,
2519,
18517,
47115,
486,
6400,
445,
947,
3263,
19255,
11858,
7622,
25592,
20703,
75611,
486,
3962,
14382,
262,
2060,
10714,
10297,
2519,
18517,
47115,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_http() {
let target = "http://example.domain/";
let p = Proxy::http(target).unwrap();
let http = "http://hyper.rs";
let other = "https://hyper.rs";
assert_eq!(intercepted_uri(&p, http), target);
assert!(p.intercept(&url(other)).is_none());
} | rust_cleaned_test_functions.jsonl/6804 | {
"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,
25888,
368,
341,
286,
1077,
2169,
284,
330,
1254,
1110,
8687,
11003,
37254,
286,
1077,
281,
284,
32778,
486,
1254,
8637,
568,
15454,
1428,
286,
1077,
1758,
284,
330,
1254,
1110,
68192,
25638,
876,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_initialize_at_ok() {
ExtBuilder::default().build().execute_with(|| {
assert_ok!(CrowdloanRewards::initialize_at(Origin::root(), 10));
assert_eq!(CrowdloanRewards::total_rewards(), 0);
assert_eq!(CrowdloanRewards::claimed_rewards(), 0);
});
} | rust_cleaned_test_functions.jsonl/41084 | {
"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,
40889,
3752,
19817,
368,
341,
76605,
3297,
486,
2258,
1005,
5834,
1005,
10257,
6615,
79453,
341,
197,
6948,
19817,
10297,
93926,
67,
38329,
58465,
2347,
486,
21641,
3752,
7,
13298,
486,
2888,
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... | 2 |
#[test]
fn test_mlen_increase_values() {
let mut context = Sha384::default();
context._state.increment_mlen(&WordU64::from(1u64));
assert_eq!(context._state.message_len[0], WordU64::from(0u64));
assert_eq!(context._state.message_len[1], WordU64::from(8u64));
... | rust_cleaned_test_functions.jsonl/46935 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 495
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
2892,
73807,
9146,
368,
341,
310,
1077,
5206,
2266,
284,
27970,
18,
23,
19,
486,
2258,
1428,
310,
2266,
1436,
2454,
56936,
717,
2892,
2099,
10879,
52,
21,
19,
486,
1499,
7,
16,
84,
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_interval_value_truncate_high_fields() {
use DateTimeField::*;
let mut test_cases = [
(Year, (321, 654_321), (321, 654_321)),
(Month, (321, 654_321), (9, 654_321)),
(Day, (321, 654_321), (0, 654_321)),
(Hour, (321, 654_321), (0, 654... | rust_cleaned_test_functions.jsonl/94293 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 553
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20541,
3142,
3547,
26900,
22680,
12132,
368,
341,
286,
990,
6520,
1877,
79304,
286,
1077,
5206,
1273,
41427,
284,
2278,
310,
320,
9490,
11,
320,
18,
17,
16,
11,
220,
21,
20,
19,
62,
18,
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... | 3 |
#[test]
fn test_plan_build_minimum_workspace_dependency() {
let planned_build_res = BuildPlannerImpl::new(
template_raze_metadata(templates::DUMMY_MODIFIED_METADATA),
dummy_raze_settings(),
)
.plan_build(Some(PlatformDetails::new(
"some_target_triple".to_owned(),
Vec::new(), ... | rust_cleaned_test_functions.jsonl/31788 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 386
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26564,
20801,
84855,
75560,
62387,
368,
341,
262,
1077,
12909,
20801,
4918,
284,
7854,
2120,
4887,
9673,
486,
931,
1006,
414,
3811,
59969,
2986,
22220,
7,
15463,
486,
35,
58673,
85958,
58084,
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... | 1 |
#[test]
fn test_punctuation_3() {
assert_eq!(lex("*%="), (Token::StarPercentEqual, 3));
assert_eq!(lex("+%="), (Token::PlusPercentEqual, 3));
assert_eq!(lex("-%="), (Token::MinusPercentEqual, 3));
assert_eq!(lex("..."), (Token::Dot3, 3));
assert_eq!(lex("<<="), (Token::LA... | rust_cleaned_test_functions.jsonl/80525 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 200
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
72299,
62,
18,
368,
341,
286,
2060,
10714,
10297,
2571,
29592,
4,
428,
701,
320,
3323,
486,
12699,
32010,
2993,
11,
220,
18,
1106,
286,
2060,
10714,
10297,
2571,
34973,
4,
428,
701,
320,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vendor_devices() {
let vendor = Vendor::from_id(0x17cb).unwrap();
for device in vendor.devices() {
assert_eq!(device.vendor(), vendor);
assert!(!device.name().is_empty());
}
} | rust_cleaned_test_functions.jsonl/27529 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 123
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58320,
41334,
368,
341,
286,
1077,
20728,
284,
45136,
486,
1499,
842,
7,
15,
87,
16,
22,
7221,
568,
15454,
1428,
286,
369,
3671,
304,
20728,
78914,
368,
341,
310,
2060,
10714,
10297,
6111,
72395... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_part2() {
assert!(supports_ssl(&parse_addr("aba[bab]xyz")));
assert!(!supports_ssl(&parse_addr("xyx[xyx]xyx")));
assert!(supports_ssl(&parse_addr("aaa[kek]eke")));
assert!(supports_ssl(&parse_addr("zazbz[bzb]cdb")));
} | rust_cleaned_test_functions.jsonl/60101 | {
"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,
10495,
17,
368,
341,
286,
2060,
10297,
77709,
48210,
2099,
6400,
7387,
445,
12004,
18483,
370,
60,
28854,
17621,
286,
2060,
0,
3471,
77709,
48210,
2099,
6400,
7387,
445,
4130,
87,
58,
4130,
87,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sequence() {
let mut bits = 0xCC;
for i in 0..8 {
test_seq_value(bits);
assert_eq!(i + 1, sequence_bytes_required(bits));
bits <<= 8;
}
} | rust_cleaned_test_functions.jsonl/18952 | {
"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,
23735,
368,
341,
262,
1077,
5206,
9472,
284,
220,
15,
72255,
401,
262,
369,
600,
304,
220,
15,
496,
23,
341,
286,
1273,
14486,
3142,
68901,
317,
286,
2060,
10714,
10297,
72,
488,
220,
16,
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
] | 2 |
#[test]
fn test_data_retransmit() {
let mut s = socket_established();
s.send_slice(b"abcdef").unwrap();
recv!(s, time 1000, Ok(TcpRepr {
seq_number: LOCAL_SEQ + 1,
ack_number: Some(REMOTE_SEQ + 1),
payload: &b"abcdef"[..],
..RECV_TEMPL
... | rust_cleaned_test_functions.jsonl/1762 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 347
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1769,
1288,
1458,
1763,
368,
341,
286,
1077,
5206,
274,
284,
7575,
18583,
5102,
291,
543,
286,
274,
5219,
26488,
1883,
1,
41202,
1827,
15454,
543,
286,
27006,
10297,
82,
11,
882,
220,
16,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_alr() {
let code = vec![0x4B, 0xD1];
let mut nes = Cpu::new();
let mut memory = new_memory(code);
nes.A = 0xc4;
// AND is 0b11000000
// Shift right -> 0b01100000 and C = 0
nes.next(&mut memory).unwrap();
assert_eq!(0, nes.C);
... | rust_cleaned_test_functions.jsonl/38743 | {
"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,
8418,
81,
368,
341,
286,
1077,
2038,
284,
7486,
20703,
15,
87,
19,
33,
11,
220,
15,
15764,
16,
935,
286,
1077,
5206,
308,
288,
284,
356,
5584,
486,
931,
543,
286,
1077,
5206,
4938,
284,
501,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_apply_remove_encryption() {
let db_name = format!("{}.sqlite3", string(8).as_str());
let temp_dir = tempdir().unwrap();
let db_folder = temp_dir.path().to_str().unwrap().to_string();
let db_path = format!("{}{}", db_folder, db_name);
embed_migrations!("./... | rust_cleaned_test_functions.jsonl/1823 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2009
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36551,
18193,
13781,
15597,
368,
341,
286,
1077,
2927,
1269,
284,
3561,
17223,
46391,
37042,
18,
497,
914,
7,
23,
568,
300,
2895,
1423,
286,
1077,
2730,
4334,
284,
2730,
3741,
1005,
15454,
543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_create() {
try_create(10.0, 0.1);
try_create(-5.0, 1.0);
try_create(0.0, 10.0);
try_create(10.0, 100.0);
try_create(-5.0, f64::INFINITY);
} | rust_cleaned_test_functions.jsonl/88257 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 125
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
368,
341,
286,
1430,
8657,
7,
16,
15,
13,
15,
11,
220,
15,
13,
16,
317,
286,
1430,
8657,
4080,
20,
13,
15,
11,
220,
16,
13,
15,
317,
286,
1430,
8657,
7,
15,
13,
15,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_index_metadata_binary_value() {
let metadata = IndexMetadata {
identifier: NonZeroU64::new(12).unwrap(),
index_type: IndexType::ProofList,
state: Some(16_u64),
};
let bytes = metadata.to_bytes();
assert_eq!(IndexMetadata::from_... | rust_cleaned_test_functions.jsonl/13033 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 309
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3560,
22220,
31761,
3142,
368,
341,
286,
1077,
11160,
284,
8008,
14610,
341,
310,
12816,
25,
11581,
17999,
52,
21,
19,
486,
931,
7,
16,
17,
568,
15454,
3148,
310,
1922,
1819,
25,
8008,
929,
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_get_ip_forwarding() {
let mut test_config = create_test_config_no_paths();
test_config.device_config = Some(build_full_config());
assert_eq!(test_config.get_ip_forwarding_state(), true);
// removing the ip forwarding config should still return the default of fals... | rust_cleaned_test_functions.jsonl/83814 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 206
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
10385,
32121,
287,
368,
341,
286,
1077,
5206,
1273,
5332,
284,
1855,
4452,
5332,
6536,
24152,
543,
286,
1273,
5332,
18355,
5332,
284,
4329,
43333,
16372,
5332,
1423,
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 |
#[test]
fn test_blob_bucket() {
// load test fixture files:
let image_1 = load_fixture(Path::new("images").join("rgb.jpeg"));
let image_1_meta = BlobMeta::new(image_1.len());
let image_2 = load_fixture(Path::new("images").join("rgb.png"));
let image_2_meta = BlobMeta::ne... | rust_cleaned_test_functions.jsonl/73122 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 796
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45908,
38749,
368,
341,
286,
442,
2795,
1273,
12507,
3542,
510,
286,
1077,
2168,
62,
16,
284,
2795,
74409,
33030,
486,
931,
445,
3642,
1827,
5987,
445,
16509,
30675,
4010,
286,
1077,
2168,
62,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_str() {
assert_ser_eq!("a", &[Token::Str("a")]);
assert_ser_eq!("a", &[Token::BorrowedStr("a")]);
assert_ser_eq!("a", &[Token::String("a")]);
assert_ser_eq!("a".to_string(), &[Token::Str("a")]);
assert_ser_eq!("a".to_string(), &[Token::BorrowedStr("a")]);
assert_ser_eq!("... | rust_cleaned_test_functions.jsonl/44207 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 169
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2895,
368,
341,
262,
2060,
75861,
10714,
17223,
64,
497,
44590,
3323,
486,
2580,
445,
64,
899,
2558,
262,
2060,
75861,
10714,
17223,
64,
497,
44590,
3323,
486,
33,
7768,
291,
2580,
445,
64,
899,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_32() {
assert_eq!(
parse_css_color("hsl(240deg , )"),
Err(CssColorParseError::MissingColorComponent(
CssColorComponent::Saturation
))
);
} | rust_cleaned_test_functions.jsonl/114048 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 138
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
25924,
6714,
62,
18,
17,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
25924,
6714,
445,
71,
3226,
7,
17,
19,
15,
16508,
1154,
220,
873,
4461,
310,
15495,
3025,
778,
1636,
14463,
1454,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_stream_fin_after_headers() {
let (mut client, mut server, request_stream_id) = connect_and_send_request(true);
server_send_response_and_exchange_packet(
&mut client,
&mut server,
request_stream_id,
HTTP_RESPONSE_HEADER_ONLY_2,
... | rust_cleaned_test_functions.jsonl/101913 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 548
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12673,
39737,
19844,
26719,
368,
341,
286,
1077,
320,
6984,
2943,
11,
5206,
3538,
11,
1681,
12673,
842,
8,
284,
4564,
8378,
13565,
7893,
3715,
626,
286,
3538,
13565,
9655,
8378,
59212,
21078,
1006... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_proof_illegal_lower_bound() {
let dir = TempDir::new(super::gen_tempdir_name().as_str()).unwrap();
let path = dir.path();
let db = create_database(path);
super::proof_illegal_lower_bound(db);
} | rust_cleaned_test_functions.jsonl/115562 | {
"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,
86757,
26743,
6428,
30425,
19447,
368,
341,
286,
1077,
5419,
284,
19944,
6184,
486,
931,
56040,
486,
4370,
11771,
3741,
1269,
1005,
300,
2895,
6011,
15454,
543,
286,
1077,
1815,
284,
5419,
3875,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_pretty_print() {
let d = BerObject::from_obj(BerObjectContent::Sequence(vec![
BerObject::from_int_slice(b"\x01\x00\x01"),
BerObject::from_int_slice(b"\x01\x00\x01"),
BerObject::from_obj(BerObjectContent::Set(vec![
BerObject::from_int_sl... | rust_cleaned_test_functions.jsonl/37528 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 320
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
21322,
10064,
368,
341,
286,
1077,
294,
284,
8907,
1190,
486,
1499,
7328,
5349,
261,
1190,
2762,
486,
14076,
25592,
90515,
310,
8907,
1190,
486,
1499,
4042,
26488,
1883,
11934,
87,
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... | 1 |
#[test]
fn test_calc_score() {
let hand = vec![BJCard::Two];
assert_eq!(2, calc_score(&hand));
let hand = vec![BJCard::Three];
assert_eq!(3, calc_score(&hand));
let hand = vec![BJCard::Jack];
assert_eq!(10, calc_score(&hand));
let hand = vec![BJCard::Tw... | rust_cleaned_test_functions.jsonl/74257 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 389
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38241,
10405,
368,
341,
286,
1077,
1424,
284,
7486,
20703,
14978,
5770,
486,
11613,
935,
286,
2060,
10714,
10297,
17,
11,
10035,
10405,
2099,
10661,
3237,
286,
1077,
1424,
284,
7486,
20703,
14978,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_chrome_channel_data() -> Result<()> {
let mut data = vec![];
let mut messages = vec![];
// Decoding hex data into binary.
for h in &CHANDATA_TEST_HEX {
let b = match hex::decode(h) {
Ok(b) => b,
Err(_) => return Err(Error::new("hex decode error".t... | rust_cleaned_test_functions.jsonl/76716 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 487
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4138,
6648,
14571,
1769,
368,
1464,
5714,
71698,
341,
262,
1077,
5206,
821,
284,
7486,
0,
15078,
262,
1077,
5206,
6605,
284,
7486,
0,
40901,
262,
442,
3714,
3700,
12371,
821,
1119,
7868,
624,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_display() -> Result<(), Error> {
let public_key1: PublicKey = KEY_PUBLIC_ASN1_HEX.parse()?;
let public_key2: PublicKey = public_key1.to_string().parse()?;
let secret_key1: SecretKey = KEY_SECRET_ASN1_HEX.parse()?;
let secret_key2: SecretKey = secret_key1.to_strin... | rust_cleaned_test_functions.jsonl/77 | {
"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,
14825,
368,
1464,
5714,
68843,
4600,
29,
341,
286,
1077,
584,
3097,
16,
25,
70280,
284,
12013,
36209,
1566,
18966,
16,
86502,
4632,
94136,
286,
1077,
584,
3097,
17,
25,
70280,
284,
584,
3097,
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... | 5 |
#[test]
fn test_inbound_resend_loop_detection() {
define_dictionary!(
Logon,
Logout,
Heartbeat,
ResendRequest,
SequenceReset,
TestRequest,
);
//Connect and logon.
let (mut test_server, mut client, connection) =
TestStream::setup_test_serve... | rust_cleaned_test_functions.jsonl/36 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 987
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
10891,
4918,
408,
17198,
57505,
368,
341,
262,
6979,
42605,
33673,
286,
2835,
263,
345,
286,
46285,
345,
286,
17965,
22227,
345,
286,
1800,
408,
1900,
345,
286,
28871,
14828,
345,
286,
3393,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_outer_join() -> Result<()> {
let (temp, rain) = create_frames();
let joined = temp.outer_join(&rain, "days", "days")?;
println!("{:?}", &joined);
assert_eq!(joined.height(), 5);
assert_eq!(joined.column("days")?.sum::<i32>(), Some(7));
let df_left... | rust_cleaned_test_functions.jsonl/10280 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 450
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
67258,
31017,
368,
1464,
5714,
71698,
341,
286,
1077,
320,
3888,
11,
11174,
8,
284,
1855,
29319,
543,
286,
1077,
10859,
284,
2730,
53719,
31017,
2099,
29093,
11,
330,
13778,
497,
330,
13778,
899,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
#[test]
fn test_allows_unparsed_newlines_at_finish() {
let mut dec = MultiResponseDecoder::<TO>::new();
{
let mut stream = dec.process_next_chunk(b"\n");
assert!(stream.next().is_none());
}
assert!(dec.finish().is_ok());
} | rust_cleaned_test_functions.jsonl/14566 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 149
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5705,
4241,
4907,
41030,
5921,
7969,
3752,
42980,
368,
341,
286,
1077,
5206,
1622,
284,
17439,
2582,
20732,
27638,
5207,
6831,
931,
1428,
286,
341,
310,
1077,
5206,
4269,
284,
1622,
16988,
11257,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_consistency_tools() {
let dir = tempfile::Builder::new()
.prefix("test_consistency_tools")
.tempdir()
.unwrap();
let cfg = Config {
dir: dir.path().to_str().unwrap().to_owned(),
target_file_size: ReadableSize(128),
..Default::default()
... | rust_cleaned_test_functions.jsonl/25316 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 494
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31971,
47094,
39723,
368,
341,
262,
1077,
5419,
284,
54819,
486,
3297,
486,
931,
741,
286,
659,
11849,
445,
1944,
31971,
47094,
39723,
1138,
286,
659,
3888,
3741,
741,
286,
659,
15454,
543,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
#[test]
fn test_serde() {
use rand::SeedableRng;
use rand_xorshift::XorShiftRng;
use serde_test::{assert_tokens, Token};
let mut rng = XorShiftRng::from_seed([1; 16]);
let priv_key = RSAPrivateKey::new(&mut rng, 64).expect("failed to generate key");
let priv_tok... | rust_cleaned_test_functions.jsonl/29039 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1209
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75861,
450,
368,
341,
286,
990,
10382,
486,
41471,
480,
49,
968,
280,
286,
990,
10382,
76462,
13418,
486,
55,
269,
24841,
49,
968,
280,
286,
990,
61570,
4452,
22964,
2207,
28838,
11,
9660,
2315,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_find_summands_for_number() {
let list = vec![
35, 20, 15, 25, 47, 40, 62, 55, 65, 95, 102, 117, 150, 182, 127,
];
let expected: &[u64] = &[15, 25, 47, 40];
assert_eq!(find_summands_for_number(127, &list), Ok(expected));
} | rust_cleaned_test_functions.jsonl/54492 | {
"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,
21814,
10160,
1928,
82,
5478,
5500,
368,
341,
262,
1077,
1140,
284,
7486,
90515,
414,
220,
18,
20,
11,
220,
17,
15,
11,
220,
16,
20,
11,
220,
17,
20,
11,
220,
19,
22,
11,
220,
19,
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_quaternion() {
let quaternion = Quaternion::new(2f32, 3f32, 4f32, 5f32);
let matrix_short = Matrix4::from(quaternion);
let matrix_long = Matrix3::from(quaternion);
let matrix_long = Matrix4::from(matrix_long);
assert_approx_eq!(matri... | rust_cleaned_test_functions.jsonl/30185 | {
"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,
11280,
16351,
368,
341,
310,
1077,
66775,
284,
24801,
486,
931,
7,
17,
69,
18,
17,
11,
220,
18,
69,
18,
17,
11,
220,
19,
69,
18,
17,
11,
220,
20,
69,
18,
17,
626,
310,
1077,
6172,
16673,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_copy_cache_info() {
let env = create_env();
// Create the required chroot dir hierarchy.
fs::create_dir_all(env.chroot_dir()).expect("Could not create dir hierarchy.");
assert!(env.copy_cache_info().is_ok());
// Make sure that the needed files truly exi... | rust_cleaned_test_functions.jsonl/44162 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 323
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16096,
11529,
3109,
368,
341,
286,
1077,
6105,
284,
1855,
15879,
1428,
286,
442,
4230,
279,
2567,
521,
2888,
5419,
28922,
624,
286,
8619,
486,
3182,
4334,
5705,
16978,
5329,
2888,
4334,
6011,
1711... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_serialize_then_deserialize_with_many_options_is_equal_to_starting_value() {
let mut msg = new_test_msg();
msg.options.push(ConfigOption {
code: OptionCode::SubnetMask,
value: vec![255, 255, 255, 0],
});
msg.options.push(ConfigOption {
... | rust_cleaned_test_functions.jsonl/93672 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 315
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
68367,
15768,
9050,
6615,
22101,
8743,
6892,
11478,
2346,
4906,
287,
3142,
368,
341,
286,
1077,
5206,
3750,
284,
501,
4452,
6483,
543,
286,
3750,
10912,
2552,
33687,
5341,
341,
310,
2038,
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_send_admin_direct_message_via_standard_circuit() {
// Set up dispatcher and mock sender
let mock_sender = MockSender::new();
let mut dispatcher = Dispatcher::new(Box::new(mock_sender.clone()));
let table = RoutingTable::default();
let reader: Box<dyn Rout... | rust_cleaned_test_functions.jsonl/128133 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1594
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13565,
12207,
32871,
6462,
80710,
48688,
666,
37268,
368,
341,
286,
442,
2573,
705,
38799,
323,
7860,
4646,
198,
286,
1077,
7860,
54356,
284,
14563,
20381,
486,
931,
543,
286,
1077,
5206,
38799,
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_parse_complex_expression() {
check(
"-(2-((10+10)))*20+-5",
expect![[r#"
Root@0..20
Exp_Binary@0..20
Exp_Binary@0..17
Exp_UnaryPrefix@0..14
Sym_Minus@0..1 "-"
... | rust_cleaned_test_functions.jsonl/40935 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1253
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
41522,
28068,
368,
341,
286,
1779,
1006,
310,
6523,
7,
17,
12,
1188,
16,
15,
10,
16,
15,
593,
4806,
17,
15,
21473,
20,
756,
310,
1720,
0,
15505,
81,
2,
698,
394,
18854,
31,
15,
496,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_find_all_refs_with_scope() {
let code = r#"
//- /lib.rs
mod foo;
mod bar;
pub fn quux<|>() {}
//- /foo.rs
fn f() { super::quux(); }
//- /bar.rs
fn f() { super::quux(); }
"#;
... | rust_cleaned_test_functions.jsonl/47779 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 531
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
5705,
60638,
6615,
23199,
368,
341,
286,
1077,
2038,
284,
435,
2,
698,
310,
78406,
608,
2740,
25638,
198,
310,
1463,
15229,
280,
310,
1463,
3619,
401,
310,
6675,
5168,
922,
2200,
27,
91,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_2() {
let s = String::from("");
let t = String::from("y");
assert_eq!(Solution::find_the_difference(s, t), 'y');
} | rust_cleaned_test_functions.jsonl/56115 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 84
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
17,
368,
341,
286,
1077,
274,
284,
923,
486,
1499,
13056,
286,
1077,
259,
284,
923,
486,
1499,
445,
88,
3071,
286,
2060,
10714,
10297,
36842,
486,
3903,
16068,
47525,
1141,
11,
259,
701,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_locate_binary_2_args() {
let test_cases = vec![
(None, None, None),
(None, Some("abc"), None),
(Some("abc"), None, None),
(Some(""), Some("foobArbar"), Some(1)),
(Some(""), Some(""), Some(1)),
(Some("xxx"), Some(""),... | rust_cleaned_test_functions.jsonl/71414 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 584
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13400,
349,
31761,
62,
17,
8384,
368,
341,
286,
1077,
1273,
41427,
284,
7486,
90515,
310,
320,
4064,
11,
2240,
11,
2240,
1326,
310,
320,
4064,
11,
4329,
445,
13683,
3975,
2240,
1326,
310,
320,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_superimpose_style_sections_1() {
let sections_1 = vec![(*SYNTAX_STYLE, "ab")];
let sections_2 = vec![(*SYNTAX_HIGHLIGHTED_STYLE, "ab")];
let superimposed = vec![(*SUPERIMPOSED_STYLE, "ab".to_string())];
assert_eq!(
superimpose_style... | rust_cleaned_test_functions.jsonl/13388 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 236
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38886,
318,
2900,
15117,
59485,
62,
16,
368,
341,
310,
1077,
14158,
62,
16,
284,
7486,
20703,
4071,
18416,
78221,
41775,
11,
330,
370,
899,
935,
310,
1077,
14158,
62,
17,
284,
7486,
20703,
4071,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_slice_from() {
assert_eq!(&"abcd"[0..], "abcd");
assert_eq!(&"abcd"[2..], "cd");
assert_eq!(&"abcd"[4..], "");
} | rust_cleaned_test_functions.jsonl/63092 | {
"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,
26488,
5673,
368,
341,
262,
2060,
10714,
0,
2099,
1,
68644,
36864,
15,
496,
1125,
330,
68644,
797,
262,
2060,
10714,
0,
2099,
1,
68644,
36864,
17,
496,
1125,
330,
4385,
797,
262,
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 |
#[test]
fn test_positive_float_number() {
fn valid_parse(float_str: &str, expected_val: f64, expected_remaining: &str) {
let (val, remaining) = positive_float_number().parse(float_str).unwrap();
assert_eq!(remaining, expected_remaining);
assert_nearly_equals(val, expe... | rust_cleaned_test_functions.jsonl/64401 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 336
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54160,
17586,
5500,
368,
341,
286,
5168,
2697,
21039,
8268,
2895,
25,
609,
495,
11,
3601,
6189,
25,
282,
21,
19,
11,
3601,
59244,
25,
609,
495,
8,
341,
310,
1077,
320,
831,
11,
9664,
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... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.