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_packed_delta_de() {
let packed = vec![
0x03, 0x0a, 0x97, 0x00, 0xc6, 0x87, 0x41, 0x10, 0x22, 0xfb, 0x34,
];
let expected = PackedDeltas(vec![10, -105, 0, -58, 0, 0, 0, 0, 0, 0, 0, 0, 4130, -1228]);
let deserialized: PackedDeltas = from_bytes(&packed, 1... | rust_cleaned_test_functions.jsonl/82215 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 209
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
11191,
26710,
2259,
368,
341,
286,
1077,
19375,
284,
7486,
90515,
310,
220,
15,
87,
15,
18,
11,
220,
15,
87,
15,
64,
11,
220,
15,
87,
24,
22,
11,
220,
15,
87,
15,
15,
11,
220,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_key_manager_file_dict_missing() {
// create initial dictionaries.
let (tmp, manager) = new_tmp_key_manager(None, None, None, None);
let manager = manager.unwrap().unwrap();
manager.new_file("foo").unwrap();
drop(manager);
remove_file(tmp.path().jo... | rust_cleaned_test_functions.jsonl/32261 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 203
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3097,
12144,
2458,
5243,
40447,
368,
341,
286,
442,
1855,
2856,
57514,
624,
286,
1077,
320,
5173,
11,
6645,
8,
284,
501,
16125,
3097,
12144,
26717,
11,
2240,
11,
2240,
11,
2240,
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_parse() {
let buf = [0, 0, 1, 2, 0, 8, 0, 0];
let (packet, body_range) =
UdpPacket::parse(&buf[..], TEST_SRC_IPV4, TEST_DST_IPV4).unwrap();
assert_eq!(body_range, 8..8);
assert!(packet.src_port().is_none());
assert_eq!(packet.dst_port(... | rust_cleaned_test_functions.jsonl/78657 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 472
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
368,
341,
1789,
286,
1077,
6607,
284,
508,
15,
11,
220,
15,
11,
220,
16,
11,
220,
17,
11,
220,
15,
11,
220,
23,
11,
220,
15,
11,
220,
15,
935,
286,
1077,
320,
24829,
11,
2487,
969... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_message_to_vec() {
let msg = Message::new(MessageType::HEARTBEAT);
let serialized_msg = msg.to_vec().unwrap();
assert_eq!(serialized_msg.len(), 200);
} | rust_cleaned_test_functions.jsonl/27168 | {
"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,
6462,
2346,
13251,
368,
341,
286,
1077,
3750,
284,
4856,
486,
931,
29359,
929,
486,
1799,
2992,
11594,
828,
317,
286,
1077,
32916,
6483,
284,
3750,
2389,
13251,
1005,
15454,
543,
286,
2060,
10714,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_deleting_existing_bin() {
run_with_server(|mut test_env| {
let bin = test_env.create_bin().unwrap();
let _deleted = test_env.delete_bin(&bin.id).unwrap();
let ref storage = test_env.server.storage.lock().unwrap();
assert!(storage.get_bin_summary(&bin.id).is_no... | rust_cleaned_test_functions.jsonl/56478 | {
"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,
2259,
35935,
62630,
21816,
368,
341,
262,
1598,
6615,
12015,
22428,
6984,
1273,
15879,
91,
341,
286,
1077,
9544,
284,
1273,
15879,
2520,
21816,
1005,
15454,
543,
286,
1077,
716,
26521,
284,
1273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_reset_clear_bank() {
let ledger_path = get_tmp_ledger_path!();
{
let blockstore = Blockstore::open(&ledger_path)
.expect("Expected to be able to open database ledger");
let GenesisConfigInfo { genesis_config, .. } = create_genesis_config(2)... | rust_cleaned_test_functions.jsonl/106272 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 609
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18983,
21811,
35733,
368,
341,
286,
1077,
46933,
2638,
284,
633,
16125,
38367,
1389,
2638,
0,
543,
286,
341,
310,
1077,
2504,
4314,
284,
8362,
4314,
486,
2508,
2099,
50704,
2638,
340,
394,
659,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_update_config_simple() {
let mut doc = create_doc();
assert!(!doc["status"]["disabled"].as_bool().unwrap());
handle_update_configuration(&mut doc, "status.disabled", "true").unwrap();
assert!(doc["status"]["disabled"].as_bool().unwrap());
let new_confi... | rust_cleaned_test_functions.jsonl/134242 | {
"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,
8882,
5332,
30015,
368,
341,
286,
1077,
5206,
4629,
284,
1855,
18869,
1428,
286,
2060,
0,
3471,
5236,
1183,
2829,
11018,
11978,
5521,
300,
22159,
1005,
15454,
5231,
286,
3705,
8882,
35726,
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_status_output() {
let t = TestDirectory::create();
cmd(&t).arg("status").assert().failure();
cmd(&t).arg("start").arg("foo").assert().success();
assert!(t.path.exists());
cmd(&t).arg("status").assert().success();
} | rust_cleaned_test_functions.jsonl/26340 | {
"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,
4773,
7645,
368,
341,
262,
1077,
259,
284,
3393,
9310,
486,
3182,
1428,
262,
5439,
2099,
83,
568,
858,
445,
2829,
1827,
2207,
1005,
28939,
1428,
262,
5439,
2099,
83,
568,
858,
445,
2468,
1827,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_convert_sample_async() {
gst::init().unwrap();
let l = glib::MainLoop::new(None, false);
let mut in_buffer = gst::Buffer::with_size(320 * 240 * 4).unwrap();
{
let buffer = in_buffer.get_mut().unwrap();
let mut data = buffer.map_writable()... | rust_cleaned_test_functions.jsonl/47679 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 925
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
17491,
28346,
368,
341,
286,
43769,
486,
2327,
1005,
15454,
1428,
286,
1077,
326,
284,
342,
2740,
486,
6202,
14620,
486,
931,
26717,
11,
895,
626,
286,
1077,
5206,
304,
7776,
284,
43769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_credential(){
use utils::constants::SERIALIZED_CREDENTIAL;
settings::set_defaults();
let handle = credential::from_string(SERIALIZED_CREDENTIAL).unwrap();
let bad_handle = 1123;
let command_handle = 0;
assert_eq!(vcx_get_credential(command_hand... | rust_cleaned_test_functions.jsonl/7552 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 335
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
666,
30320,
3032,
286,
990,
12439,
486,
15763,
486,
31981,
88727,
920,
81509,
280,
286,
5003,
486,
746,
42290,
543,
286,
1077,
3705,
284,
40207,
486,
1499,
3904,
3759,
640,
88727,
920,
81509... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_verify_hmac_valid() {
// Test for various lengths of the key and contents.
for len in 0..128 {
let key = vec![0; len];
let contents = vec![0; len];
let mac = hmac_256::<Sha256>(&key, &contents);
assert!(verify_hmac_256::<Sha256>(&ke... | rust_cleaned_test_functions.jsonl/46484 | {
"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,
35638,
1523,
11948,
8337,
368,
341,
286,
442,
3393,
369,
5257,
28316,
315,
279,
1376,
323,
8794,
624,
286,
369,
2422,
304,
220,
15,
496,
16,
17,
23,
341,
310,
1077,
1376,
284,
7486,
20703,
15,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_wrong_ping() {
let counter = Arc::new(AtomicUsize::new(0));
let url = format!("{}{}", DATABASE_URL.as_str(), "&query_block_timeout=10ms");
let pool = Pool::new(url);
for i in 0..4 {
let counter = counter.clone();
let done = pool
... | rust_cleaned_test_functions.jsonl/62528 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 693
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75198,
71661,
368,
341,
286,
1077,
5546,
284,
19689,
486,
931,
7,
65857,
52,
2141,
486,
931,
7,
15,
3237,
286,
1077,
2515,
284,
3561,
17223,
6257,
42351,
42859,
8000,
5357,
2895,
1507,
13399,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_disallow_key() {
let toggling_shuffle = DisallowKey::TogglingShuffle;
assert_eq!(toggling_shuffle.as_ref(), "toggling_shuffle");
} | rust_cleaned_test_functions.jsonl/37537 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 72
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9932,
7183,
3097,
368,
341,
262,
1077,
53806,
2718,
73484,
284,
4093,
7183,
1592,
486,
51,
16108,
2718,
2016,
13208,
280,
262,
2060,
10714,
10297,
83,
16108,
2718,
73484,
5357,
7793,
1507,
330,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_epoch_vote_accounts() {
let stake_per_account = 100;
let num_vote_accounts_per_node = 2;
// Create some vote accounts for each pubkey
let vote_accounts_map: HashMap<Pubkey, Vec<VoteAccountInfo>> = (0..10)
.map(|_| {
let node_id = ... | rust_cleaned_test_functions.jsonl/62742 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2177
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
20682,
54360,
55665,
368,
341,
286,
1077,
18279,
5678,
13500,
284,
220,
16,
15,
15,
280,
286,
1077,
1629,
54360,
55665,
5678,
5084,
284,
220,
17,
280,
286,
442,
4230,
1045,
6910,
9618,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_read_files_bytes() -> Result<()> {
let deserializer = Fn!(|file: Vec<u8>| -> Vec<String> {
let parsed: Vec<_> = String::from_utf8(file)
.unwrap()
.lines()
.map(|s| s.to_string())
.collect();
assert_eq!(parsed.len(), 2);... | rust_cleaned_test_functions.jsonl/27943 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 612
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
10931,
12524,
368,
1464,
5714,
71698,
341,
262,
1077,
939,
41939,
284,
50182,
10297,
91,
1192,
25,
11312,
34837,
23,
69844,
1464,
11312,
3464,
29,
341,
1789,
286,
1077,
15676,
25,
11312,
323... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_debug_file_basic() {
let dir = tempfile::Builder::new()
.prefix("test_debug_file_basic")
.tempdir()
.unwrap();
let mut file_id = FileId {
queue: LogQueue::Rewrite,
seq: 7,
};
... | rust_cleaned_test_functions.jsonl/88876 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1679
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15446,
2458,
34729,
368,
341,
310,
1077,
5419,
284,
54819,
486,
3297,
486,
931,
741,
394,
659,
11849,
445,
1944,
15446,
2458,
34729,
1138,
394,
659,
3888,
3741,
741,
394,
659,
15454,
543,
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... | 8 |
#[test]
fn test_or_with_multiple_lt_to_string() {
let name1 = _random_vector(10);
let value1 = _random_string(10);
let name2 = _random_vector(10);
let value2 = _random_string(10);
let name3 = _random_vector(10);
let value3 = _random_string(10);
let query ... | rust_cleaned_test_functions.jsonl/11921 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 747
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8734,
6615,
45233,
39164,
2346,
3904,
368,
341,
286,
1077,
829,
16,
284,
716,
11463,
12247,
7,
16,
15,
317,
286,
1077,
897,
16,
284,
716,
11463,
3904,
7,
16,
15,
317,
286,
1077,
829,
17,
284... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_word_spacing() {
assert_lex(
"h3 { word-spacing: 4mm }",
&[
(Token::Ident, "h3", 0..2),
(Token::CurlyBracketOpen, "{", 3..4),
(Token::Ident, "word-spacing", 5..17),
(Token::Colon, ":", 17..18),
... | rust_cleaned_test_functions.jsonl/89924 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 308
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13533,
63328,
368,
341,
286,
2060,
74547,
1006,
310,
330,
71,
18,
314,
3409,
52373,
25,
220,
19,
3821,
335,
756,
310,
609,
9640,
394,
320,
3323,
486,
28301,
11,
330,
71,
18,
497,
220,
15,
49... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_evm_version_normalization() {
for (solc_version, evm_version, expected) in &[
("0.4.20", EvmVersion::Homestead, None),
// Constantinople clipping
("0.4.21", EvmVersion::Homestead, Some(EvmVersion::Homestead)),
("0.4.21", EvmVer... | rust_cleaned_test_functions.jsonl/10769 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 799
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2204,
7338,
9438,
13973,
2022,
368,
341,
286,
369,
320,
38198,
66,
9438,
11,
3637,
76,
9438,
11,
3601,
8,
304,
609,
9640,
3374,
310,
3489,
15,
13,
19,
13,
17,
15,
497,
468,
7338,
5637,
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... | 2 |
#[test]
fn test_create_webp_picture() {
let mut picture: WebPPicture = unsafe {std::mem::zeroed()};
unsafe {
webp_picture_init(&mut picture);
};
} | rust_cleaned_test_functions.jsonl/34276 | {
"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,
8657,
25960,
79,
42406,
368,
341,
286,
1077,
5206,
6802,
25,
4895,
4406,
3826,
284,
19860,
314,
1834,
486,
10536,
486,
14154,
291,
81141,
286,
19860,
341,
310,
3482,
79,
42406,
6137,
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 |
#[test]
fn test_verified_consensus_msg_fails_if_contents_changed() {
let mut msg = create_msg_node_a();
msg.scp_msg.slot_index = 4;
match VerifiedConsensusMsg::try_from(msg) {
Ok(_) => panic!("Signature verification should fail"),
Err(ConsensusMsgError::SignatureE... | rust_cleaned_test_functions.jsonl/75125 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 193
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71871,
31971,
13626,
6483,
761,
6209,
11119,
16682,
25213,
368,
341,
286,
1077,
5206,
3750,
284,
1855,
6483,
5084,
4306,
543,
286,
3750,
514,
4672,
6483,
69643,
3560,
284,
220,
19,
280,
286,
2432,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_setup_regs() {
let kvm = Kvm::new().unwrap();
let vm = kvm.create_vm().unwrap();
let vcpu = vm.create_vcpu(0).unwrap();
let expected_regs: kvm_regs = kvm_regs {
rflags: 0x0000000000000002u64,
rip: 1,
rsp: 2,
rbp: 2,... | rust_cleaned_test_functions.jsonl/82073 | {
"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,
21363,
36910,
368,
341,
286,
1077,
94748,
284,
730,
7338,
486,
931,
1005,
15454,
543,
286,
1077,
10995,
284,
94748,
2520,
39008,
1005,
15454,
543,
286,
1077,
348,
16475,
284,
10995,
2520,
2273,
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_router_detect9() {
let router =
Router::new().push(Router::with_path("users/<*sub:/(images|css)/>/<filename>").handle(fake_handler));
let mut req: Request = hyper::Request::builder()
.uri("http://local.host/users/12/m.jpg")
.body(hyper::Body::e... | rust_cleaned_test_functions.jsonl/3301 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 422
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55587,
56457,
24,
368,
341,
286,
1077,
9273,
4035,
310,
10554,
486,
931,
1005,
9077,
2785,
2676,
486,
4197,
2638,
445,
4218,
23012,
9,
1966,
25,
11884,
3642,
91,
5143,
5620,
67772,
8404,
61032,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unixtime_to_hms() {
for epoch in 0..86_400 * 10 {
let ymd = unixtime_to_ymd(epoch as i32);
let hms = unixtime_to_hms(epoch as i32);
let seconds = unixtime_to_second(epoch as i32);
let converted_epoch = ymdhms_to_unixtime(
YM... | rust_cleaned_test_functions.jsonl/122953 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 293
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
80572,
1678,
2346,
1523,
1011,
368,
341,
286,
369,
16342,
304,
220,
15,
496,
23,
21,
62,
19,
15,
15,
353,
220,
16,
15,
341,
310,
1077,
379,
2277,
284,
51866,
1678,
2346,
62,
1600,
67,
61290,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_escape_1() {
let test = r#" "abc" "#;
assert_eq!(escape_string(test), r#" \"abc\" "#.to_owned());
assert_eq!(unescape_string(escape_string(test).as_str()), test);
} | rust_cleaned_test_functions.jsonl/12474 | {
"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,
21832,
62,
16,
368,
341,
286,
1077,
1273,
284,
435,
55543,
330,
13683,
1,
5869,
280,
286,
2060,
10714,
10297,
12998,
3904,
8623,
701,
435,
55543,
7245,
13683,
2105,
5869,
13,
983,
51973,
1423,
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 |
#[test]
fn test_2d() {
let ds = ProductSpace::new(vec![Equipartition::new(0.0, 10.0, 10); 2]);
let t = UniformGrid::new(ds);
let nf: usize = t.dim().into();
assert_eq!(nf, 100);
for bin_i in 0..10 {
for bin_j in 0..10 {
let fv = t
... | rust_cleaned_test_functions.jsonl/118344 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 537
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
17,
67,
368,
341,
286,
1077,
11472,
284,
5643,
9914,
486,
931,
25592,
20703,
89908,
471,
680,
486,
931,
7,
15,
13,
15,
11,
220,
16,
15,
13,
15,
11,
220,
16,
15,
1215,
220,
17,
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,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_set_pids() {
let pids_file_name = "pids.max";
let tmp = create_temp_dir("pids").expect("create temp directory for test");
set_fixture(&tmp, pids_file_name, "1000").expect("Set fixture for 1000 pids");
let pids = LinuxPids { limit: 1000 };
Pids::apply(&tm... | rust_cleaned_test_functions.jsonl/40540 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 233
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
620,
3365,
368,
341,
286,
1077,
281,
3365,
2458,
1269,
284,
330,
79,
3365,
6678,
876,
286,
1077,
4174,
284,
1855,
11771,
4334,
445,
79,
3365,
1827,
17119,
445,
3182,
2730,
6220,
369,
1273,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_valid_elasticbeanstalk_create_application() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"elasticbeanstalk-create-application.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(... | rust_cleaned_test_functions.jsonl/15234 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 258
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
8337,
21602,
5064,
17479,
89749,
8657,
38721,
368,
341,
286,
1077,
7860,
9655,
284,
14563,
2582,
5062,
486,
878,
9655,
1006,
310,
330,
1944,
35569,
79372,
14,
1891,
756,
310,
330,
61964,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_is_prime_sieve() {
let n = 1_000_000;
let mut prime = vec![true; n];
prime[0] = false;
prime[1] = false;
for i in 0..n {
assert_eq!(prime[i], is_prime(i as i32));
if prime[i] {
for j i... | rust_cleaned_test_functions.jsonl/36589 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 307
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
38217,
643,
19155,
368,
341,
310,
1077,
308,
284,
220,
16,
62,
15,
15,
15,
62,
15,
15,
15,
280,
310,
1077,
5206,
10250,
284,
7486,
20703,
1866,
26,
308,
935,
310,
10250,
58,
15,
60,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_translate_string_and_do() {
let string = "Gaggablaghblagh!";
let addr = string.as_ptr() as *const _ as u64;
let regions = vec![MemoryRegion {
addr_host: addr,
addr_vm: 100,
len: string.len() as u64,
}];
assert_eq!(
... | rust_cleaned_test_functions.jsonl/42301 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 319
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66381,
3904,
8378,
26309,
368,
341,
286,
1077,
914,
284,
330,
38,
15718,
370,
13363,
71,
2024,
33756,
26782,
286,
1077,
10789,
284,
914,
5357,
4348,
368,
438,
353,
1024,
716,
438,
575,
21,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fq_pow() {
let mut rng = XorShiftRng::from_seed([
0x59, 0x62, 0xbe, 0x5d, 0x76, 0x3d, 0x31, 0x8d, 0x17, 0xdb, 0x37, 0x32, 0x54, 0x06,
0xbc, 0xe5,
]);
for i in 0..1000 {
// Exponentiate by various small numbers and ensure it consists wi... | rust_cleaned_test_functions.jsonl/2331 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 469
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
80,
56183,
368,
341,
286,
1077,
5206,
28422,
284,
1599,
269,
24841,
49,
968,
486,
1499,
33809,
8956,
310,
220,
15,
87,
20,
24,
11,
220,
15,
87,
21,
17,
11,
220,
15,
42459,
11,
220,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_parse_probability_errors() {
// basic success cases
assert!(parse_probability("5").is_err());
assert!(parse_probability("%5").is_err());
assert!(parse_probability("-5").is_err());
assert!(parse_probability("1 / 2 / 3").is_err());
assert!(parse_prob... | rust_cleaned_test_functions.jsonl/107796 | {
"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,
21039,
68589,
20196,
368,
341,
286,
442,
6770,
2393,
5048,
198,
286,
2060,
10297,
6400,
68589,
445,
20,
1827,
285,
9266,
1423,
286,
2060,
10297,
6400,
68589,
4430,
20,
1827,
285,
9266,
1423,
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_38() {
assert_eq!(Solution::count_and_say(1), "1");
assert_eq!(Solution::count_and_say(2), "11");
assert_eq!(Solution::count_and_say(3), "21");
assert_eq!(Solution::count_and_say(4), "1211");
assert_eq!(Solution::count_and_say(5), "111221");
} | rust_cleaned_test_functions.jsonl/30465 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 161
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
18,
23,
368,
972,
286,
2060,
10714,
10297,
36842,
486,
1830,
8378,
643,
352,
7,
16,
701,
330,
16,
2815,
286,
2060,
10714,
10297,
36842,
486,
1830,
8378,
643,
352,
7,
17,
701,
330,
16,
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_request_titles_partially_fail_maxlag_error() {
let url = "https://minecraft.gamepedia.com/api.php";
let limit = 3;
let from = "Ore";
let maxlag = -1;
let res = request_titles_partially(url, limit, Some(from), maxlag);
assert!(res.is_err());
} | rust_cleaned_test_functions.jsonl/43819 | {
"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,
7893,
72199,
10495,
33475,
22121,
6345,
13363,
4096,
368,
341,
286,
1077,
2515,
284,
330,
2428,
1110,
72538,
9105,
82050,
905,
10508,
2296,
876,
286,
1077,
3930,
284,
220,
18,
280,
286,
1077,
504,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nonvalidator_cannot_vote() {
let context = get_context("bob.near".to_string());
let validators = HashMap::from_iter(
vec![
("alice_near".to_string(), 100),
("bob_near".to_string(), 100),
]
.into_iter(),
)... | rust_cleaned_test_functions.jsonl/3914 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 239
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21637,
16112,
666,
3401,
54360,
368,
341,
286,
1077,
2266,
284,
633,
8467,
445,
47086,
1253,
682,
3263,
983,
3904,
1423,
286,
1077,
38588,
284,
10528,
486,
1499,
11723,
1006,
310,
7486,
90515,
394... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_serialize_connection_level() {
let frame = WindowUpdateFrame::for_connection(10);
let expected: Vec<u8> = raw_frame_from_parts(FrameHeader::new(4, 0x8, 0, 0), vec![0, 0, 0, 10]).as_ref().to_owned();
let serialized = serialize_frame(&frame);
assert_eq!(expected, s... | rust_cleaned_test_functions.jsonl/43502 | {
"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,
88686,
15866,
8274,
368,
341,
286,
1077,
4034,
284,
13642,
4289,
4369,
486,
1958,
15866,
7,
16,
15,
317,
286,
1077,
3601,
25,
11312,
34837,
23,
29,
284,
7112,
8929,
5673,
33217,
91008,
4047,
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_arithmetic_int() {
let tests = vec![
(
ScalarFuncSig::PlusInt,
Datum::Null,
Datum::I64(1),
Datum::Null,
),
(
ScalarFuncSig::PlusInt,
Datum::I64(1),
... | rust_cleaned_test_functions.jsonl/82064 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 5305
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25842,
25922,
4042,
368,
341,
286,
1077,
7032,
284,
7486,
90515,
310,
2399,
394,
35176,
9626,
47246,
486,
21807,
1072,
345,
394,
68459,
486,
3280,
345,
394,
68459,
486,
40,
21,
19,
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... | 3 |
#[test]
fn test_dynamic_binary_search_rmq() {
let vec = vec![2, 1, 0, -1, -2, -3, -4, -5];
let mut arq = DynamicArq::<AssignMin>::new(false);
let view = arq.build_from_slice(&vec);
let first_neg = dynamic_arq::first_negative(&mut arq, view);
arq.update(view, 3, 7, &0);
... | rust_cleaned_test_functions.jsonl/44443 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 238
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45992,
31761,
10716,
1710,
27674,
368,
341,
286,
1077,
7486,
284,
7486,
20703,
17,
11,
220,
16,
11,
220,
15,
11,
481,
16,
11,
481,
17,
11,
481,
18,
11,
481,
19,
11,
481,
20,
935,
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_get_handle_path() {
const PATH: &str = "path/file.png";
// valid handle
let server = setup(".");
let handle = server.load_untyped(PATH);
let handle_path = server.get_handle_path(&handle).unwrap();
assert_eq!(handle_path.path(), Path::new(PATH));
... | rust_cleaned_test_functions.jsonl/3155 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 449
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
10630,
2638,
368,
341,
286,
733,
26773,
25,
609,
495,
284,
330,
2343,
23903,
3508,
3302,
286,
442,
2697,
3705,
198,
286,
1077,
3538,
284,
6505,
85847,
286,
1077,
3705,
284,
3538,
5104,
490... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_config_get_cert_auth_type() {
let mut config = Config::new();
config
.set_client_auth_type(CertAuthType::S2N_CERT_AUTH_REQUIRED)
.unwrap();
assert_eq!(CertAuthType::S2N_CERT_AUTH_REQUIRED,
config.get_client_auth_type().unwrap())... | rust_cleaned_test_functions.jsonl/51686 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 173
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5332,
3062,
37097,
14014,
1819,
368,
341,
286,
1077,
5206,
2193,
284,
5532,
486,
931,
543,
286,
2193,
198,
310,
659,
746,
8179,
14014,
1819,
3025,
529,
5087,
929,
486,
50,
17,
45,
55298,
22675,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bank_blockhash_compute_unit_fee_structure() {
let leader = solana_sdk::pubkey::new_rand();
let GenesisConfigInfo {
mut genesis_config,
mint_keypair,
..
} = create_genesis_config_with_leader(1_000_000_000, &leader, 3);
... | rust_cleaned_test_functions.jsonl/28869 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1261
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35733,
7113,
8296,
57028,
14832,
34305,
38283,
368,
341,
23459,
286,
1077,
7653,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
40788,
2648,
1731,
341,
310,
5206,
59366,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hash_calculation() -> io::Result<()> {
let dir = tempfile::Builder::new().tempdir()?;
let mut buf = [0u8; 1 << 10];
let src = dir.path().join("a");
let mut file = File::create(&src)?;
file.write_all(b"aa")?;
let e = FileEntry { path: src, ..Default... | rust_cleaned_test_functions.jsonl/112501 | {
"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,
8950,
38241,
2914,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
1077,
5419,
284,
54819,
486,
3297,
486,
931,
1005,
3888,
3741,
94136,
286,
1077,
5206,
6607,
284,
508,
15,
84,
23,
26,
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... | 4 |
#[test]
fn test_get_device_buffer_frame_size_range() {
if let Some(device) = test_get_default_device(Scope::Input) {
let range = get_device_buffer_frame_size_range(device, DeviceType::INPUT).unwrap();
println!(
"range of input buffer frame size: {}-{}",
range.mMinimum... | rust_cleaned_test_functions.jsonl/113818 | {
"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,
3062,
9204,
7776,
8929,
2368,
9698,
368,
341,
262,
421,
1077,
4329,
17848,
8,
284,
1273,
3062,
9993,
9204,
3759,
2417,
486,
2505,
8,
341,
286,
1077,
2088,
284,
633,
9204,
7776,
8929,
2368,
9698,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_point_in_rect() {
let r1 = Rect::with_size(0, 0, 10, 10);
assert!(r1.point_in_rect(Point::new(5, 5)));
assert!(!r1.point_in_rect(Point::new(100, 100)));
} | rust_cleaned_test_functions.jsonl/92891 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6085,
1243,
16979,
368,
341,
286,
1077,
435,
16,
284,
11920,
486,
4197,
2368,
7,
15,
11,
220,
15,
11,
220,
16,
15,
11,
220,
16,
15,
317,
286,
2060,
10297,
81,
16,
23233,
1243,
16979,
32737,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parsing() {
assert_eq!(
Room::parse("aaaaa-bbb-z-y-x-123[abxyz]"),
Room {
code: "aaaaa-bbb-z-y-x".to_string(),
sector_id: 123,
checksum: "abxyz".to_string()
}
);
} | rust_cleaned_test_functions.jsonl/61945 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 193
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
28598,
368,
341,
286,
2060,
10714,
33673,
310,
10420,
486,
6400,
445,
28458,
64,
1455,
6066,
9141,
12034,
6558,
12,
16,
17,
18,
58,
370,
28854,
60,
4461,
310,
10420,
341,
394,
2038,
25,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_consistency_elastic() {
let rng = &mut ark_std::test_rng();
let twist = F::one();
let f = DensePolynomial::<F>::rand(29, rng).coeffs().to_vec();
let g = DensePolynomial::<F>::rand(29, rng).coeffs().to_vec();
let mut transcript = Transcript::new(crate::PROTOCOL_NAME);
le... | rust_cleaned_test_functions.jsonl/118306 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 357
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31971,
47094,
21602,
5064,
368,
341,
262,
1077,
28422,
284,
609,
6984,
55217,
15656,
486,
1944,
66849,
543,
262,
1077,
26646,
284,
434,
486,
603,
1428,
262,
1077,
282,
284,
42522,
14658,
25358,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_delayed_constant_source() {
let len = RENDER_QUANTUM_SIZE * 4;
let mut context = OfflineAudioContext::new(1, len, SampleRate(RENDER_QUANTUM_SIZE as u32));
assert_eq!(context.length(), len);
{
let delay = context.create_delay(10.);
delay.delay_time().set_value(2.)... | rust_cleaned_test_functions.jsonl/95485 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 360
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22198,
291,
34967,
10347,
368,
341,
262,
1077,
2422,
284,
91788,
16332,
2821,
2794,
4098,
353,
220,
19,
280,
262,
1077,
5206,
2266,
284,
66370,
14755,
1972,
486,
931,
7,
16,
11,
2422,
11,
19143,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_map() {
let config = td_rp::Config::new(" { \"name\" : { \"index\" : 1, \"pattern\" : \"string\" }, \
\"index\" : { \"index\" : 2, \"pattern\" : \"u16\" }, \
\"sub_name\" : { \"index\" : 3, \"pat... | rust_cleaned_test_functions.jsonl/121847 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 768
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
5376,
368,
341,
262,
1077,
2193,
284,
17941,
83440,
486,
2648,
486,
931,
445,
314,
7245,
606,
2105,
549,
314,
7245,
1252,
2105,
549,
262,
220,
16,
11,
7245,
14339,
2105,
549,
7245,
917,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_simple_mixed_graph() {
let log = debug::capture_log(|| test_small_graph(2, &[0, 0x00], 0b10, 0));
assert_eq!(
log,
r#"
0: new (CcBoxWithGcHeader)
1: new (CcBox)
0: clone (2), clone (3), drop (2)
1: drop (0), drop (T), drop (CcBox)
collect: collect_thread_cycles
0: gc_trav... | rust_cleaned_test_functions.jsonl/76055 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 414
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
717,
3286,
14738,
368,
341,
262,
1077,
1487,
284,
7390,
486,
45070,
5224,
79453,
1273,
31966,
14738,
7,
17,
11,
44590,
15,
11,
220,
15,
87,
15,
15,
1125,
220,
15,
65,
16,
15,
11,
220,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_merge_tree_into_unmodified_file() -> BitResult<()> {
BitRepo::with_minimal_repo(|repo| {
let ours = commit! {
foo < "default foo contents"
};
let theirs = commit! {
foo {
bar < "bar contents"
}
};
rep... | rust_cleaned_test_functions.jsonl/94160 | {
"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,
20888,
11663,
45514,
4907,
27162,
2458,
368,
1464,
6495,
2077,
71698,
341,
262,
6495,
25243,
486,
4197,
7260,
2861,
37784,
22428,
23476,
91,
341,
286,
1077,
11350,
284,
5266,
0,
341,
310,
15229,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_commit_style_underline_deprecated_options() {
_do_test_commit_style_underline(&[
"--commit-color",
"yellow",
"--commit-style",
"underline",
]);
} | rust_cleaned_test_functions.jsonl/70066 | {
"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,
36346,
15117,
58228,
1056,
2259,
19889,
8743,
368,
341,
286,
716,
2982,
4452,
36346,
15117,
58228,
1056,
2099,
9640,
310,
14482,
17413,
7889,
756,
310,
330,
27869,
756,
310,
14482,
17413,
11297,
756... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_prevote_reboot_minority_followers() {
let mut cluster = new_node_cluster(0, 5);
test_prevote(
&mut cluster,
FailureType::Reboot(&[4, 5]),
None,
(2, false),
(2, false),
);
} | rust_cleaned_test_functions.jsonl/86917 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 134
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25566,
1272,
1288,
4619,
70861,
487,
43490,
388,
368,
341,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
220,
20,
317,
1066,
262,
1273,
25566,
1272,
1006,
286,
609,
6984,
10652,
345,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ensure() {
maybe_install_handler().unwrap();
let f = || -> Result<()> {
ensure!(1 + 1 == 2, "This is correct");
Ok(())
};
assert!(f().is_ok());
let v = 1;
let f = || -> Result<()> {
ensure!(v + v == 2, "This is correct, v: {}", v);
Ok(())... | rust_cleaned_test_functions.jsonl/111494 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 250
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
27289,
368,
341,
262,
7196,
34245,
10183,
1005,
15454,
1428,
262,
1077,
282,
284,
1369,
1464,
5714,
71698,
341,
286,
5978,
10297,
16,
488,
220,
16,
621,
220,
17,
11,
330,
1986,
374,
4396,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_array_and_vec_similarity() {
let (a, v) = array_and_vec();
assert!(a.iter().zip(v.iter()).all(|(x, y)| x == y));
} | rust_cleaned_test_functions.jsonl/27972 | {
"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,
3858,
8378,
13251,
76236,
368,
341,
286,
1077,
320,
64,
11,
348,
8,
284,
1334,
8378,
13251,
543,
286,
2060,
10297,
64,
19471,
1005,
9964,
3747,
19471,
6011,
541,
22428,
7,
87,
11,
379,
17935,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_ok() {
let result = convert_json::<Json<Value>, Json<Value>>(StatusCode::OK.as_u16(), "{}".into());
println!("{:?}", result);
assert!(matches!(
result,
Ok(JsonResponse::Success(StatusCode::OK, Value::Object(..)))
));
} | rust_cleaned_test_functions.jsonl/83264 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 151
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19817,
368,
341,
286,
1077,
1102,
284,
5508,
9455,
27638,
5014,
48325,
8066,
8308,
48325,
25526,
15872,
486,
3925,
5357,
7300,
16,
21,
1507,
35503,
3263,
18122,
1423,
286,
13751,
88928,
25,
52652,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bytes_prime_part_size() {
let (at, mut ucmd) = at_and_ucmd!();
let name = "test_split_bytes_prime_part_size";
RandomFile::new(&at, name).add_bytes(10000);
ucmd.args(&["-b", "1753", name, "b"]).succeeds();
let glob = Glob::new(&at, ".", r"b[[:alpha:]][[:alpha:]]$")... | rust_cleaned_test_functions.jsonl/25854 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 306
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
12524,
38217,
10495,
2368,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
1077,
829,
284,
330,
1944,
17052,
12524,
38217,
10495,
2368,
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... | 2 |
#[test]
fn test_try_from_record_for_contig_with_an_invalid_record_value() {
let record = Record::new(
record::Key::Contig,
record::Value::String(String::from("VCF4.3")),
);
assert_eq!(
Contig::try_from(record),
Err(TryFromRecordError::Inva... | rust_cleaned_test_functions.jsonl/81751 | {
"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,
53283,
5673,
14192,
5478,
10260,
343,
6615,
12008,
31433,
14192,
3142,
368,
341,
286,
1077,
3255,
284,
13583,
486,
931,
1006,
310,
3255,
486,
1592,
486,
818,
343,
345,
310,
3255,
486,
1130,
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_resolve_self_dep_module_code() {
let test_source = r#"
module {{sender}}::TestModule {
struct A has copy, store{
}
struct B has key{
a: vector<A>,
}
}
"#;
let address = AccountAddress::random... | rust_cleaned_test_functions.jsonl/17492 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 380
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77291,
25637,
49258,
10750,
4136,
368,
341,
286,
1077,
1273,
10347,
284,
435,
2,
698,
286,
4688,
5867,
11644,
3417,
486,
2271,
3332,
341,
310,
2036,
362,
702,
2975,
11,
3553,
515,
310,
335,
715,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compress_0_ffs() {
let cv = 0;
let to_test = vec![0xFF; 8];
assert_eq!(compress(cv, to_test), 0xF7367D233B6FE510);
} | rust_cleaned_test_functions.jsonl/54031 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 98
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
87845,
62,
15,
58708,
82,
368,
341,
286,
1077,
5544,
284,
220,
15,
280,
286,
1077,
311,
4452,
284,
7486,
20703,
15,
9264,
26,
220,
23,
935,
286,
2060,
10714,
10297,
38360,
38210,
11,
311,
4452... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_take_impl_primitive_with_uint8_indices() {
let index = UInt8Array::from(vec![Some(3), None, Some(1), Some(3), Some(2)]);
// int16
test_take_impl_primitive_arrays::<Int16Type, UInt8Type>(
vec![Some(0), None, Some(2), Some(3), None],
&index,
... | rust_cleaned_test_functions.jsonl/27048 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 518
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73261,
21007,
84087,
6615,
15807,
23,
18333,
368,
341,
286,
1077,
1922,
284,
22275,
23,
1857,
486,
1499,
25592,
20703,
8373,
7,
18,
701,
2240,
11,
4329,
7,
16,
701,
4329,
7,
18,
701,
4329,
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_accountsdb_scan_snapshot_stores_binning_2nd_chunk() {
// enough stores to get to 2nd chunk
// range is for only 1 bin out of 256.
let bins = 256;
let slot = MAX_ITEMS_PER_CHUNK as Slot;
let (storages, raw_expected) = sample_storages_and_account_in_slot(slo... | rust_cleaned_test_functions.jsonl/6941 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 623
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55665,
1999,
28857,
53265,
1261,
4589,
880,
19770,
62,
17,
303,
30539,
368,
341,
286,
442,
3322,
10533,
311,
633,
311,
220,
17,
303,
11879,
198,
286,
442,
2088,
374,
369,
1172,
220,
16,
9544,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_complex_list () {
use test_capnp::{test_complex_list, AnEnum};
let mut message = message::Builder::new_default();
let mut test_complex_list = message.init_root::<test_complex_list::Builder>();
{
{
let mut enum_list = test_complex_lis... | rust_cleaned_test_functions.jsonl/55849 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3226
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41522,
2019,
1719,
341,
286,
990,
1273,
16388,
6199,
22964,
1944,
41522,
2019,
11,
1527,
10766,
2315,
286,
1077,
5206,
1943,
284,
1943,
486,
3297,
486,
931,
9993,
1428,
286,
1077,
5206,
1273,
4152... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_generic() {
parse_code(
"test_generic",
r#"
foreigner_class!(class Foo {
self_type Foo;
constructor Foo::new(_: i32) -> Foo;
method Foo::f(&self, _: i32, _: i32) -> i32;
});
foreigner_class!(class Boo {
self_type Boo;
constructor Boo::new(_: i32, _: usiz... | rust_cleaned_test_functions.jsonl/71611 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 276
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41232,
368,
341,
262,
4715,
4136,
1006,
286,
330,
1944,
41232,
756,
286,
435,
2,
698,
28443,
261,
4790,
10297,
1040,
33428,
341,
262,
656,
1819,
33428,
280,
262,
4692,
33428,
486,
931,
73834,
60... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mult_anon_labels_same_instr_fails() {
let mut a = CodeAssembler::new(64).unwrap();
a.anonymous_label().unwrap();
assert!(a.anonymous_label().is_err());
} | rust_cleaned_test_functions.jsonl/71812 | {
"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,
26290,
12008,
263,
14547,
33574,
62574,
761,
6209,
368,
341,
10217,
5206,
264,
284,
6119,
77858,
486,
931,
7,
21,
19,
568,
15454,
543,
11323,
10752,
9757,
6106,
1005,
15454,
543,
6948,
10297,
64,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_pack_bit2word() {
let mut src = [SLMPDeviceData::<bool> {
dev: SLMPDevice {
d_code: SLMPDeviceCode::M,
addr: 100,
},
value: true,
}; 16];
let buf = [
false, false, false, false, true, true, fa... | rust_cleaned_test_functions.jsonl/62521 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 467
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32995,
13996,
17,
1158,
368,
341,
286,
1077,
5206,
2286,
284,
508,
7984,
5781,
6985,
1043,
27638,
2641,
29,
341,
310,
3483,
25,
16797,
5781,
6985,
341,
394,
294,
4136,
25,
16797,
5781,
6985,
207... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_unknown_attribute_double_value() {
let schemaReplicant = SchemaReplicant::default();
let causetq = r#"[:find ?x :where [?x _ 9.95]]"#;
let SQLCausetQ { allegrosql, args } = translate(&schemaReplicant, causetq);
// make sure we only match numbers.
assert_eq!(allegrosql,... | rust_cleaned_test_functions.jsonl/90698 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 210
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57507,
16791,
24598,
3142,
368,
341,
262,
1077,
10802,
18327,
35237,
284,
12539,
18327,
35237,
486,
2258,
1428,
262,
1077,
2162,
18187,
80,
284,
435,
55543,
3447,
3903,
937,
87,
549,
2870,
508,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_no_generic_generate_dummy_fn_trait_impl() {
let gen = no_generic_fn();
let expected: TokenStream = quote! {
impl<D_: crate::coprocessor::dag::rpn_expr::function::ArgDef> Foo_Fn for D_ {
default fn eval(
self,
ctx... | rust_cleaned_test_functions.jsonl/93541 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 441
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
41232,
48851,
60321,
15246,
78491,
21007,
368,
341,
286,
1077,
4081,
284,
902,
41232,
15246,
543,
286,
1077,
3601,
25,
9660,
3027,
284,
12641,
0,
341,
310,
11605,
29061,
23211,
17717,
486,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_validate_extra_error() -> Result<(), Error> {
validate_extra_schemas_test(
json!({"dev": ["misc"], "program": {"binary": "a"}}),
&[(&BLOCK_DEV_SCHEMA, Some("Extra error".to_string()))],
Err(Error::validate_schema(
&BLOCK_DEV_SCHEMA,
... | rust_cleaned_test_functions.jsonl/2893 | {
"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,
42681,
31858,
4096,
368,
1464,
5714,
68843,
4600,
29,
341,
286,
9593,
31858,
643,
31126,
4452,
1006,
310,
2951,
0,
16864,
3583,
788,
4383,
47240,
7914,
330,
14906,
788,
5212,
25891,
788,
330,
64,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_weighted_shuffle_imbalanced() {
let mut weights = vec![std::u32::MAX as u64; 3];
weights.push(1);
let shuffle = weighted_shuffle(weights.clone(), ChaChaRng::from_seed([0x5a; 32]));
shuffle.into_iter().for_each(|x| {
if x == weights.len() - 1 {
... | rust_cleaned_test_functions.jsonl/52100 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 251
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15876,
291,
73484,
17895,
58402,
368,
341,
286,
1077,
5206,
14324,
284,
7486,
20703,
1834,
486,
84,
18,
17,
486,
10586,
438,
575,
21,
19,
26,
220,
18,
935,
286,
14324,
2552,
7,
16,
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... | 2 |
#[test]
fn test_array_double() {
check([] as [f64; 0], Some(0));
check([0f64, 1., 2.], Some(24));
} | rust_cleaned_test_functions.jsonl/79677 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 58
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
24598,
368,
341,
262,
1779,
10556,
438,
508,
69,
21,
19,
26,
220,
15,
1125,
4329,
7,
15,
1106,
262,
1779,
2561,
15,
69,
21,
19,
11,
220,
16,
2572,
220,
17,
13,
1125,
4329,
7,
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 |
#[test]
fn test_add_entity_to_twin_fails_if_entity_is_added_twice() {
ExternalityBuilder::build().execute_with(|| {
create_entity();
create_twin_bob();
// Add Alice as entity to bob's twin
let signature = sign_add_entity_to_twin(1, 1);
let twin_id = 1;
... | rust_cleaned_test_functions.jsonl/35353 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 365
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
19169,
2346,
528,
7526,
761,
6209,
11119,
19169,
6892,
37653,
54178,
558,
368,
341,
262,
1374,
4160,
2719,
3297,
486,
5834,
1005,
10257,
6615,
79453,
341,
286,
1855,
19169,
543,
286,
1855,
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_read_file_lines() {
let lines_result = read_file_lines(&String::from("handout-a.txt"));
assert!(lines_result.is_ok());
let lines = lines_result.unwrap();
assert_eq!(lines.len(), 8);
assert_eq!(
lines[0],
"This week's exercises will ... | rust_cleaned_test_functions.jsonl/10698 | {
"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,
6443,
2458,
18323,
368,
341,
286,
1077,
5128,
5287,
284,
1349,
2458,
18323,
2099,
703,
486,
1499,
445,
10661,
411,
7409,
3909,
4010,
286,
2060,
10297,
7969,
5287,
2079,
19817,
1423,
286,
1077,
512... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_distributed_cpu() {
let _num_qubits = 2;
let mut circuit = Circuit::new(_num_qubits, Some("distributed_cpu".to_string()));
circuit.add_hadamard_gate(1);
circuit.forward();
let expected_local_amplitudes = array![
... | rust_cleaned_test_functions.jsonl/104579 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 512
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36551,
814,
25146,
21795,
368,
341,
286,
1077,
716,
2413,
8976,
81402,
284,
220,
17,
280,
286,
1077,
5206,
16224,
284,
27218,
486,
931,
2490,
2413,
8976,
81402,
11,
4329,
445,
62375,
21795,
3263,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_valid_redshift_describe_events() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-describe-events.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
... | rust_cleaned_test_functions.jsonl/12116 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 241
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
8337,
26058,
13418,
15768,
3114,
19691,
368,
341,
286,
1077,
7860,
9655,
284,
14563,
2582,
5062,
486,
878,
9655,
1006,
310,
330,
1944,
35569,
79372,
14,
1891,
756,
310,
330,
1151,
13418,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_kernel_must_be_nonempty() {
let k: Vec<u8> = Vec::new();
let _ = Kernel::new(&k, 0, 0);
} | rust_cleaned_test_functions.jsonl/35609 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 71
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26876,
717,
590,
21263,
21637,
3194,
368,
341,
286,
1077,
595,
25,
11312,
34837,
23,
29,
284,
11312,
486,
931,
543,
286,
1077,
716,
284,
36603,
486,
931,
2099,
74,
11,
220,
15,
11,
220,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_sui() {
let mut state = State8080::empty_state();
state.memory = vec![0xd6, 0x01];
state.a = 0x00;
state.cc.cy = 0;
emulate_8080_op(&mut state);
assert_eq!(state.a, 0xff);
assert_eq!(state.cc.cy, 1);
} | rust_cleaned_test_functions.jsonl/7788 | {
"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,
643,
1963,
368,
341,
286,
1077,
5206,
1584,
284,
3234,
23,
15,
23,
15,
486,
3194,
4387,
543,
286,
1584,
36611,
284,
7486,
20703,
15,
9703,
21,
11,
220,
15,
87,
15,
16,
935,
286,
1584,
5849,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_small_signature() {
let mut registry = PredicateSignatureSmallRegistry::new();
let signature = PredicateSignatureSmall::new(&"hi".to_owned(), &vec![1, 2, 3], &mut registry);
assert_eq!(signature.get_name_string(®istry), "hi");
assert_eq!(signature.get_actors_vector(), ... | rust_cleaned_test_functions.jsonl/120001 | {
"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,
8657,
31966,
39859,
368,
341,
262,
1077,
5206,
19424,
284,
49827,
25088,
25307,
15603,
486,
931,
1428,
262,
1077,
11957,
284,
49827,
25088,
25307,
486,
931,
2099,
1,
6023,
3263,
983,
51973,
1507,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_encode_java_compatibility() {
let _m = mock("GET", "/subjects/testresult-value/versions/latest")
.with_status(200)
.with_header("content-type", "application/vnd.schemaregistry.v1+json")
.with_body(&get_json_body(json_result_schema(), 10))
.... | rust_cleaned_test_functions.jsonl/42265 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 376
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
77323,
2965,
53053,
368,
341,
286,
1077,
716,
76,
284,
7860,
445,
3806,
497,
3521,
64782,
12697,
1382,
19083,
14,
28290,
33149,
1138,
310,
659,
4197,
4773,
7,
17,
15,
15,
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... | 1 |
#[test]
fn test_list_array_invalid_buffer_len() {
let value_data = ArrayData::builder(DataType::Int32)
.len(8)
.add_buffer(Buffer::from_slice_ref(&[0, 1, 2, 3, 4, 5, 6, 7]))
.build();
let list_data_type =
DataType::List(Box::new(Field::new("item", ... | rust_cleaned_test_functions.jsonl/3848 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 277
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2019,
3858,
31433,
7776,
6043,
368,
341,
286,
1077,
897,
1769,
284,
2910,
1043,
486,
17850,
63941,
486,
1072,
18,
17,
340,
310,
659,
2892,
7,
23,
340,
310,
659,
718,
7776,
55574,
486,
1499,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_operator_eq() {
let u1 = Uuid::new_v4();
let u2 = u1.clone();
let u3 = Uuid::new_v4();
assert!(u1 == u1);
assert!(u1 == u2);
assert!(u2 == u1);
assert!(u1 != u3);
assert!(u3 != u1);
assert!(u2 != u3);
assert!(u3 !=... | rust_cleaned_test_functions.jsonl/58277 | {
"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,
40594,
10714,
368,
341,
286,
1077,
575,
16,
284,
547,
2423,
486,
931,
2273,
19,
543,
286,
1077,
575,
17,
284,
575,
16,
15997,
543,
286,
1077,
575,
18,
284,
547,
2423,
486,
931,
2273,
19,
142... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_encrypt_then_decrypt_read_plaintext() {
let methods = [
EncryptionMethod::Plaintext,
EncryptionMethod::Aes128Ctr,
EncryptionMethod::Aes192Ctr,
EncryptionMethod::Aes256Ctr,
];
let mut plaintext = vec![0; 10240];
OsRng... | rust_cleaned_test_functions.jsonl/36265 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 798
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66593,
68367,
80764,
6443,
6317,
1641,
427,
368,
341,
286,
1077,
5413,
284,
2278,
310,
62055,
3523,
486,
2120,
1641,
427,
345,
310,
62055,
3523,
486,
32,
288,
16,
17,
23,
77227,
345,
310,
62055,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_experiments_can_be_disabled() {
let inspector = inspect::Inspector::new();
let node = inspector.root().create_child("experiments");
let mut state = State::new(node);
state.set_state(Experiment::Lightbulb, true);
state.set_state(Experiment::Lightbulb, false... | rust_cleaned_test_functions.jsonl/42146 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 292
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2702,
49632,
27421,
21263,
51401,
368,
341,
286,
1077,
44725,
284,
24085,
486,
46230,
486,
931,
543,
286,
1077,
2436,
284,
44725,
12576,
1005,
3182,
17268,
445,
327,
49632,
797,
286,
1077,
5206,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_executor_cache_get_primer_count_upper_bound_inclusive() {
let pubkey = Pubkey::default();
let v = [];
assert_eq!(
CachedExecutors::get_primer_count_upper_bound_inclusive(&v),
0
);
let v = [(&pubkey, 1)];
assert_eq!(
... | rust_cleaned_test_functions.jsonl/29011 | {
"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,
81207,
11529,
3062,
5294,
3134,
3180,
34445,
19447,
1243,
8336,
368,
341,
286,
1077,
95116,
284,
22611,
792,
486,
2258,
543,
286,
1077,
348,
284,
5907,
286,
2060,
10714,
33673,
310,
74205,
10216,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_composite() {
let mut registration = Registration {
first_name: "first_name_i".to_string(),
last_name: "last_name_i".to_string(),
quantity: 10,
price: 5.99,
address: Address {
street: "street_i".to_string(),
... | rust_cleaned_test_functions.jsonl/101403 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 704
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2965,
13607,
368,
341,
286,
1077,
5206,
12227,
284,
24516,
341,
310,
1156,
1269,
25,
330,
3896,
1269,
5318,
3263,
983,
3904,
3148,
310,
1537,
1269,
25,
330,
4259,
1269,
5318,
3263,
983,
3904,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_render_1() {
let result = result::RequestLogAnalyzerResult {
count: 3,
timing: Some(analyzer::TimingResult {
max: 100,
min: 1,
avg: 37,
median: 10,
percentile90: 90,
pe... | rust_cleaned_test_functions.jsonl/122563 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 708
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22781,
62,
16,
368,
341,
286,
1077,
1102,
284,
1102,
486,
1900,
2201,
54911,
2077,
341,
310,
1760,
25,
220,
18,
345,
310,
18405,
25,
4329,
38502,
27165,
486,
62805,
2077,
341,
394,
1932,
25,
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_rpc_get_inflation() {
let bob_pubkey = Pubkey::new_rand();
let RpcHandler { io, meta, bank, .. } = start_rpc_handler_with_tx(&bob_pubkey);
let req = r#"{"jsonrpc":"2.0","id":1,"method":"getInflationGovernor"}"#;
let rep = io.handle_request_sync(&req, meta.clone()... | rust_cleaned_test_functions.jsonl/14429 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1459
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60799,
3062,
1243,
64149,
368,
341,
286,
1077,
35192,
34014,
792,
284,
22611,
792,
486,
931,
33864,
543,
286,
1077,
79961,
3050,
314,
6399,
11,
8823,
11,
6073,
11,
5241,
335,
284,
1191,
60799,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_request_titles_partially() {
let url = "https://minecraft.gamepedia.com/api.php";
let limit = 3;
let from = "Ore";
let maxlag = 5;
let (titles, next_title) = request_titles_partially(url, limit, Some(from), maxlag)
.expect("Error in calling All... | rust_cleaned_test_functions.jsonl/43818 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 832
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7893,
72199,
10495,
33475,
368,
341,
286,
1077,
2515,
284,
330,
2428,
1110,
72538,
9105,
82050,
905,
10508,
2296,
876,
286,
1077,
3930,
284,
220,
18,
280,
286,
1077,
504,
284,
330,
46,
265,
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_replace_ss58_addresses() {
let source = r"
script {
use 0x01::Event;
use 1exaAg2VJRQbyUBAeXcktChCAqjVP9TUxF3zo23R2T6EGdE::Math;
fun main(account: &signer, a: u64, b: u64) {
let sum = Math::add(a, b);
... | rust_cleaned_test_functions.jsonl/42282 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 579
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10633,
41848,
20,
23,
59471,
368,
341,
286,
1077,
2530,
284,
435,
698,
310,
5316,
341,
394,
990,
220,
15,
87,
15,
16,
486,
1556,
280,
394,
990,
220,
16,
327,
64,
9042,
17,
53,
84692,
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... | 1 |
#[test]
fn test_math_block() {
assert_markdown_eq(
common::parts::math_block,
r###"
$$x=2+2^2$$
"###,
);
} | rust_cleaned_test_functions.jsonl/133522 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 79
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
65561,
7113,
368,
341,
262,
2060,
18924,
2923,
10714,
1006,
286,
4185,
486,
18252,
486,
10374,
7113,
345,
286,
435,
14374,
1837,
14085,
87,
28,
17,
10,
17,
61,
17,
14085,
198,
1,
14374,
345,
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 |
#[test]
fn test_encryption() {
let keys = SivEncryptionKeys {
siv_key: HmacKey::from_rng(),
cipher_key: HmacKey::from_rng(),
};
let other_keys = SivEncryptionKeys {
siv_key: HmacKey::from_rng(),
cipher_key: HmacKey::from_rng(),
};
let mut plaintext = vec![0u8; OsRng.gen_range(16, 1024)];... | rust_cleaned_test_functions.jsonl/1519 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1005
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13781,
15597,
368,
341,
197,
10217,
6894,
284,
328,
344,
79239,
8850,
341,
298,
1903,
344,
3097,
25,
472,
11948,
1592,
486,
1499,
66849,
3148,
298,
1444,
10558,
3097,
25,
472,
11948,
1592,
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_ipv6_address1() -> Result<()> {
init();
let mut counter = 0;
let prop = prop::for_all(
|| ipv6_address_gen1(),
move |s| {
counter += 1;
log::debug!("{:>03}, ipv6_address1 = {}", counter, s);
let (_, r) = ipv6_address1(Elms::new(s.as_bytes())).ok().... | rust_cleaned_test_functions.jsonl/76908 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 231
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49378,
21,
6744,
16,
368,
1464,
5714,
71698,
341,
262,
2930,
543,
262,
1077,
5206,
5546,
284,
220,
15,
280,
262,
1077,
2004,
284,
2004,
486,
1958,
5705,
1006,
414,
1369,
45475,
21,
6744,
16322,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_eulerian_path_invalid1() {
let g = UnweightedAdjacencyList::new_directed(2, &[[0, 1], [0, 1]]);
assert!(matches!(
g.eulerian_path(),
Err(EulerianPathError::InvalidDegrees)
));
} | rust_cleaned_test_functions.jsonl/45335 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 136
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2204,
8479,
1103,
2638,
31433,
16,
368,
341,
286,
1077,
342,
284,
1230,
79796,
54866,
40624,
852,
486,
931,
32871,
291,
7,
17,
11,
609,
15505,
15,
11,
220,
16,
1125,
508,
15,
11,
220,
16,
49... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_part_1() {
let mut input = TEST_INPUT
.split(',')
.map(|v| v.parse().unwrap())
.collect::<Vec<i32>>();
input.sort();
let res = part_1(&input);
assert_eq!(res, 37);
} | rust_cleaned_test_functions.jsonl/43771 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 151
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10495,
62,
16,
368,
341,
286,
1077,
5206,
1946,
284,
13602,
21022,
198,
310,
659,
6960,
61265,
310,
659,
2186,
22428,
85,
91,
348,
4632,
1005,
15454,
2398,
310,
659,
17384,
27638,
10050,
21897,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_node_stale_peer_out_of_region() {
let count = 6;
let mut cluster = new_node_cluster(0, count);
test_stale_peer_out_of_region(&mut cluster);
} | rust_cleaned_test_functions.jsonl/26890 | {
"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,
5084,
1261,
1574,
45159,
6068,
3575,
20627,
368,
341,
262,
1077,
1760,
284,
220,
21,
280,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
1760,
317,
262,
1273,
1261,
1574,
45159,
6068,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_numbers_to_word() {
assert_eq!(number_to_words(0), "ZERO");
assert_eq!(number_to_words(5), "FIVE");
assert_eq!(number_to_words(12), "TWELVE");
assert_eq!(number_to_words(25), "TWENTY-FIVE");
assert_eq!(number_to_words(125), "ONE HUNDRED AND TWENTY-FIVE");
... | rust_cleaned_test_functions.jsonl/6489 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 166
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32964,
2346,
13533,
368,
341,
286,
2060,
10714,
10297,
4082,
2346,
18981,
7,
15,
701,
330,
73956,
797,
286,
2060,
10714,
10297,
4082,
2346,
18981,
7,
20,
701,
330,
37,
6537,
797,
286,
2060,
1071... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_not_key_frame() {
let frame: Vec<u8> = vec![
0x01, 0x01, 0x00, 0x5f, 0x02, 0x00, 0x8a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x39, 0x5c, 0xc7, 0x6e, 0x1a, 0xe9, 0x9f, 0xa0, 0xb1, 0x22, 0x79,
0xfe, 0xc3, 0xb9, 0xa9, 0x9e, 0x1d, 0x9... | rust_cleaned_test_functions.jsonl/49815 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 608
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7913,
3097,
8929,
368,
341,
286,
1077,
4034,
25,
11312,
34837,
23,
29,
284,
7486,
90515,
310,
220,
15,
87,
15,
16,
11,
220,
15,
87,
15,
16,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
20,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sync_template() {
let route = Route::SyncTemplate {
guild_id: GUILD_ID,
template_code: TEMPLATE_CODE,
};
assert_eq!(
route.to_string(),
format!(
"guilds/{guild_id}/templates/{template_code}",
... | rust_cleaned_test_functions.jsonl/119916 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 251
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23008,
8693,
368,
341,
286,
1077,
6021,
284,
9572,
486,
12154,
7275,
341,
310,
26411,
842,
25,
479,
18023,
3450,
345,
310,
3811,
4136,
25,
67387,
10020,
345,
286,
2605,
286,
2060,
10714,
33673,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_csr_insn() {
let mut hart = HartState::new();
let mut mem = memories::VecMemory::new(vec![
0xdeadc0b7, 0xeef08093, 0x34009073, 0x340ff073, 0xbaadf137, 0x00d10113, 0x340111f3,
]);
hart.pc = 0;
let mut executor = InstructionExecutor {
... | rust_cleaned_test_functions.jsonl/129762 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 331
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
15094,
79799,
368,
341,
286,
1077,
5206,
73928,
284,
22900,
1397,
486,
931,
543,
1789,
286,
1077,
5206,
1833,
284,
18923,
486,
10050,
10642,
486,
931,
25592,
90515,
310,
220,
15,
56185,
33385... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_output_stream_write_float_no_tag() {
test_write("95 73 13 61", |os| os.write_float_no_tag(17e19));
} | rust_cleaned_test_functions.jsonl/104519 | {
"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,
7645,
12673,
9165,
17586,
6536,
9372,
368,
341,
286,
1273,
9165,
445,
24,
20,
220,
22,
18,
220,
16,
18,
220,
21,
16,
497,
760,
436,
91,
2643,
3836,
17586,
6536,
9372,
7,
16,
22,
68,
16,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_udp_packet() {
let u = Fragment::new_udp(
"192.0.2.1:1".parse().unwrap(),
&[2, 0, 0, 0, 0, 0],
"192.0.2.2:2".parse().unwrap(),
&[2, 0, 0, 0, 0, 1],
Tail::Payload(&[1, 2, 3, 4]),
);
println!("u={:?}", u);
} | rust_cleaned_test_functions.jsonl/3282 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 172
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
69432,
21078,
368,
341,
262,
1077,
575,
284,
19034,
486,
931,
69432,
1006,
286,
330,
16,
24,
17,
13,
15,
13,
17,
13,
16,
25,
16,
3263,
6400,
1005,
15454,
3148,
286,
44590,
17,
11,
220,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.