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_txs_wal() {
fs::remove_dir_all(PathBuf::from_str(FULL_TXS_PATH).unwrap()).unwrap();
let wal = SignedTxsWAL::new(FULL_TXS_PATH);
let txs_01 = mock_wal_txs(100);
let hash_01 = Hasher::digest(rlp::encode_list(&txs_01));
wal.save(1u64, hash_01, txs_01.clone()... | rust_cleaned_test_functions.jsonl/54386 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 627
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17805,
82,
1670,
278,
368,
341,
286,
8619,
486,
5399,
4334,
5705,
33030,
15064,
486,
1499,
2895,
7832,
1426,
18819,
50,
7944,
568,
15454,
6011,
15454,
1428,
286,
1077,
40826,
284,
52453,
51,
18561... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_slerp_same() {
let q = Quaternion::from([0.5, 0.5, 0.5, 0.5]);
assert_ulps_eq!(q, q.slerp(q, 0.1234));
} | rust_cleaned_test_functions.jsonl/15355 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 90
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
1536,
79,
33574,
368,
341,
286,
1077,
2804,
284,
24801,
486,
1499,
2561,
15,
13,
20,
11,
220,
15,
13,
20,
11,
220,
15,
13,
20,
11,
220,
15,
13,
20,
2558,
286,
2060,
61039,
1690,
10714... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_int_sub_no_panic() {
assert_eq!(Int256::from(1) - Int256::from(1), Int256::from(0));
} | rust_cleaned_test_functions.jsonl/47746 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 63
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
5228,
6536,
620,
31270,
368,
341,
286,
2060,
10714,
10297,
1072,
17,
20,
21,
486,
1499,
7,
16,
8,
481,
1333,
17,
20,
21,
486,
1499,
7,
16,
701,
1333,
17,
20,
21,
486,
1499,
7,
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 |
#[test]
fn test_get_block_chain() {
let mut blockchain = Blockchain::new();
blockchain.set_check_trans(false);
let genesis_hash = blockchain.tip();
let block1 = generate_random_block(&genesis_hash);
let block2 = generate_random_block(&block1.hash);
let block3 = ge... | rust_cleaned_test_functions.jsonl/61923 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 280
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
7113,
30583,
368,
341,
286,
1077,
5206,
17944,
284,
42885,
486,
931,
543,
286,
17944,
980,
7200,
7965,
3576,
317,
286,
1077,
59366,
8950,
284,
17944,
78044,
543,
286,
1077,
2504,
16,
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_dynaerror_new_success() {
let err = DynaError::new(DynaErrorKind::ProviderError, None);
assert_eq!(err.kind(), DynaErrorKind::ProviderError);
assert_eq!(err.description, None);
assert_eq!(err.description(), "provider error");
} | rust_cleaned_test_functions.jsonl/133082 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 121
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
52344,
841,
5921,
18632,
368,
341,
286,
1077,
1848,
284,
43938,
64,
1454,
486,
931,
5432,
52344,
1454,
10629,
486,
5179,
1454,
11,
2240,
626,
286,
2060,
10714,
10297,
615,
36632,
1507,
43938,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_i32() {
assert_eq!(decode_i32(0b0000_0000_0000_0000_0000_0000_0000_0000), 0);
assert_eq!(decode_i32(0b0000_0000_0000_0000_0000_0000_0000_0001), -1);
assert_eq!(decode_i32(0b0000_0000_0000_0000_0000_0000_0000_0100), 2);
assert_eq!(decode_i32(0b0000_0000_0000... | rust_cleaned_test_functions.jsonl/47631 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 256
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
5318,
18,
17,
368,
341,
286,
2060,
10714,
10297,
18196,
5318,
18,
17,
7,
15,
65,
15,
15,
15,
15,
62,
15,
15,
15,
15,
62,
15,
15,
15,
15,
62,
15,
15,
15,
15,
62,
15,
15,
15,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_resolve_method_fails() {
let document: CoreDocument = document();
// Resolving an existing reference to a missing method returns None.
assert_eq!(document.resolve_method("#key-4", None), None);
// Resolving a plain DID returns None.
assert_eq!(document.resolve_method("did:e... | rust_cleaned_test_functions.jsonl/50543 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 214
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77291,
9032,
761,
6209,
368,
341,
262,
1077,
2197,
25,
9518,
7524,
284,
2197,
1428,
262,
442,
1800,
19648,
458,
6350,
5785,
311,
264,
7402,
1714,
4675,
2240,
624,
262,
2060,
10714,
10297,
6062,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_const_time_bn() {
let a = BigNum::new().unwrap();
assert!(!a.is_const_time());
let mut b = BigNum::new().unwrap();
b.set_const_time();
assert!(b.is_const_time())
} | rust_cleaned_test_functions.jsonl/52803 | {
"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,
13610,
3009,
58112,
368,
341,
286,
1077,
264,
284,
6164,
4651,
486,
931,
1005,
15454,
543,
286,
2060,
0,
3471,
64,
2079,
13610,
3009,
5231,
286,
1077,
5206,
293,
284,
6164,
4651,
486,
931,
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 |
#[test]
fn test_ipv4_parse() {
const ADDR: [u8; IPV4_SIZE] = [192, 168, 0, 2];
let a = RData::<&[u8]>::A(A::read_from(&ADDR[..]).unwrap());
assert_eq!(a.ip_addr(), Some(IpAddr::from(ADDR)));
} | rust_cleaned_test_functions.jsonl/34435 | {
"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,
49378,
19,
21039,
368,
341,
286,
733,
80514,
25,
508,
84,
23,
26,
91498,
19,
4098,
60,
284,
508,
16,
24,
17,
11,
220,
16,
21,
23,
11,
220,
15,
11,
220,
17,
935,
286,
1077,
264,
284,
431,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rewrite_header_after_payload() {
let mut buf = io::Cursor::new(Vec::new());
let original_header = FrameHeader::new(10, 0x1, 0x0, 3);
let actual_header = FrameHeader::new(5, 0x0, 0x0, 5);
let expected = {
let mut buf = Vec::new();
buf.extend... | rust_cleaned_test_functions.jsonl/76519 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 429
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74052,
8757,
19844,
32813,
368,
341,
286,
1077,
5206,
6607,
284,
6399,
486,
14543,
486,
931,
49923,
486,
931,
1423,
286,
1077,
4024,
8757,
284,
16321,
4047,
486,
931,
7,
16,
15,
11,
220,
15,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_scalar_from_into_repr() {
// r + 1 should not be in the field
assert!(bool::from(
Scalar::from_u64s_le(&[
0xffffffff00000002,
0x53bda402fffe5bfe,
0x3339d80809a1d805,
0x73eda753299d7d48
])
... | rust_cleaned_test_functions.jsonl/54677 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1236
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41652,
5673,
45514,
68535,
368,
341,
286,
442,
435,
488,
220,
16,
1265,
537,
387,
304,
279,
2070,
198,
286,
2060,
10297,
2641,
486,
1499,
1006,
310,
35176,
486,
1499,
7300,
21,
19,
82,
11751,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_established_keep_alive_timeout() {
let mut s = socket_established();
s.set_keep_alive(Some(Duration::from_millis(50)));
s.set_timeout(Some(Duration::from_millis(100)));
recv!(s, time 100, Ok(TcpRepr {
seq_number: LOCAL_SEQ,
ack_number: Some... | rust_cleaned_test_functions.jsonl/1780 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 789
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18583,
5102,
291,
50293,
58850,
20537,
368,
341,
286,
1077,
5206,
274,
284,
7575,
18583,
5102,
291,
543,
286,
274,
980,
50293,
58850,
65405,
64114,
486,
1499,
717,
56212,
7,
20,
15,
4945,
286,
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_insert_one() {
let mut cache = Cache::with_capacity(100);
let key1 = Key::Rid(RID(1));
let key2 = Key::Rid(RID(2));
let dbs = Box::new(DivBufShared::from(vec![0u8; 5]));
cache.insert(key1, dbs);
let dbs = Box::new(DivBufShared::from(vec![0u8; 7]));
cache.insert(key2, ... | rust_cleaned_test_functions.jsonl/90049 | {
"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,
17678,
11667,
368,
341,
262,
1077,
5206,
6500,
284,
19479,
486,
4197,
35603,
7,
16,
15,
15,
317,
262,
1077,
1376,
16,
284,
5309,
486,
49,
307,
2785,
915,
7,
16,
1106,
262,
1077,
1376,
17,
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_depth_search_range() {
let min_inv_depth = Inv::from(0.01);
let max_inv_depth = Inv::from(0.10);
let (dmin, dmax) = depth_search_range(&(min_inv_depth, max_inv_depth));
assert_eq!(dmin, max_inv_depth.inv());
assert_eq!(dmax, min_inv_depth.inv());
} | rust_cleaned_test_functions.jsonl/87452 | {
"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,
19061,
10716,
9698,
368,
341,
286,
1077,
1308,
19996,
19061,
284,
18807,
486,
1499,
7,
15,
13,
15,
16,
317,
286,
1077,
1932,
19996,
19061,
284,
18807,
486,
1499,
7,
15,
13,
16,
15,
317,
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_default_80_column_wrap() {
new_ucmd!()
.arg("lorem_ipsum.txt")
.run()
.stdout_is_fixture("lorem_ipsum_80_column.expected");
} | rust_cleaned_test_functions.jsonl/23261 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 94
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9993,
62,
23,
15,
8744,
38550,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
858,
445,
385,
1826,
10385,
1242,
3909,
1138,
286,
659,
6108,
741,
286,
659,
36358,
6892,
74409,
445,
385,
182... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_v8_platform() {
let options = RuntimeOptions {
v8_platform: Some(v8::new_default_platform(0, false).make_shared()),
..Default::default()
};
let mut runtime = JsRuntime::new(options);
runtime.execute_script("<none>", "").unwrap();
} | rust_cleaned_test_functions.jsonl/23466 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 115
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
23,
34260,
368,
341,
262,
1077,
2606,
284,
10954,
3798,
341,
414,
348,
23,
34260,
25,
4329,
3747,
23,
486,
931,
9993,
34260,
7,
15,
11,
895,
568,
6927,
20405,
14702,
414,
5241,
3675,
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_user_follow_artist() {
let mut oauth = SpotifyOAuth::default().scope("user-follow-modify").build();
match get_token(&mut oauth) {
Some(token_info) => {
let client_credential = SpotifyClientCredentials::default()
.token_info(token_info)
... | rust_cleaned_test_functions.jsonl/79283 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 438
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3317,
43490,
66840,
368,
341,
262,
1077,
5206,
46415,
284,
40537,
57850,
486,
2258,
1005,
4186,
445,
872,
92585,
17078,
1437,
1827,
5834,
543,
262,
2432,
633,
6458,
2099,
6984,
46415,
8,
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... | 2 |
#[test]
fn test_queue() {
let q: Queue<usize> = Queue::new();
assert_eq!(q.pop(), None);
q.push(1);
q.push(2);
assert_eq!(q.pop(), Some(1));
assert_eq!(q.pop(), Some(2));
assert_eq!(q.is_empty(), true);
let a = q.push(3);
let b = q.push(4);... | rust_cleaned_test_functions.jsonl/4188 | {
"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,
10841,
368,
341,
286,
1077,
2804,
25,
18745,
90244,
29,
284,
18745,
486,
931,
543,
286,
2060,
10714,
10297,
80,
8288,
1507,
2240,
317,
286,
2804,
2552,
7,
16,
317,
286,
2804,
2552,
7,
17,
317,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_include() {
let strs = vec!["foo", "bar"];
let s = IncludeTemplate { strs: &strs };
assert_eq!(s.call().unwrap(), "\n INCLUDED: foo1\n INCLUDED: bar2")
} | rust_cleaned_test_functions.jsonl/108585 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 86
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37878,
368,
341,
262,
1077,
57584,
284,
7486,
0,
1183,
7975,
497,
330,
2257,
6332,
262,
1077,
274,
284,
29734,
7275,
314,
57584,
25,
609,
495,
82,
2605,
262,
2060,
10714,
10297,
82,
8524,
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 |
#[test]
fn test_tcp_connection() {
let mut lp = Core::new().unwrap();
let addr: SocketAddr = "127.0.0.1:64000".parse().unwrap();
let handle = lp.handle();
let handle2= handle.clone();
let listener = TcpListener::bind(&addr, &handle).unwrap();
let server = listener.incoming().for_each(mov... | rust_cleaned_test_functions.jsonl/30121 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 283
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45562,
15866,
368,
341,
262,
1077,
5206,
18576,
284,
9518,
486,
931,
1005,
15454,
543,
262,
1077,
10789,
25,
20954,
13986,
284,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
21,
19,
15,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_iter_reader() {
let mut r = IterReader::new(range(0u8, 8));
let mut buf = [0, 0, 0];
let len = r.read(buf).unwrap();
assert_eq!(len, 3);
assert!(buf == [0, 1, 2]);
let len = r.read(buf).unwrap();
assert_eq!(len, 3);
assert!(buf == ... | rust_cleaned_test_functions.jsonl/119363 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 271
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11723,
22306,
368,
341,
286,
1077,
5206,
435,
284,
13704,
5062,
486,
931,
22345,
7,
15,
84,
23,
11,
220,
23,
1106,
286,
1077,
5206,
6607,
284,
508,
15,
11,
220,
15,
11,
220,
15,
935,
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_update_nft_characteristic_not_same_error() {
let (mut context, tx) = create_test_context(
Action::Update(UpdateCase::UpdateCharacteristic),
NftError::NFTCharacteristicNotSame,
);
let tx = context.complete_tx(tx);
// run
let err = context.verify_tx(&tx, MAX_CY... | rust_cleaned_test_functions.jsonl/33587 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 234
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
1089,
723,
40988,
4532,
7913,
33574,
4096,
368,
341,
262,
1077,
320,
6984,
2266,
11,
9854,
8,
284,
1855,
4452,
8467,
1006,
286,
5586,
486,
4289,
7,
4289,
4207,
486,
4289,
64982,
1326,
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_iterator_step_by_nth() {
let mut it = (0..16).step_by(5);
assert_eq!(it.nth(0), Some(0));
assert_eq!(it.nth(0), Some(5));
assert_eq!(it.nth(0), Some(10));
assert_eq!(it.nth(0), Some(15));
assert_eq!(it.nth(0), None);
let it = (0..18).step_by(5);
assert_eq!(it.clo... | rust_cleaned_test_functions.jsonl/54069 | {
"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,
13491,
11946,
3710,
78342,
368,
341,
262,
1077,
5206,
432,
284,
320,
15,
496,
16,
21,
568,
9520,
3710,
7,
20,
317,
262,
2060,
10714,
10297,
275,
1253,
339,
7,
15,
701,
4329,
7,
15,
1106,
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_prefix_windows() {
fn f<P: AsRef<Path>>(p: P) -> Result<PathAbs> {
PathArc::new(p).absolute()
}
assert!(f(r"\\?\C:\blah\blah").is_ok());
assert!(f(r"\blah\blah").is_ok());
assert!(f(r"C:\blah\blah").is_ok());
// seems to be more difficult.
... | rust_cleaned_test_functions.jsonl/133370 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 199
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13974,
58220,
368,
341,
262,
5168,
282,
21604,
25,
1634,
3945,
82883,
25526,
79,
25,
393,
8,
1464,
5714,
82883,
27778,
29,
341,
286,
7933,
36809,
486,
931,
1295,
568,
17182,
741,
262,
456,
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_async_https() {
task::block_on(async {
let response = client()
.post()
.url("https://httpbin.org/get")
.rasync()
.await;
assert!(response.is_ok());
let response = response.unwrap();
assert_eq!("httpbin.org", response.host());
println!("{}", response)... | rust_cleaned_test_functions.jsonl/70378 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 147
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28346,
26817,
368,
341,
220,
3383,
486,
4574,
4470,
18285,
341,
262,
1077,
2033,
284,
2943,
741,
414,
659,
2203,
741,
414,
659,
1085,
445,
2428,
1110,
1254,
6863,
2659,
23302,
1138,
414,
659,
81... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_recognised_signal() {
watch_for(&[libc::SIGBUS]);
LAST_SIG.store(0, Ordering::SeqCst);
unsafe {
raise(libc::SIGBUS);
}
assert_eq!(check(), Err(new_error(ErrorKind::Unloaded)));
} | rust_cleaned_test_functions.jsonl/58867 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 106
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7080,
3934,
4056,
21137,
368,
341,
197,
6692,
754,
5478,
2099,
58,
55576,
486,
50631,
40211,
2558,
197,
15070,
6349,
55687,
16114,
7,
15,
11,
68621,
486,
20183,
34,
267,
626,
197,
197,
38157,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_virtio_console() {
test_block!(tb, "", {
let mut clear = ClearDiskConfig::new();
let guest = Guest::new(&mut clear);
let mut child = Command::new("target/debug/cloud-hypervisor")
.args(&["--cpus", "1"])
.args(&["--memor... | rust_cleaned_test_functions.jsonl/55955 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1236
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
2106,
815,
51724,
368,
341,
286,
1273,
7113,
10297,
18387,
11,
7342,
341,
310,
1077,
5206,
2797,
284,
12023,
47583,
2648,
486,
931,
543,
310,
1077,
8640,
284,
26215,
486,
931,
2099,
6984,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_pop_returns_head_element_and_removes_it() {
let mut list: SimpleLinkedList<u32> = SimpleLinkedList::new();
list.push(1);
list.push(2);
assert_eq!(list.pop(), Some(2), "Element must be 2");
assert_eq!(list.pop(), Some(1), "Element must be 1");
assert_eq!(list.pop(), None, ... | rust_cleaned_test_functions.jsonl/112943 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 147
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17061,
58900,
13138,
7894,
8378,
19194,
10088,
14631,
368,
341,
262,
1077,
5206,
1140,
25,
8993,
33915,
34837,
18,
17,
29,
284,
8993,
33915,
486,
931,
543,
262,
1140,
2552,
7,
16,
317,
262,
1140... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_affine_shear_y() {
let shear_y_with_x = 3;
let shear_y_with_z = 11;
let matrix = Matrix4x4::from_affine_shear_y(shear_y_with_x, shear_y_with_z);
let expected = Vector4::new(1, 1 + shear_y_with_x + shear_y_with_z, 1, 1);
let result = matrix * Vector4::... | rust_cleaned_test_functions.jsonl/129112 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 199
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
48914,
482,
643,
86060,
4178,
368,
341,
286,
1077,
64244,
4178,
6615,
3212,
284,
220,
18,
280,
286,
1077,
64244,
4178,
6615,
6415,
284,
220,
16,
16,
280,
286,
1077,
6172,
284,
11631,
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_ne() {
assert!(Version::parse("0.0.0") != Version::parse("0.0.1"));
assert!(Version::parse("0.0.0") != Version::parse("0.1.0"));
assert!(Version::parse("0.0.0") != Version::parse("1.0.0"));
assert!(Version::parse("1.2.3-alpha") != Version::parse("1.2.3-beta"));
... | rust_cleaned_test_functions.jsonl/43101 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 158
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13925,
368,
341,
286,
2060,
10297,
5637,
486,
6400,
445,
15,
13,
15,
13,
15,
899,
961,
6079,
486,
6400,
445,
15,
13,
15,
13,
16,
4010,
286,
2060,
10297,
5637,
486,
6400,
445,
15,
13,
15,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_apply_previous_transactions() {
let alice = solana_sdk::pubkey::new_rand();
let bob = solana_sdk::pubkey::new_rand();
let mut allocations = vec![
Allocation {
recipient: alice.to_string(),
amount: sol_to_lamports(1.0),
... | rust_cleaned_test_functions.jsonl/18258 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 509
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36551,
52552,
68182,
368,
341,
286,
1077,
70433,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
35192,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_simulated_context() {
let mut context = SimulatedContext::new(
Author(0),
/* num_nodes */ 2,
/* max commands per epoch */ 2,
);
let s0 = context.last_committed_state();
let c1 = context.fetch().unwrap();
let c2 = context.fetch().unwrap();
let c3 = ... | rust_cleaned_test_functions.jsonl/95863 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 779
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18314,
7757,
8467,
368,
341,
262,
1077,
5206,
2266,
284,
4467,
7757,
1972,
486,
931,
1006,
286,
6885,
7,
15,
1326,
286,
1391,
1629,
14896,
639,
220,
17,
345,
286,
1391,
1932,
11293,
817,
16342,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_display0() {
let oid: AbsoluteOidVec = "0.2.840.10045.2.1".parse().unwrap();
let arcs = oid.to_string();
assert_eq!(arcs, "0.2.840.10045.2.1");
} | rust_cleaned_test_functions.jsonl/125548 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 93
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14825,
15,
368,
341,
262,
1077,
48766,
25,
48881,
46,
307,
10050,
284,
330,
15,
13,
17,
13,
23,
19,
15,
13,
16,
15,
15,
19,
20,
13,
17,
13,
16,
3263,
6400,
1005,
15454,
543,
262,
1077,
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_blank_lines() {
check("\n\r\n\r", &[Item::Blank; 3]);
check("\r\r\n\r", &[Item::Blank; 3]);
check("\r\r\r\n", &[Item::Blank; 3]);
} | rust_cleaned_test_functions.jsonl/129468 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 87
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
56103,
18323,
368,
341,
25157,
4921,
77,
12016,
1699,
12016,
497,
44590,
1234,
486,
22770,
26,
220,
18,
2558,
25157,
4921,
81,
12016,
1699,
12016,
497,
44590,
1234,
486,
22770,
26,
220,
18,
2558,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_function_starts_with_newimpl() {
assert!(function_starts_with(
"<futures::task_impl::Spawn<T>>::enter::{{closure}}",
"futures::"
));
assert!(!function_starts_with(
"<futures::task_impl::Spawn<T>>::enter::{{closure}}",
"toki... | rust_cleaned_test_functions.jsonl/46634 | {
"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,
9174,
86552,
6615,
5921,
6383,
368,
341,
286,
2060,
10297,
1688,
86552,
6615,
1006,
310,
4055,
69,
74606,
486,
8202,
21007,
486,
41005,
3125,
77595,
1950,
486,
2979,
46916,
3417,
756,
310,
330,
69... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_push_bytes() {
let mut s = String::from("ABC");
unsafe {
let mv = s.as_mut_vec();
mv.extend_from_slice(&[b'D']);
}
assert_eq!(s, "ABCD");
} | rust_cleaned_test_functions.jsonl/3164 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 105
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14218,
12524,
368,
341,
262,
1077,
5206,
274,
284,
923,
486,
1499,
445,
25411,
797,
262,
19860,
341,
286,
1077,
23164,
284,
274,
5357,
29523,
13251,
543,
286,
23164,
15831,
5673,
26488,
2099,
58,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_200_when_same_route_with_diff_meth() {
let rocket = rocket::ignite()
.mount("/", routes![get_index, post_index]);
let client = Client::new(rocket).unwrap();
let response = client.post("/index").dispatch();
assert_eq!(response.status(), Status::... | rust_cleaned_test_functions.jsonl/110570 | {
"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,
25888,
62,
17,
15,
15,
47636,
33574,
28109,
6615,
15850,
717,
769,
368,
341,
286,
1077,
24306,
284,
24306,
486,
95408,
741,
310,
659,
16557,
35460,
11291,
20703,
455,
3560,
11,
1736,
3560,
10149,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_saturating_add_uint() {
use usize::MAX;
assert_eq!(3_usize.saturating_add(5_usize), 8_usize);
assert_eq!(3_usize.saturating_add(MAX-1), MAX);
assert_eq!(MAX.saturating_add(MAX), MAX);
assert_eq!((MAX-2).saturating_add(1), MAX-1);
} | rust_cleaned_test_functions.jsonl/21918 | {
"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,
643,
2628,
1095,
2891,
15807,
368,
341,
286,
990,
22301,
486,
10586,
280,
286,
2060,
10714,
10297,
18,
11306,
551,
514,
2628,
1095,
2891,
7,
20,
11306,
551,
701,
220,
23,
11306,
551,
317,
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_loops_around_when_reaching_visible_choice_limit() {
let choices: Vec<String> = vec!(String::from_str("one"),
String::from_str("two"),
String::from_str("three"));
let config = Configuration::new(2, "".to_string(), choices);
let search = Search::blank(confi... | rust_cleaned_test_functions.jsonl/96103 | {
"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,
5560,
3721,
62,
19454,
47636,
1288,
11829,
34371,
31936,
14763,
368,
341,
286,
1077,
11454,
25,
11312,
3464,
29,
284,
7486,
10297,
703,
486,
1499,
2895,
445,
603,
4461,
286,
923,
486,
1499,
2895,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cubic_endpoint_not_an_intersection() {
// f32 curves seem to be somewhat prone to picking up not-an-intersections where an endpoint of
// "mostly linear" on some level.
use std::panic;
let result = panic::catch_unwind(|| {
do_test(
&CubicBezierSegment {
... | rust_cleaned_test_functions.jsonl/14577 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 476
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
41181,
36699,
7913,
12008,
82558,
368,
341,
262,
442,
282,
18,
17,
35933,
2803,
311,
387,
14400,
36997,
311,
21132,
705,
537,
18883,
44894,
24661,
1380,
458,
14887,
315,
7213,
262,
442,
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... | 2 |
#[test]
fn test_wasm_types() {
assert_eq!(i32::WASM_TYPE, Type::I32);
assert_eq!(i64::WASM_TYPE, Type::I64);
assert_eq!(f32::WASM_TYPE, Type::F32);
assert_eq!(f64::WASM_TYPE, Type::F64);
assert_eq!(u128::WASM_TYPE, Type::V128);
} | rust_cleaned_test_functions.jsonl/118973 | {
"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,
1670,
10530,
9763,
368,
341,
286,
2060,
10714,
10297,
72,
18,
17,
486,
54,
52584,
4189,
11,
3990,
486,
40,
18,
17,
317,
286,
2060,
10714,
10297,
72,
21,
19,
486,
54,
52584,
4189,
11,
3990,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_iterate() {
let mut m = HashMap::with_capacity(4);
for i in 0..32 {
assert!(m.insert(i, i * 2).is_none());
}
assert_eq!(m.len(), 32);
let mut observed: u32 = 0;
for (k, v) in &m {
assert_eq!(*v, *k * 2);
observ... | rust_cleaned_test_functions.jsonl/8510 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 226
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11723,
349,
368,
341,
286,
1077,
5206,
296,
284,
10528,
486,
4197,
35603,
7,
19,
317,
286,
369,
600,
304,
220,
15,
496,
18,
17,
341,
310,
2060,
10297,
76,
7030,
1956,
11,
600,
353,
220,
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_transpile_jsx_pragma() {
let specifier =
ModuleSpecifier::parse("https://deno.land/x/mod.ts").unwrap();
let source = r#"
/** @jsx h */
/** @jsxFrag Fragment */
import { h, Fragment } from "https://deno.land/x/mod.ts";
function App() {
return (
<div><></></div>
);
}"#;
... | rust_cleaned_test_functions.jsonl/133956 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 402
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7965,
12192,
26250,
87,
620,
4101,
1728,
368,
341,
262,
1077,
97616,
4035,
414,
13711,
87297,
486,
6400,
445,
2428,
1110,
5183,
78,
87627,
10776,
38479,
21288,
1827,
15454,
543,
262,
1077,
2530,
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_equal_jitter_backoff() {
let mut backoff = EqualJitterBackoff::new(2, 7, 3);
let first_delay_dur = backoff.next_delay_duration().unwrap();
assert!(first_delay_dur >= Duration::from_millis(1));
assert!(first_delay_dur <= Duration::from_millis(2));
let sec... | rust_cleaned_test_functions.jsonl/16667 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 325
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11478,
5374,
3248,
3895,
1847,
368,
341,
286,
1077,
5206,
1182,
1847,
284,
38474,
41,
3248,
3707,
1847,
486,
931,
7,
17,
11,
220,
22,
11,
220,
18,
626,
286,
1077,
1156,
22198,
82289,
284,
1182... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_freeze_thaw_dups() {
let program_id = crate::id();
let account1_key = Pubkey::new_unique();
let mut account1_account = SolanaAccount::new(
account_minimum_balance(),
Account::get_packed_len(),
&program_id,
);
let account... | rust_cleaned_test_functions.jsonl/44647 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1183
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8905,
2986,
5854,
672,
814,
8602,
368,
341,
286,
1077,
2025,
842,
284,
17717,
486,
307,
543,
286,
1077,
2692,
16,
3097,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
5206,
2692,
16,
13500,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_real_proof_with_revocation() {
let number_of_attributes = 10;
init!("agency");
let institution_did = settings::get_config_value(settings::CONFIG_INSTITUTION_DID).unwrap();
let (faber, alice) = ::connection::tests::create_connected_connections();
// CREATE... | rust_cleaned_test_functions.jsonl/102943 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1765
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15266,
86757,
6615,
38082,
2276,
368,
341,
286,
1077,
1372,
3575,
18240,
284,
220,
16,
15,
280,
286,
2930,
17223,
55565,
797,
286,
1077,
14898,
814,
307,
284,
5003,
486,
455,
5332,
3142,
23369,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_has_no_wpa3_capable_iface() {
let mut exec = fuchsia_async::Executor::new().expect("failed to create an executor");
// Create a configured ClientIfaceContainer.
let test_values = test_setup(&mut exec);
let (mut iface_manager, _) = create_iface_manager_with_client... | rust_cleaned_test_functions.jsonl/71970 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 379
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21778,
6536,
1670,
6595,
18,
16388,
480,
67666,
368,
341,
286,
1077,
5206,
3883,
284,
282,
73391,
28346,
486,
25255,
486,
931,
1005,
17119,
445,
16091,
311,
1855,
458,
31558,
3071,
286,
442,
4230,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_roundtrip_nested_dict() {
let inner: DictionaryArray<datatypes::Int32Type> =
vec!["a", "b", "a"].into_iter().collect();
let array = Arc::new(inner) as ArrayRef;
let dctfield = Field::new("dict", array.data_type().clone(), false);
let s = StructArray... | rust_cleaned_test_functions.jsonl/48759 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 325
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29896,
32981,
66279,
5243,
368,
341,
286,
1077,
9179,
25,
10466,
1857,
27,
5911,
60913,
486,
1072,
18,
17,
929,
29,
4035,
310,
7486,
0,
1183,
64,
497,
330,
65,
497,
330,
64,
5521,
18122,
11723... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compute_shred_version() {
assert_eq!(compute_shred_version(&Hash::default(), None), 1);
let mut hard_forks = HardForks::default();
assert_eq!(
compute_shred_version(&Hash::default(), Some(&hard_forks)),
1
);
hard_forks.register(1);
... | rust_cleaned_test_functions.jsonl/49677 | {
"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,
57028,
3712,
1151,
9438,
368,
341,
286,
2060,
10714,
10297,
27706,
3712,
1151,
9438,
2099,
6370,
486,
2258,
1507,
2240,
701,
220,
16,
317,
286,
1077,
5206,
2588,
761,
73302,
284,
11232,
37,
73302,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mc_mhd_solver() {
const NUM_DECISIONS: usize = 8; // for a start
let problem = ProblemSubsetSum::random(NUM_DECISIONS);
assert!(problem.is_legal());
let mut solver =
MhdMonteCarloSolver::<MinimalSolution, ProblemSubsetSum>::builder(&problem);
... | rust_cleaned_test_functions.jsonl/61468 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 904
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43357,
717,
15990,
53156,
368,
341,
286,
733,
15943,
23773,
24211,
50,
25,
22301,
284,
220,
23,
26,
442,
369,
264,
1191,
198,
286,
1077,
3491,
284,
22079,
70584,
9190,
486,
11463,
78928,
23773,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_regex_match_path() {
let _m1 = mock("GET", Matcher::Regex(r"^/a/\d{1}$".to_string()))
.with_body("aaa")
.create();
let _m2 = mock("GET", Matcher::Regex(r"^/b/\d{1}$".to_string()))
.with_body("bbb")
.create();
let (_, _, body_a) = request("GET /a/1", "... | rust_cleaned_test_functions.jsonl/82406 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 334
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41832,
10708,
2638,
368,
341,
262,
1077,
716,
76,
16,
284,
7860,
445,
3806,
497,
60632,
486,
32464,
2601,
86490,
14,
64,
34319,
67,
90,
16,
31716,
3263,
983,
3904,
12145,
286,
659,
4197,
14114,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_movzbl_reg_reg() {
assert_emit!(0x0f, 0xb6, 0xc0; emit_movzbl_reg_reg(RAX, RAX));
assert_emit!(0x41, 0x0f, 0xb6, 0xc7; emit_movzbl_reg_reg(R15, RAX));
assert_emit!(0x44, 0x0f, 0xb6, 0xfb; emit_movzbl_reg_reg(RBX, R15));
assert_emit!(0x40, 0x0f, 0xb6, 0xce; emit_mo... | rust_cleaned_test_functions.jsonl/85458 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 217
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55798,
89,
2024,
4920,
4920,
368,
341,
286,
2060,
69082,
10297,
15,
87,
15,
69,
11,
220,
15,
7929,
21,
11,
220,
15,
8148,
15,
26,
16691,
55798,
89,
2024,
4920,
4920,
2785,
2954,
11,
431,
295... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_insert_nonleaf_table() {
given(r#"
[other.table]"#
).running(|root| {
root["servers"] = table();
root["servers"]["alpha"] = table();
root["servers"]["alpha"]["ip"] = value("10.0.0.1");
root["servers"]["alpha"]["dc"] = value("eqdc10");
}).produc... | rust_cleaned_test_functions.jsonl/36875 | {
"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,
17678,
21637,
24153,
5237,
368,
341,
262,
2661,
2601,
2,
698,
286,
508,
1575,
10336,
19177,
4956,
262,
7457,
27173,
22428,
2888,
91,
341,
286,
3704,
1183,
67696,
1341,
284,
1965,
543,
286,
3704,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vec3a_align() {
use std::mem;
assert_eq!(16, mem::size_of::<Vec3A>());
assert_eq!(16, mem::align_of::<Vec3A>());
assert_eq!(16, mem::size_of::<Vec3AMask>());
assert_eq!(16, mem::align_of::<Vec3AMask>());
} | rust_cleaned_test_functions.jsonl/23477 | {
"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,
13251,
18,
64,
37015,
368,
341,
262,
990,
1460,
486,
10536,
280,
262,
2060,
10714,
10297,
16,
21,
11,
1833,
486,
2141,
3575,
27638,
10050,
18,
32,
32872,
262,
2060,
10714,
10297,
16,
21,
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... | 1 |
#[test]
fn test_explorer_api_with_after_transactions_error() {
let (mut testkit, api) = init_testkit();
let tx = KeyPair::random().increment(SERVICE_ID, 42);
testkit.create_block_with_transaction(tx.clone());
let response = api
.public(ApiKind::Explorer)
.query(&CallStatusQuery... | rust_cleaned_test_functions.jsonl/55306 | {
"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,
2702,
79825,
11697,
6615,
19844,
68182,
4096,
368,
341,
262,
1077,
320,
6984,
1273,
8226,
11,
6330,
8,
284,
2930,
4452,
8226,
543,
262,
1077,
9854,
284,
5309,
12443,
486,
11463,
1005,
35744,
3759,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_round_trip() {
for (raw_schema, value) in SCHEMAS_TO_VALIDATE.iter() {
let schema = Schema::parse_str(raw_schema)
.expect(&format!("failed to parse schema: {}", raw_schema));
let encoded =
to_avro_datum(&schema, value.clone()).expect(&format!("failed ... | rust_cleaned_test_functions.jsonl/128381 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 262
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29896,
63883,
368,
341,
262,
369,
320,
1041,
25371,
11,
897,
8,
304,
7531,
1799,
40092,
8650,
63927,
19471,
368,
341,
286,
1077,
10802,
284,
12539,
486,
6400,
2895,
22460,
25371,
340,
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... | 2 |
#[test]
fn test_stakes_vote_account_disappear_reappear() {
let mut stakes = Stakes::default();
stakes.epoch = 4;
let ((vote_pubkey, mut vote_account), (stake_pubkey, stake_account)) =
create_staked_node_accounts(10);
stakes.store(&vote_pubkey, &vote_account);
... | rust_cleaned_test_functions.jsonl/4476 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 540
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1261,
2050,
54360,
13500,
9932,
40766,
1288,
40766,
368,
341,
286,
1077,
5206,
44425,
284,
794,
2050,
486,
2258,
543,
286,
44425,
92924,
284,
220,
19,
401,
286,
1077,
1781,
29358,
34014,
792,
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_quoted_string() {
let x = "'it''s mine'";
let p = quoted_string(x).unwrap();
assert_eq!(p, "it's mine");
} | rust_cleaned_test_functions.jsonl/114449 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 83
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11280,
9253,
3904,
368,
341,
286,
1077,
856,
284,
7178,
275,
4605,
82,
10485,
21689,
286,
1077,
281,
284,
23237,
3904,
2075,
568,
15454,
543,
286,
2060,
10714,
10297,
79,
11,
330,
275,
594,
1048... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_thread_name_custom() {
let custom_thread = thread::Builder::new()
.name("custom-thread".to_string())
.spawn(move || {
let logger = Logger::mock_new();
let mut reader = logger.mock_init();
logger
.... | rust_cleaned_test_functions.jsonl/102862 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 384
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10814,
1269,
15875,
368,
341,
286,
1077,
2526,
10814,
284,
4516,
486,
3297,
486,
931,
741,
310,
659,
606,
445,
9163,
60804,
3263,
983,
3904,
2398,
310,
659,
46087,
34081,
1369,
341,
394,
1077,
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... | 2 |
#[test]
fn test_to_vec() {
check_to_vec(vec![]);
check_to_vec(vec![5]);
check_to_vec(vec![3, 2]);
check_to_vec(vec![2, 3]);
check_to_vec(vec![5, 1, 2]);
check_to_vec(vec![1, 100, 2, 3]);
check_to_vec(vec![1, 3, 5, 7, 9, 2, 4, 6, 8, 0]);
check_to_vec(vec![2, 4, 6, 2, 1, 8, 10, 3, ... | rust_cleaned_test_functions.jsonl/62361 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 397
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
13251,
368,
341,
262,
1779,
2346,
13251,
25592,
0,
56703,
262,
1779,
2346,
13251,
25592,
20703,
20,
2558,
262,
1779,
2346,
13251,
25592,
20703,
18,
11,
220,
17,
2558,
262,
1779,
2346,
13251,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_is_on_curve() {
assert!(bool::from(G2Affine::identity().is_on_curve()));
assert!(bool::from(G2Affine::generator().is_on_curve()));
assert!(bool::from(G2Projective::identity().is_on_curve()));
assert!(bool::from(G2Projective::generator().is_on_curve()));
let z = Fp2 {
... | rust_cleaned_test_functions.jsonl/47796 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 685
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
4470,
43407,
368,
341,
262,
2060,
10297,
2641,
486,
1499,
6699,
17,
25841,
482,
486,
16912,
1005,
285,
4470,
43407,
7392,
262,
2060,
10297,
2641,
486,
1499,
6699,
17,
25841,
482,
486,
35851,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_split_secret_connection() {
const MESSAGES_1_TO_2: &[&str] = &["one", "three", "five", "seven"];
const MESSAGES_2_TO_1: &[&str] = &["two", "four", "six", "eight"];
let peer1_listener = TcpListener::bind("127.0.0.1:0").expect("to be able to bind to 127.0.0.1");
let peer1_addr = pe... | rust_cleaned_test_functions.jsonl/8911 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1449
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
21962,
15866,
368,
341,
262,
733,
386,
54013,
62,
16,
8650,
62,
17,
25,
44590,
5,
495,
60,
284,
609,
1183,
603,
497,
330,
27856,
497,
330,
52670,
497,
330,
80185,
6332,
262,
733,
386,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_addition() {
let additions = [
["1", "1", "2"],
[
"3618502788666131213697322783095070105623107215331596699973092056135872020480",
"1",
"0",
],
];
for item in additions.iter() {
... | rust_cleaned_test_functions.jsonl/128297 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 337
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
680,
368,
341,
286,
1077,
37214,
284,
2278,
310,
4383,
16,
497,
330,
16,
497,
330,
17,
8097,
310,
2278,
394,
330,
18,
21,
16,
23,
20,
15,
17,
22,
23,
23,
21,
21,
21,
16,
18,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_different_protocol_version() {
let _setup = SetupMocks::init();
let handle = create_connection_with_invite("alice", INVITE_DETAIL_STRING).unwrap();
CONNECTION_MAP.get_mut(handle, |connection| {
match connection {
Connections::V1(_) => Ok(()),... | rust_cleaned_test_functions.jsonl/20889 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 458
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82741,
34880,
9438,
368,
341,
286,
1077,
716,
15188,
284,
18626,
72577,
486,
2327,
1428,
286,
1077,
3705,
284,
1855,
15866,
6615,
94910,
445,
63195,
497,
66924,
5991,
32905,
12283,
568,
15454,
1428,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_get_registrations() {
run_async_test(async {
ffx_config::set(
(CONFIG_KEY_REGISTRATIONS, ConfigLevel::User),
json!({
"repo1": {
"target1": {
"repo_name": "repo1",
... | rust_cleaned_test_functions.jsonl/98272 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2165
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
4920,
3758,
804,
368,
341,
286,
1598,
28346,
4452,
18285,
341,
310,
282,
8298,
5332,
486,
746,
1006,
394,
320,
24652,
6600,
8064,
29503,
21792,
11,
5532,
4449,
486,
1474,
1326,
394,
2951,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tcpds_query_2() {
assert_eq!(
parse_sql(
"
WITH wscs
AS (SELECT sold_date_sk,
sales_price
FROM (SELECT ws_sold_date_sk sold_date_sk,
ws_ext_sales_price sales_price
FROM w... | rust_cleaned_test_functions.jsonl/50101 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2515
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45562,
5356,
5738,
62,
17,
368,
341,
262,
2060,
10714,
33673,
286,
4715,
18063,
1006,
310,
6228,
262,
4769,
289,
2388,
82,
198,
260,
5752,
320,
4858,
6088,
4164,
33811,
345,
503,
6625,
9040,
198... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bug_sint() {
{
let mut x = TestBugSint::new();
x.set_s32(-1);
test_serialize_deserialize_with_dynamic("08 01", &x);
}
{
let mut x = TestBugSint::new();
x.set_s64(-2);
test_serialize_deserialize_with_dynamic("10 03", &x);
}
} | rust_cleaned_test_functions.jsonl/2723 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 170
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73232,
643,
396,
368,
341,
262,
341,
286,
1077,
5206,
856,
284,
3393,
46773,
50,
396,
486,
931,
543,
286,
856,
980,
643,
18,
17,
4080,
16,
317,
286,
1273,
88686,
15768,
9050,
6615,
45992,
445,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cmd_dove_call_with_params() {
let project_name = "project_call_with_params";
let project_folder = new_demo_project(project_name).unwrap();
for call in [
vec!["call", "one_param", "-a", "true"],
vec!["call", "two_params", "--args", "1", "1"],
] {
dove(&cal... | rust_cleaned_test_functions.jsonl/70405 | {
"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,
11684,
814,
994,
13429,
6615,
6745,
368,
341,
262,
1077,
2390,
1269,
284,
330,
4987,
13429,
6615,
6745,
876,
262,
1077,
2390,
15268,
284,
501,
47830,
16352,
21168,
1269,
568,
15454,
1428,
262,
369... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_async_ring_buffer_write_all_read() {
let thread_handle = thread::spawn(move ||{
for i in 0..1024 {
let ring_buffer = Arc::new(RingBuffer::new(64));
let mut reader = RingBufferReader::new(ring_buffer.clone());
let mut writer = RingBufferWriter::new(ring_buffer.cl... | rust_cleaned_test_functions.jsonl/22914 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2508
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28346,
34683,
7776,
9165,
5705,
6443,
368,
341,
262,
1077,
4516,
10630,
284,
4516,
486,
46087,
34081,
1369,
515,
414,
369,
600,
304,
220,
15,
496,
16,
15,
17,
19,
341,
286,
1077,
10058,
7776,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_eval_let_lam_app_fst() {
let (_, expr) = expression(Span::new(r"let fst = \x -> \y -> x in fst 1 2")).unwrap();
let res = expr.to_run_expr().eval(&im::HashMap::new());
assert_eq!(res, Value::Int64(1));
} | rust_cleaned_test_functions.jsonl/39998 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 110
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
62,
1149,
907,
309,
8191,
761,
267,
368,
341,
262,
1077,
39464,
15169,
8,
284,
7493,
3759,
848,
486,
931,
2601,
1,
1149,
48434,
284,
1124,
87,
1464,
1124,
88,
1464,
856,
304,
48434,
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_days_in_year_month() {
// Common year
assert_eq!(days_in_year_month(2019, 1), 31);
assert_eq!(days_in_year_month(2019, 2), 28);
assert_eq!(days_in_year_month(2019, 3), 31);
assert_eq!(days_in_year_month(2019, 4), 30);
assert_eq!(days_in_year_month(... | rust_cleaned_test_functions.jsonl/21871 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 698
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28353,
1243,
14645,
18933,
368,
341,
286,
442,
7718,
1042,
198,
286,
2060,
10714,
10297,
13778,
1243,
14645,
18933,
7,
17,
15,
16,
24,
11,
220,
16,
701,
220,
18,
16,
317,
286,
2060,
10714,
102... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_add_assign() {
let code = String::from("
engine.blub += 12.7;
");
let parser = Parser::new(code.clone());
let mut lexer = Token::lexer(code.as_str());
let expr_res = parser.parse_expr(&mut lexer, &[ Token::Semicolon ]);
assert!(expr_res.is_ok());
expr... | rust_cleaned_test_functions.jsonl/43221 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 152
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
2891,
20688,
368,
341,
262,
1077,
2038,
284,
923,
486,
1499,
70576,
286,
4712,
10404,
392,
1421,
220,
16,
17,
13,
22,
280,
262,
39887,
262,
1077,
6729,
284,
21102,
486,
931,
15842,
15997,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_4_nibbles() {
let abcd = to_4_be_nibles(0x1234);
assert_eq!(abcd, [1, 2, 3, 4]);
} | rust_cleaned_test_functions.jsonl/130327 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 66
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
19,
1089,
579,
38763,
368,
341,
262,
1077,
668,
4385,
284,
311,
62,
19,
21263,
1089,
20410,
7,
15,
87,
16,
17,
18,
19,
317,
262,
2060,
10714,
10297,
68644,
11,
508,
16,
11,
220,
17,
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 |
#[test]
fn test_string_category() {
// sanaity check that we get sensible results when category is String type
let (cats, category) = string_category_ab();
assert_eq!(category.num_bins(), cats.len() + 1);
assert_eq!(category.indices().collect::<Vec<_>>(), vec![0, 1, 2]);
assert_eq!(category.... | rust_cleaned_test_functions.jsonl/27591 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 325
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3904,
11847,
368,
341,
262,
442,
274,
3362,
487,
1779,
429,
582,
633,
37661,
3059,
979,
5582,
374,
923,
943,
198,
262,
1077,
320,
37452,
11,
5582,
8,
284,
914,
11847,
22885,
543,
262,
2060,
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_query_matches_with_wildcard_at_the_root() {
allocations::record(|| {
let language = get_language("javascript");
let query = Query::new(
language,
"
(_
(comment) @doc
.
(function_declaration
... | rust_cleaned_test_functions.jsonl/25155 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 727
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
38344,
6615,
1670,
695,
4951,
3752,
16068,
12993,
368,
341,
262,
69642,
486,
8548,
79453,
341,
286,
1077,
4128,
284,
633,
29021,
445,
14073,
797,
286,
1077,
3239,
284,
11361,
486,
931,
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_hash_internal_state_error() {
solana_logger::setup();
let (genesis_config, mint_keypair) = create_genesis_config(100);
let bank = Bank::new(&genesis_config);
let key0 = solana_sdk::pubkey::new_rand();
bank.transfer(10, &mint_keypair, &key0).unwrap();
... | rust_cleaned_test_functions.jsonl/2587 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 328
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
23472,
4387,
4096,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
320,
77894,
5332,
11,
28337,
3097,
12670,
8,
284,
1855,
16322,
13774,
5332,
7,
16,
15,
15,
317,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fmt() {
let md5_checksum = Md5Checksum::from([
0xd7, 0xeb, 0xa3, 0x11, 0x42, 0x1b, 0xbc, 0x9d, 0x3a, 0xda, 0x44, 0x70, 0x9d, 0xd6,
0x15, 0x34,
]);
assert_eq!(md5_checksum.to_string(), "d7eba311421bbc9d3ada44709dd61534");
let md5_checksum =... | rust_cleaned_test_functions.jsonl/95257 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 359
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38128,
368,
341,
286,
1077,
10688,
20,
64038,
284,
53110,
20,
73190,
486,
1499,
8956,
310,
220,
15,
9703,
22,
11,
220,
15,
54468,
11,
220,
15,
9591,
18,
11,
220,
15,
87,
16,
16,
11,
220,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_immediate_dominators_graph1() {
let graph = create_test_graph();
let idoms = graph.compute_immediate_dominators(1).unwrap();
assert!(idoms.get(&1).is_none());
assert_eq!(*idoms.get(&2).unwrap(), 1);
assert_eq!(*idoms.get(&3).unwrap(), 2);
assert_e... | rust_cleaned_test_functions.jsonl/1480 | {
"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,
17895,
14636,
814,
7970,
2973,
14738,
16,
368,
341,
286,
1077,
4771,
284,
1855,
4452,
14738,
543,
286,
1077,
877,
6940,
284,
4771,
35347,
17895,
14636,
814,
7970,
2973,
7,
16,
568,
15454,
1428,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_grad_stops() -> Result<(), Box<dyn std::error::Error>> {
let stops = GradStops::new(vec![
GradStop::new(0.0, LinColor::new(1.0, 0.0, 0.0, 1.0)),
GradStop::new(0.5, LinColor::new(0.0, 1.0, 0.0, 1.0)),
GradStop::new(1.0, LinColor::new(0.0, 0.0, 1.0, 1.0)... | rust_cleaned_test_functions.jsonl/97805 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 378
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18352,
1261,
3721,
368,
1464,
5714,
68843,
8261,
92846,
1460,
486,
841,
486,
1454,
2452,
341,
286,
1077,
17933,
284,
21794,
623,
3721,
486,
931,
25592,
90515,
310,
21794,
10674,
486,
931,
7,
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_left_join() {
let lhs = &[0, 1, 1, 2, 3, 5];
let rhs = &[0, 1, 1, 3, 4];
let (l_idx, r_idx) = join(lhs, rhs, 0);
let out_left = &[0, 1, 1, 2, 2, 3, 4, 5];
let out_right = &[
Some(0),
Some(1),
Some(2),
Some(1... | rust_cleaned_test_functions.jsonl/80043 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1910
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9579,
31017,
368,
341,
286,
1077,
22505,
284,
44590,
15,
11,
220,
16,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
20,
935,
286,
1077,
12916,
284,
44590,
15,
11,
220,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_supplicant_sends_random_key_length() {
let mut env = test_util::FourwayTestEnv::new();
// Use arbitrarily chosen key_replay_counter.
let msg1 = env.initiate(12);
let (msg2, ptk) = env.send_msg1_to_supplicant(msg1.keyframe(), 12);
let mut buf = vec![];
... | rust_cleaned_test_functions.jsonl/22695 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 352
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
91480,
35237,
643,
1412,
22644,
3097,
5118,
368,
341,
286,
1077,
5206,
6105,
284,
1273,
18974,
486,
26972,
3117,
2271,
14359,
486,
931,
1428,
286,
442,
5443,
85657,
11882,
1376,
1288,
1363,
15730,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dynamic() {
// Test two ways of making the type parameter dynamic
let error = TestingError::new();
let error = TestingError::with_source(error).into_dynamic();
assert!(error.source().is_some());
let box_error: Box<dyn Error + 'static> = Box::new(error);
... | rust_cleaned_test_functions.jsonl/83542 | {
"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,
45992,
368,
341,
286,
442,
3393,
1378,
5510,
315,
3259,
279,
943,
5733,
8741,
198,
286,
1077,
1465,
284,
26768,
1454,
486,
931,
543,
286,
1077,
1465,
284,
26768,
1454,
486,
4197,
10347,
6390,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_kill() {
let mut world = World::new(5);
world.set(1, 1, true);
world.set(1, 1, false);
assert_eq!(world.is_alive(1, 1), false);
} | rust_cleaned_test_functions.jsonl/23842 | {
"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,
73327,
368,
341,
286,
1077,
5206,
1879,
284,
4337,
486,
931,
7,
20,
317,
286,
1879,
980,
7,
16,
11,
220,
16,
11,
830,
317,
286,
1879,
980,
7,
16,
11,
220,
16,
11,
895,
317,
286,
2060,
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 |
#[test]
fn test_delete_matching() {
let mut token_cache = TokenCache::new(CACHE_SIZE);
let key = build_test_key("", "audience");
// Verify deleting when cache is empty fails.
assert_eq!(
token_cache.delete_matching(key.auth_provider_type(), key.user_profile_id()),
... | rust_cleaned_test_functions.jsonl/88793 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 656
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11353,
70763,
368,
341,
286,
1077,
5206,
3950,
11529,
284,
9660,
8233,
486,
931,
3025,
17810,
4098,
317,
286,
1077,
1376,
284,
1936,
4452,
3097,
19814,
330,
7880,
1835,
3071,
286,
442,
25429,
3301... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mut() {
let span = span::mock().named("ret_mut");
let (collector, handle) = collector::mock()
.new_span(span.clone())
.enter(span.clone())
.event(
event::mock()
.with_fields(field::mock("a").with_value(&tracing::field::display(2)))
... | rust_cleaned_test_functions.jsonl/53250 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 377
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29523,
368,
341,
262,
1077,
9390,
284,
9390,
486,
16712,
1005,
30245,
445,
2122,
29523,
797,
262,
1077,
320,
91469,
11,
3705,
8,
284,
31953,
486,
16712,
741,
286,
659,
931,
37382,
66092,
15997,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_txn_store_gc2_with_long_key_prefix() {
test_txn_store_gc_multiple_keys(1024, MAX_TXN_WRITE_SIZE / 1024 * 3);
} | rust_cleaned_test_functions.jsonl/37885 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 66
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
92299,
14809,
49423,
17,
6615,
17799,
3097,
13974,
368,
341,
262,
1273,
92299,
14809,
49423,
45233,
12631,
7,
16,
15,
17,
19,
11,
8334,
18819,
45,
17475,
4098,
608,
220,
16,
15,
17,
19,
353,
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 |
#[test]
fn test_323_reserved_expansion() {
let mut templates = [
UriTemplate::new("{+var}"),
UriTemplate::new("{/var,empty}"),
UriTemplate::new("{/var,undef}"),
UriTemplate::new("{+hello}"),
UriTemplate::new("{+half}"),
UriTemplate::new("{base}index"),
... | rust_cleaned_test_functions.jsonl/36933 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1638
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
18,
17,
18,
74913,
14214,
10501,
368,
341,
262,
1077,
5206,
19911,
284,
2278,
286,
17226,
7275,
486,
931,
13976,
10,
947,
92,
4461,
286,
17226,
7275,
486,
931,
13976,
14,
947,
11,
3194,
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,
1,
1,
1,
1... | 2 |
#[test]
fn test_syntax() {
assert_eq!(SyntaxDefinition::from("plugins.rs"), SyntaxDefinition::Rust);
assert_eq!(SyntaxDefinition::from("plugins.py"), SyntaxDefinition::Python);
assert_eq!(SyntaxDefinition::from("header.h"), SyntaxDefinition::C);
assert_eq!(SyntaxDefinition::from(... | rust_cleaned_test_functions.jsonl/52130 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 201
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
78894,
368,
341,
286,
2060,
10714,
10297,
33890,
10398,
486,
1499,
445,
18716,
25638,
3975,
32117,
10398,
486,
49,
590,
317,
286,
2060,
10714,
10297,
33890,
10398,
486,
1499,
445,
18716,
7197,
3975,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stdin_stdout_count_bytes() {
let input = build_ascii_block(521);
let mut output = String::from_utf8(input.clone()).unwrap();
output.truncate(256);
new_ucmd!()
.args(&["status=none", "count=256", "iflag=count_bytes"])
.pipe_in(input)
.run()
.no_stde... | rust_cleaned_test_functions.jsonl/59378 | {
"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,
15656,
258,
67416,
3180,
12524,
368,
341,
262,
1077,
1946,
284,
1936,
50238,
7113,
7,
20,
17,
16,
317,
262,
1077,
5206,
2550,
284,
923,
486,
1499,
39453,
23,
5384,
15997,
6011,
15454,
543,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_close_at_first_position() {
// This path closes at the first position which requires some special handling in the event
let mut builder = Path::builder();
builder.begin(point(107.400665, 91.79798));
builder.line_to(point(108.93136, 91.51076));
builder.line_to(point... | rust_cleaned_test_functions.jsonl/102434 | {
"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,
12704,
3752,
12978,
9661,
368,
341,
262,
442,
1096,
1815,
33250,
518,
279,
1156,
2309,
892,
7460,
1045,
3281,
11589,
304,
279,
1538,
63477,
262,
1077,
5206,
7363,
284,
7933,
486,
17850,
1428,
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_get_vote_accounts() {
let RpcHandler {
io,
meta,
mut bank,
bank_forks,
alice,
leader_vote_keypair,
block_commitment_cache,
..
} = start_rpc_handler_with_tx(&solana_sdk::pubkey::new_ran... | rust_cleaned_test_functions.jsonl/3058 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 4353
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
54360,
55665,
368,
341,
286,
1077,
79961,
3050,
341,
310,
6399,
345,
310,
8823,
345,
310,
5206,
6073,
345,
310,
6073,
761,
73302,
345,
310,
70433,
345,
310,
7653,
54360,
3097,
12670,
345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
#[test]
fn test_table_iterator_seek() {
let (src, size) = build_table(build_data());
let table = Table::new(Options::default(), wrap_buffer(src), size).unwrap();
let mut iter = table.iter();
iter.seek(b"bcd");
assert!(iter.valid());
assert_eq!(
curre... | rust_cleaned_test_functions.jsonl/3808 | {
"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,
5237,
13491,
74473,
368,
341,
286,
1077,
320,
3548,
11,
1379,
8,
284,
1936,
5237,
43333,
1769,
5231,
286,
1077,
1965,
284,
6633,
486,
931,
7,
3798,
486,
2258,
1507,
15061,
7776,
14705,
701,
1379... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_need_sync_for_qc() {
let mut inserter = TreeInserter::default();
let block_store = inserter.block_store();
// build a tree of the following form
// genesis <- a1 <- a2 <- a3
let genesis = block_store.root();
let a1 = inserter.insert_block_with_qc(QuorumCert::certificate_... | rust_cleaned_test_functions.jsonl/59237 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 597
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71506,
23008,
5478,
8976,
66,
368,
341,
262,
1077,
5206,
47325,
465,
284,
8942,
641,
90727,
486,
2258,
543,
262,
1077,
2504,
14809,
284,
47325,
465,
15697,
14809,
1428,
262,
442,
1936,
264,
4916,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unchanged_diff_creates_empty_objects() {
let mut doc = Frontend::new();
let patch = amp::Patch {
actor: Some(doc.actor_id.clone()),
seq: Some(1),
clock: hashmap! {doc.actor_id.clone() => 1},
deps: Vec::new(),
max_op: 1,
pending_changes: 0,
... | rust_cleaned_test_functions.jsonl/77849 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 506
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
3185,
3726,
15850,
92862,
973,
15124,
24873,
368,
341,
262,
1077,
5206,
4629,
284,
14902,
408,
486,
931,
543,
262,
1077,
10900,
284,
22758,
486,
43622,
341,
286,
12089,
25,
4329,
19153,
41368,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rank1() {
for &p in TEST_PROB {
for &n in TEST_SIZE {
let mut rng: StdRng = SeedableRng::from_seed([0; 32]);
let mut bv = BitVector::new();
let mut ba = BitArray::new(n as usize);
for i in 0..n {
... | rust_cleaned_test_functions.jsonl/50480 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 443
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20417,
16,
368,
341,
286,
369,
609,
79,
304,
13602,
5756,
33,
341,
310,
369,
609,
77,
304,
13602,
4098,
341,
394,
1077,
5206,
28422,
25,
42517,
49,
968,
284,
35822,
480,
49,
968,
486,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_env_set_get_huge() {
let n = make_rand_name();
let s = repeat("x").take(10000).collect::<String>();
setenv(&n, &s);
assert_eq!(getenv(&n), Some(s));
unsetenv(&n);
assert_eq!(getenv(&n), None);
} | rust_cleaned_test_functions.jsonl/72109 | {
"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,
15879,
2602,
3062,
1523,
4733,
368,
341,
286,
1077,
308,
284,
1281,
33864,
1269,
543,
286,
1077,
274,
284,
13153,
445,
87,
1827,
22769,
7,
16,
15,
15,
15,
15,
568,
17384,
27638,
703,
3913,
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_step() {
let mut ps = ParseStream {
content: "Hello".to_string(),
cursor: 1,
};
let val = ps.step("el").unwrap();
assert_eq!(ps.cursor, 3);
assert_eq!(val, "el");
} | rust_cleaned_test_functions.jsonl/41152 | {
"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,
11946,
368,
341,
286,
1077,
5206,
4726,
284,
14775,
3027,
341,
310,
2213,
25,
330,
9707,
3263,
983,
3904,
3148,
310,
8128,
25,
220,
16,
345,
286,
3634,
286,
1077,
1044,
284,
4726,
21465,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_update_can_start() {
let policy_data = PolicyData { current_time: clock::now() };
let result = StubPolicy::update_can_start(&policy_data, &StubPlan);
assert_eq!(result, UpdateDecision::Ok);
} | rust_cleaned_test_functions.jsonl/80117 | {
"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,
8882,
27421,
4906,
368,
341,
286,
1077,
4842,
1769,
284,
10974,
1043,
314,
1482,
3009,
25,
8866,
486,
3328,
368,
2605,
286,
1077,
1102,
284,
66611,
13825,
486,
2386,
27421,
4906,
2099,
34790,
1769... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_comparisons_by_sorting() {
assert::all_true(
r#"
sorted([float('inf'), float('-inf'), float('nan'), 1e300, -1e300, 1.0, -1.0, 1, -1, 1e-300, -1e-300, 0, 0.0, float('-0.0'), 1e-300, -1e-300]) == [float('-inf'), -1e+300, -1.0, -1, -1e-300, -1e-300, 0, 0.0, -0.0, 1e-300, 1e-300,... | rust_cleaned_test_functions.jsonl/114100 | {
"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,
2965,
1732,
19379,
3710,
18435,
287,
368,
341,
286,
2060,
486,
541,
16082,
1006,
310,
435,
2,
698,
28298,
2561,
3649,
492,
13573,
4567,
2224,
14654,
13573,
4567,
2224,
492,
18759,
4567,
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_occupied_entry_key() {
let mut a = HashMap::new();
let key = "hello there";
let value = "value goes here";
assert!(a.is_empty());
a.insert(key.clone(), value.clone());
assert_eq!(a.len(), 1);
assert_eq!(a[key], value);
match a.entr... | rust_cleaned_test_functions.jsonl/8529 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 265
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
40356,
9078,
3097,
368,
341,
286,
1077,
5206,
264,
284,
10528,
486,
931,
543,
286,
1077,
1376,
284,
330,
14990,
1052,
876,
286,
1077,
897,
284,
330,
957,
5780,
1588,
876,
286,
2060,
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... | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.