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_set_height() {
let mut pane = gen_pane!(OpenOptions::new().write(true).open("/dev/null").unwrap());
let width: u16 = 1;
let height: u16 = 10;
pane.replace_termsize_getter(Box::new(TestTerminal::new(width, height)));
assert_eq!(pane.set_height(5).unwrap(),... | rust_cleaned_test_functions.jsonl/1682 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1082
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
9561,
368,
341,
286,
1077,
5206,
37322,
284,
4081,
620,
2145,
10297,
5002,
3798,
486,
931,
1005,
4934,
3715,
568,
2508,
4283,
3583,
19293,
1827,
15454,
1423,
286,
1077,
2374,
25,
575,
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_month_enum_succ_pred() {
assert_eq!(Month::January.succ(), Month::February);
assert_eq!(Month::December.succ(), Month::January);
assert_eq!(Month::January.pred(), Month::December);
assert_eq!(Month::February.pred(), Month::January);
} | rust_cleaned_test_functions.jsonl/92410 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18933,
31054,
70758,
12830,
368,
341,
262,
2060,
10714,
10297,
11318,
486,
32227,
514,
14570,
1507,
19397,
486,
32777,
317,
262,
2060,
10714,
10297,
11318,
486,
32146,
514,
14570,
1507,
19397,
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_override() {
err(
"@open class A { fun f() {} } class B extends A { @override fun f() {} }",
pos(1, 60),
SemError::MethodNotOverridable("f".into()),
);
ok("@open class A { @open fun f() {} } class B extends A { @override fun f() {} }");... | rust_cleaned_test_functions.jsonl/128697 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 474
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48576,
368,
341,
286,
1848,
1006,
310,
8428,
2508,
536,
362,
314,
2464,
282,
368,
4687,
335,
536,
425,
2239,
362,
314,
569,
9199,
2464,
282,
368,
4687,
335,
756,
310,
1133,
7,
16,
11,
220,
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_read_returns_events_if_source_has_events() {
const EVENT: InternalEvent = InternalEvent::Event(Event::Resize(10, 10));
let source = FakeSource::with_events(&[EVENT, EVENT, EVENT]);
let mut reader = InternalEventReader {
events: VecDeque::new(),
s... | rust_cleaned_test_functions.jsonl/101476 | {
"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,
6443,
58900,
19691,
11119,
10347,
21778,
19691,
368,
341,
286,
733,
12742,
25,
15412,
1556,
284,
15412,
1556,
486,
1556,
30469,
486,
30561,
7,
16,
15,
11,
220,
16,
15,
3237,
286,
1077,
2530,
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_slice_partition_dedup_empty() {
let mut slice: [i32; 0] = [];
let (dedup, duplicates) = slice.partition_dedup();
assert_eq!(dedup, []);
assert_eq!(duplicates, []);
} | rust_cleaned_test_functions.jsonl/9702 | {
"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,
26488,
43840,
814,
291,
454,
15124,
368,
341,
262,
1077,
5206,
15983,
25,
508,
72,
18,
17,
26,
220,
15,
60,
284,
15436,
262,
1077,
320,
9789,
454,
11,
42328,
8,
284,
15983,
79009,
814,
291,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_password() {
let cases = vec![
("TiKV", "*cca644408381f962dba8dfb9889db1371ee74208"),
("Pingcap", "*f33bc75eac70ac317621fbbfa560d6251c43cf8a"),
("rust", "*090c2b08e0c1776910e777b917c2185be6554c2e"),
("database", "*02e86b4af5219d0ba6c974908a... | rust_cleaned_test_functions.jsonl/93078 | {
"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,
10122,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
3489,
45351,
82707,
497,
15630,
24441,
21,
19,
19,
19,
15,
23,
18,
23,
16,
69,
24,
21,
17,
89455,
23,
2940,
65,
24,
23,
23,
24,
199... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_receiving_user_sabm_before_mux_startup_is_rejected() {
let mut exec = fasync::Executor::new().unwrap();
let (mut session, mut outgoing_frames, _rfcomm_channels) = setup_session();
assert_eq!(session.role(), Role::Unassigned);
// Expect a DM response due to user ... | rust_cleaned_test_functions.jsonl/14925 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 302
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
46344,
3317,
643,
370,
76,
23708,
80363,
80858,
6892,
1288,
28303,
368,
341,
286,
1077,
5206,
3883,
284,
282,
7692,
486,
25255,
486,
931,
1005,
15454,
1428,
286,
1077,
320,
6984,
3797,
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_bad_bank_hash() {
solana_logger::setup();
use solana_sdk::signature::{Keypair, Signer};
let db = AccountsDb::new(Vec::new(), &ClusterType::Development);
let some_slot: Slot = 0;
let ancestors: Ancestors = [(some_slot, 0)].iter().copied().collect();
let max_accounts = 20... | rust_cleaned_test_functions.jsonl/131810 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 998
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34199,
35733,
8950,
368,
341,
262,
2048,
3362,
27413,
486,
15188,
543,
262,
990,
2048,
3362,
61783,
486,
34140,
22964,
6608,
1082,
1310,
11,
7075,
261,
2440,
262,
1077,
2927,
284,
40655,
7994,
486... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_new_env() {
let node = "1";
let id = "bd65600d-8669-4903-8a14-af88203add38";
let exec_file = "/proc/cpuinfo";
let uid = "1001";
let gid = "1002";
let chroot_base = "/";
let netns = "zzzns";
// This should be fine.
let good_... | rust_cleaned_test_functions.jsonl/18851 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1697
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
15879,
368,
341,
286,
1077,
2436,
284,
330,
16,
876,
286,
1077,
877,
284,
330,
8940,
21,
20,
21,
15,
15,
67,
12,
23,
21,
21,
24,
12,
19,
24,
15,
18,
12,
23,
64,
16,
19,
12,
2577,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mean() {
test_case(1.0, 0.1, 0.1, |x| x.mean());
test_case(1.0, 1.0, 1.0, |x| x.mean());
test_almost(10.0, 10.0, 9.5135076986687318362924871772654021925505786260884, 1e-14, |x| x.mean());
test_almost(10.0, 1.0, 0.95135076986687318362924871772654021925505786260884,... | rust_cleaned_test_functions.jsonl/84303 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 195
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16933,
368,
341,
286,
1273,
19096,
7,
16,
13,
15,
11,
220,
15,
13,
16,
11,
220,
15,
13,
16,
11,
760,
87,
91,
856,
18711,
1423,
286,
1273,
19096,
7,
16,
13,
15,
11,
220,
16,
13,
15,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_escaped() {
let selector_str = r#" "\"" ,",":nth-child(7),"|","\""> test> "x":nth-child(1)"#;
let expected = vec![
SelectorRaw {
node_selectors: vec![NodeSelectorRaw {
node_kind: "\\\"".into(),
nth_child: N... | rust_cleaned_test_functions.jsonl/56567 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 928
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
65826,
368,
341,
286,
1077,
9367,
2895,
284,
435,
55543,
67622,
220,
1154,
497,
788,
51738,
23484,
7,
22,
35393,
91,
2198,
2105,
755,
414,
1273,
29,
330,
87,
788,
51738,
23484,
7,
16,
9940... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_session_config_with_region_and_cacert() {
let mut cacert = tempfile::NamedTempFile::new().unwrap();
write!(
cacert,
r#"-----BEGIN CERTIFICATE-----
MIIBYzCCAQqgAwIBAgIUJcTlPhsFyWG9S0pAAElKuSFEPBYwCgYIKoZIzj0EAwIw
FDESMBAGA1UEAwwJbG9jYWxob3N0MB4XDTIwM... | rust_cleaned_test_functions.jsonl/99077 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 876
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
12316,
5332,
6615,
20627,
8378,
666,
580,
529,
368,
341,
286,
1077,
5206,
82881,
529,
284,
54819,
486,
15810,
12151,
1703,
486,
931,
1005,
15454,
543,
286,
3270,
33673,
310,
82881,
529,
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_contrast_ratio() {
let rgb_white = RgbColor(255, 255, 255);
let rgb_yellow = RgbColor(255, 255, 0);
assert_eq!(rgb_white.find_ratio(&rgb_yellow).floor(), 1.);
let rgb_blue = RgbColor(0, 0, 255);
assert_eq!(rgb_white.find_ratio(&rgb_blue).floor(), 8.);
... | rust_cleaned_test_functions.jsonl/46477 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 162
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62663,
559,
19917,
368,
341,
286,
1077,
17993,
44431,
284,
431,
9511,
1636,
7,
17,
20,
20,
11,
220,
17,
20,
20,
11,
220,
17,
20,
20,
317,
286,
1077,
17993,
93053,
284,
431,
9511,
1636,
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_part1() {
assert_eq!(super::part1(INPUT_SMALL), 7 * 5);
assert_eq!(super::part1(INPUT_MED), 22 * 10);
} | rust_cleaned_test_functions.jsonl/86116 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 78
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10495,
16,
368,
341,
286,
2060,
10714,
10297,
9522,
486,
4480,
16,
57911,
56207,
701,
220,
22,
353,
220,
20,
317,
286,
2060,
10714,
10297,
9522,
486,
4480,
16,
57911,
97550,
701,
220,
17,
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_negation() {
let a = Fp2 {
c0: Fp::from_raw_unchecked([
0xc9a2_1831_63ee_70d4,
0xbc37_70a7_196b_5c91,
0xa247_f8c1_304c_5f44,
0xb01f_c2a3_726c_80b5,
0xe1d2_93e5_bbd9_19c9,
0x04b7_8e80_020e_f2ca,
]),
... | rust_cleaned_test_functions.jsonl/32510 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 868
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28209,
367,
368,
341,
262,
1077,
264,
284,
434,
79,
17,
341,
286,
272,
15,
25,
434,
79,
486,
1499,
16067,
4907,
7549,
8956,
310,
220,
15,
8148,
24,
64,
17,
62,
16,
23,
18,
16,
62,
21,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_handshake_fragmented_reads() {
// create an in-memory socket for testing
let (mut dialer_socket, mut listener_socket) = ReadWriteTestSocket::new_pair();
// fragment reads
dialer_socket.set_fragmented_read();
listener_socket.set_fragmented_read();
... | rust_cleaned_test_functions.jsonl/26674 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 317
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23194,
29661,
43012,
291,
66628,
368,
341,
286,
442,
1855,
458,
304,
64096,
7575,
369,
7497,
198,
286,
1077,
320,
6984,
27860,
261,
19555,
11,
5206,
11446,
19555,
8,
284,
4457,
7985,
2271,
10286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_post() {
let message = Message::new();
let msg_bytes = message.to_vec().unwrap();
let len = msg_bytes.len();
let stream = TestBytesStream(vec![Ok(Bytes::from(msg_bytes))]);
let request = request::new("ns.example.com", len).unwrap();
let reques... | rust_cleaned_test_functions.jsonl/130325 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 320
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
6333,
368,
341,
286,
1077,
1943,
284,
4856,
486,
931,
543,
286,
1077,
3750,
12524,
284,
1943,
2389,
13251,
1005,
15454,
543,
286,
1077,
2422,
284,
3750,
12524,
19406,
543,
286,
1077,
4269,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_get_session_bus_path() {
let path = "unix:path=/tmp/dbus-test-not-exist";
let abstract_path = "unix:abstract=/tmp/dbus-test";
let abstract_path_with_keys = "unix:abstract=/tmp/dbus-test,guid=aaaaaaaa,test=bbbbbbbb";
let addr = parse_dbus_addr_str(path);
a... | rust_cleaned_test_functions.jsonl/23531 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 300
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
12316,
25418,
2638,
368,
341,
286,
1077,
1815,
284,
330,
56646,
71796,
23286,
5173,
29357,
355,
16839,
29169,
10187,
380,
876,
286,
1077,
8115,
2638,
284,
330,
56646,
25,
16249,
23286,
5173,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_memory_region() {
let regions_summary = [];
assert_eq!(
format!(
"{:?}",
new_guest_memory_mmap(®ions_summary).err().unwrap()
),
format!("{:?}", Error::NoMemoryRegion)
);
assert_eq!(
... | rust_cleaned_test_functions.jsonl/63913 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 714
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
19195,
20627,
368,
341,
286,
1077,
13604,
27251,
284,
15436,
286,
2060,
10714,
33673,
310,
3561,
33673,
394,
13868,
76475,
24375,
394,
501,
62739,
19195,
717,
2186,
2099,
57708,
27251,
568,
61... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_fde_incomplete_cie_pointer_32() {
let kind = debug_frame_be();
let section = Section::with_endian(kind.endian())
// The length is not large enough to contain the CIE pointer.
.B32(3)
.B32(1994);
let section = section.get_contents(... | rust_cleaned_test_functions.jsonl/9305 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 293
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
761,
450,
1243,
14737,
666,
645,
21425,
62,
18,
17,
368,
341,
286,
1077,
3093,
284,
7390,
8929,
21263,
543,
286,
1077,
3772,
284,
11113,
486,
4197,
87193,
62697,
5073,
1103,
2398,
310,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_byte_count() {
let valid_input = [
("0", 0),
("50K", 50 * 1024),
("50k", 50 * 1024),
("1M", 1024 * 1024),
("100M", 100 * 1024 * 1024),
#[cfg(not(target_pointer_width = "32"))]
("1000G", 1000 * 1024 ... | rust_cleaned_test_functions.jsonl/31610 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 834
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
19737,
3180,
368,
341,
286,
1077,
2697,
5898,
284,
2278,
310,
3489,
15,
497,
220,
15,
1326,
310,
3489,
20,
15,
42,
497,
220,
20,
15,
353,
220,
16,
15,
17,
19,
1326,
310,
3489,
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... | 4 |
#[test]
fn test_convert_utf8_to_utf16_without_replacement() {
let mut buf = [0u16; 5];
assert_eq!(
convert_utf8_to_utf16_without_replacement(b"ab", &mut buf[..2]),
Some(2)
);
assert_eq!(buf[0], u16::from(b'a'));
assert_eq!(buf[1], u16::from(b'b'));... | rust_cleaned_test_functions.jsonl/27331 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1220
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
39453,
23,
2346,
39453,
16,
21,
39904,
1288,
16101,
368,
341,
286,
1077,
5206,
6607,
284,
508,
15,
84,
16,
21,
26,
220,
20,
935,
286,
2060,
10714,
33673,
310,
5508,
39453,
23,
2346,
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_intv_cmp_nq(){
let o = Interval::open(3,5);
let c = Interval::closed(3,5);
assert!(o>Interval::open(1,2));
assert!(o>Interval::open(1,3));
assert!(!(o>Interval::open(1,4)));
assert!(c>Interval::open(1,2));
assert!(c>Interval::open(1,3));
... | rust_cleaned_test_functions.jsonl/107810 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 626
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
85,
35193,
1089,
80,
3032,
286,
1077,
297,
284,
40584,
486,
2508,
7,
18,
11,
20,
317,
286,
1077,
272,
284,
40584,
486,
34087,
7,
18,
11,
20,
626,
286,
2060,
10297,
78,
29,
10256,
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_circle_undirected() {
type Cost = i32;
let neigh: Vec<Vec<(usize, Cost)>> = vec![
vec![(1, 1), (4, 1)],
vec![(2, 1), (0, 1)],
vec![(3, 1), (1, 1)],
vec![(4, 1), (2, 1)],
vec![(0, 1), (3, 1)],
];
let expec... | rust_cleaned_test_functions.jsonl/98952 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 266
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42222,
62,
1241,
74612,
368,
341,
286,
943,
11194,
284,
600,
18,
17,
280,
286,
1077,
96166,
25,
11312,
50439,
28706,
51878,
11,
11194,
54229,
284,
7486,
90515,
310,
7486,
0,
9697,
16,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_object_merge() {
let ns = "person{}";
let results = Namespace::parse(ns).unwrap();
let expected = vec![
Namespace::Object {
id: "person".into(),
},
Namespace::MergeObject,
];
assert_eq!(expected, results)... | rust_cleaned_test_functions.jsonl/93991 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 174
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5314,
20888,
368,
341,
286,
1077,
12268,
284,
330,
8987,
6257,
876,
286,
1077,
3059,
284,
41962,
486,
6400,
39417,
568,
15454,
543,
286,
1077,
3601,
284,
7486,
90515,
310,
41962,
486,
1190,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_writer_with_codec() {
let schema = Schema::parse_str(SCHEMA).unwrap();
let writer = make_writer_with_codec(&schema);
check_writer(writer, &schema);
} | rust_cleaned_test_functions.jsonl/37663 | {
"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,
28908,
6615,
51084,
368,
341,
286,
1077,
10802,
284,
12539,
486,
6400,
2895,
59461,
35839,
568,
15454,
543,
286,
1077,
6916,
284,
1281,
28908,
6615,
51084,
2099,
17349,
317,
286,
1779,
28908,
38356,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_long_format_multiple_users() {
let scene = TestScenario::new(util_name!());
let expected = scene
.cmd_keepenv(util_name!())
.env("LANGUAGE", "C")
.arg("-l")
.arg("root")
.arg("root")
.arg("root")
.succeeds();
scene
.uc... | rust_cleaned_test_functions.jsonl/72620 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 261
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17799,
8955,
45233,
16348,
368,
341,
262,
1077,
6109,
284,
3393,
54031,
486,
931,
67811,
1269,
0,
5231,
262,
1077,
3601,
284,
6109,
198,
286,
659,
8710,
50293,
3160,
67811,
1269,
0,
2398,
286,
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_auto_import_split_self_for_target() {
check_assist(
add_import,
"
use std::fmt::Debug;
impl std::fmt<|> for Foo {
}
",
"
use std::fmt::{ self, Debug};
impl fmt<|> for Foo {
}
",
);
} | rust_cleaned_test_functions.jsonl/39953 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 154
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27740,
18434,
17052,
25637,
5478,
11123,
368,
341,
286,
1779,
12083,
380,
1006,
310,
912,
18434,
345,
310,
6228,
810,
1460,
486,
12501,
486,
7939,
401,
6383,
1460,
486,
12501,
27,
91,
29,
369,
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_from_into_cose_key() {
let mut rng = ThreadRng256 {};
let sk = crypto::ecdh::SecKey::gensk(&mut rng);
let pk = sk.genpk();
let cose_key = CoseKey::from(pk.clone());
let created_pk = ecdh::PubKey::try_from(cose_key);
assert_eq!(created_pk, Ok(pk));
... | rust_cleaned_test_functions.jsonl/49013 | {
"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,
5673,
45514,
666,
960,
3097,
368,
341,
286,
1077,
5206,
28422,
284,
8752,
49,
968,
17,
20,
21,
9321,
286,
1077,
1901,
284,
19028,
486,
757,
30621,
486,
8430,
1592,
486,
58305,
74,
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... | 1 |
#[test]
fn test_fmt_debug_up_to_20_elements() {
(1..=20).for_each(|i| {
let values = (0..i).collect::<Vec<i16>>();
let array_expected = format!(
"PrimitiveArray<Int16>\n[\n{}\n]",
values
.iter()
.map(|v| { fo... | rust_cleaned_test_functions.jsonl/27285 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 349
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38128,
15446,
8237,
2346,
62,
17,
15,
22801,
368,
341,
286,
320,
16,
496,
28,
17,
15,
568,
1958,
32046,
22428,
72,
91,
341,
310,
1077,
2750,
284,
320,
15,
496,
72,
568,
17384,
27638,
10050,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_invalid_csv() {
let file = File::open("test/data/various_types_invalid.csv").unwrap();
let schema = Schema::new(vec![
Field::new("c_int", DataType::UInt64, false),
Field::new("c_float", DataType::Float32, false),
Field::new("c_string", D... | rust_cleaned_test_functions.jsonl/16417 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 578
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
31433,
14020,
368,
341,
286,
1077,
1034,
284,
2887,
486,
2508,
445,
1944,
13167,
92146,
1223,
9763,
31433,
11219,
1827,
15454,
1428,
286,
1077,
10802,
284,
12539,
486,
931,
25592,
90515,
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... | 3 |
#[test]
fn test_from_partition_summaries() {
let partitions = vec![
PartitionSummary {
key: "p1".to_string(),
table: TableSummary {
name: "t1".to_string(),
columns: vec![
ColumnSummary {
... | rust_cleaned_test_functions.jsonl/94370 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1618
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
43840,
10160,
89333,
368,
341,
286,
1077,
46688,
284,
7486,
90515,
310,
54626,
19237,
341,
394,
1376,
25,
330,
79,
16,
3263,
983,
3904,
3148,
394,
1965,
25,
6633,
19237,
341,
503,
829,
25,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lazy_exec() {
let df = get_df();
let new = df
.clone()
.lazy()
.select([col("sepal.width"), col("variety")])
.sort("sepal.width", false)
.collect();
println!("{:?}", new);
let new = df
.lazy()
.filter(not(col("sepal.width")... | rust_cleaned_test_functions.jsonl/104 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 244
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49646,
18430,
368,
341,
262,
1077,
6764,
284,
633,
10894,
543,
262,
1077,
501,
284,
6764,
198,
286,
659,
19982,
741,
286,
659,
49013,
741,
286,
659,
1742,
2561,
2074,
445,
325,
19308,
5441,
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_to_str_ascii() {
Python::with_gil(|py| {
let s = "ascii 🐈";
let obj: PyObject = PyString::new(py, s).into();
let py_string = <PyString as PyTryFrom>::try_from(obj.as_ref(py)).unwrap();
assert_eq!(s, py_string.to_str().unwrap());
})... | rust_cleaned_test_functions.jsonl/118016 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 178
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
2895,
50238,
368,
341,
286,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
341,
310,
1077,
274,
284,
330,
23324,
11162,
238,
230,
876,
310,
1077,
2839,
25,
15891,
284,
5355,
703,
486,
931,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_conversion_to_int_value() {
let context = Context::create();
let module = context.create_module("testing");
let builder = context.create_builder();
// Create a function whose the first parameter is of IntType
let i64_type = context.i64_type();
let fn_type = context.void_... | rust_cleaned_test_functions.jsonl/134456 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 468
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64132,
2346,
4042,
3142,
368,
341,
262,
1077,
2266,
284,
9608,
486,
3182,
543,
262,
1077,
4688,
284,
2266,
2520,
10750,
445,
8840,
797,
262,
1077,
7363,
284,
2266,
2520,
28532,
1428,
262,
442,
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_proposal_generation_parent() {
let block_store = build_empty_tree();
let mut inserter = TreeInserter::new(block_store.clone());
let proposal_generator = ProposalGenerator::new(
block_store.clone(),
Arc::new(MockTransactionManager::new()),
Arc::new(SimulatedTim... | rust_cleaned_test_functions.jsonl/132668 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 680
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21663,
32556,
64191,
15960,
368,
341,
262,
1077,
2504,
14809,
284,
1936,
15124,
11663,
543,
262,
1077,
5206,
47325,
465,
284,
8942,
641,
90727,
486,
931,
18682,
14809,
15997,
1423,
262,
1077,
13734,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_storage_remove_account_double_remove() {
let accounts = AccountsDB::new(Vec::new());
let pubkey = Pubkey::new_rand();
let account = Account::new(1, 0, &Account::default().owner);
accounts.store(0, &[(&pubkey, &account)]);
let storage = accounts.storage.rea... | rust_cleaned_test_functions.jsonl/33699 | {
"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,
23310,
18193,
13500,
24598,
18193,
368,
341,
286,
1077,
9618,
284,
40655,
3506,
486,
931,
49923,
486,
931,
1423,
286,
1077,
95116,
284,
22611,
792,
486,
931,
33864,
543,
286,
1077,
2692,
284,
8615... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_statement() {
let input = "
let x = 5;
let y = 10;
let foobar = 838383;
";
let mut program = parse_statements(input);
assert_eq!(3, program.len());
let line1 = program.remove(0);
let rhs = verify_let_state... | rust_cleaned_test_functions.jsonl/64064 | {
"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,
21039,
62,
1149,
37404,
368,
341,
286,
1077,
1946,
284,
6228,
688,
1077,
856,
284,
220,
20,
280,
688,
1077,
379,
284,
220,
16,
15,
280,
688,
1077,
11756,
31393,
284,
220,
23,
18,
23,
18,
23,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_attr_query_items() {
let querier = new_valid_db("attr_query_items.db");
let attrs = vec!["red"];
let items = querier.query_items(None, Some(attrs), None);
assert_eq!(2, items.len());
let attrs = vec!["fairy", "poisoned"];
let items = querier.quer... | rust_cleaned_test_functions.jsonl/107669 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 186
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10422,
5738,
12134,
368,
341,
286,
1077,
29134,
1268,
284,
501,
8337,
8685,
445,
2991,
5738,
12134,
7076,
3071,
286,
1077,
16204,
284,
7486,
0,
1183,
1151,
6332,
286,
1077,
3589,
284,
29134,
1268,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_find_with_mut() {
let mut m = TreeMap::new();
assert!(m.insert("t1", 12i).is_none());
assert!(m.insert("t2", 8).is_none());
assert!(m.insert("t5", 14).is_none());
let new = 100;
match m.find_with_mut(|&k| "t5".cmp(k)) {
None => panic!(),... | rust_cleaned_test_functions.jsonl/88288 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
6615,
29523,
368,
341,
286,
1077,
5206,
296,
284,
76883,
486,
931,
543,
286,
2060,
10297,
76,
7030,
445,
83,
16,
497,
220,
16,
17,
72,
568,
285,
31488,
1423,
286,
2060,
10297,
76,
7030,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_convert_index_expression() {
let b = ast::BaseNode::default();
let pkg =
Parser::new("a[3]").parse_single_package("path".to_string(), "foo.flux".to_string());
let got = test_convert(pkg).unwrap();
let symbols = collect_symbols(&got);
let want... | rust_cleaned_test_functions.jsonl/131381 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 812
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
3560,
28068,
368,
341,
286,
1077,
293,
284,
11763,
486,
3978,
1955,
486,
2258,
543,
286,
1077,
24793,
4035,
310,
21102,
486,
931,
445,
64,
58,
18,
44891,
6400,
19487,
26328,
445,
2343,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_filter_chain() {
let mut data = vec![1.0, 2.0, 3.0, 4.0, 5.0].into_iter();
let mut filt1 = fir::Fir::new(vec![0.5, 0.5], &mut data);
let x2s = filt1.output();
let mut filt2 = fir::Fir::new(vec![1.], x2s);
let ys = filt2.output();
let expected = vec![0.5, 1.5, 2.5, 3.5, 4... | rust_cleaned_test_functions.jsonl/31420 | {
"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,
8727,
30583,
368,
341,
262,
1077,
5206,
821,
284,
7486,
20703,
16,
13,
15,
11,
220,
17,
13,
15,
11,
220,
18,
13,
15,
11,
220,
19,
13,
15,
11,
220,
20,
13,
15,
936,
18122,
11723,
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... | 2 |
#[test]
fn test_enforce_limit_error_event() {
let mut envelope = envelope![Event];
let mut mock = MockLimiter::default().deny(DataCategory::Error);
let (_, limits) = EnvelopeLimiter::new(|s, q| mock.check(s, q))
.enforce(&mut envelope, &scoping())
.unwrap();
... | rust_cleaned_test_functions.jsonl/101161 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 248
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6205,
8833,
14763,
4096,
6748,
368,
341,
286,
1077,
5206,
34398,
284,
34398,
20703,
1556,
4821,
286,
1077,
5206,
7860,
284,
14563,
43,
17700,
486,
2258,
1005,
89963,
18959,
6746,
486,
1454,
317,
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_flags_query_dialogues() {
let querier = new_valid_db("flag_query_dialogues.db");
let flags = vec!["grounded"];
let dialogues = querier.query_dialogues(None, Some(flags), None, None);
assert_eq!(2, dialogues.len());
let flags = vec!["fairy", "poisoned"];
... | rust_cleaned_test_functions.jsonl/107704 | {
"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,
14130,
5738,
24331,
1137,
368,
341,
286,
1077,
29134,
1268,
284,
501,
8337,
8685,
445,
9903,
5738,
24331,
1137,
7076,
3071,
286,
1077,
8042,
284,
7486,
0,
1183,
1951,
291,
6332,
286,
1077,
7254,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_decimal_wrong_precision() {
let a = PrimitiveArray::from([None]).to(DataType::Decimal(5, 2));
let b = PrimitiveArray::from([None]).to(DataType::Decimal(6, 2));
let result = add(&a, &b);
if result.is_ok() {
panic!("Should panic for different precis... | rust_cleaned_test_functions.jsonl/6874 | {
"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,
2891,
74429,
75198,
54618,
368,
341,
286,
1077,
264,
284,
51460,
1857,
486,
1499,
2561,
4064,
10697,
983,
63941,
486,
11269,
7,
20,
11,
220,
17,
1106,
286,
1077,
293,
284,
51460,
1857,
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... | 2 |
#[test]
fn test_has_wpa3_capable_client_success() {
let mut test_values = test_setup();
// Query whether there is an iface that can do WPA3.
let has_wpa3_fut = test_values.iface_manager.has_wpa3_capable_client();
pin_mut!(has_wpa3_fut);
assert_variant!(test_values.exec.r... | rust_cleaned_test_functions.jsonl/59195 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 470
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21778,
1670,
6595,
18,
16388,
480,
8179,
18632,
368,
341,
286,
1077,
5206,
1273,
9146,
284,
1273,
21363,
1428,
286,
442,
11361,
3425,
1052,
374,
458,
49313,
429,
646,
653,
467,
8041,
18,
624,
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_ripemd160() {
let input = &[0xff];
let output = hex_decode("2c0c45d3ecab80fe060e5f1d7057cd2f8de5e557").unwrap();
test_precompile!(Ripemd160, input, output, 720);
} | rust_cleaned_test_functions.jsonl/51964 | {
"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,
62,
4561,
94110,
16,
21,
15,
368,
341,
262,
1077,
1946,
284,
44590,
15,
9020,
935,
262,
1077,
2550,
284,
12371,
15227,
445,
17,
66,
15,
66,
19,
20,
67,
18,
757,
370,
23,
15,
1859,
15,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pid() {
let mut p = PacketInfo::null_packet();
for pid in 0..8191 {
p.set_pid(pid);
assert_eq!(p.pid(), pid);
}
} | rust_cleaned_test_functions.jsonl/47182 | {
"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,
30065,
368,
341,
286,
1077,
5206,
281,
284,
28889,
1731,
486,
2921,
21078,
543,
286,
369,
14814,
304,
220,
15,
496,
23,
16,
24,
16,
341,
310,
281,
980,
30065,
37844,
317,
310,
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
] | 2 |
#[test]
fn test_nand() {
let mut nand = Nand::new();
nand.a = false;
nand.b = false;
nand.prop();
assert_eq!(nand.out, true);
nand.a = true;
nand.b = false;
nand.prop();
assert_eq!(nand.out, true);
nand.a = false;
nand.b ... | rust_cleaned_test_functions.jsonl/18847 | {
"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,
1089,
437,
368,
341,
286,
1077,
5206,
308,
437,
284,
451,
437,
486,
931,
1428,
286,
308,
437,
5849,
284,
895,
280,
286,
308,
437,
948,
284,
895,
280,
286,
308,
437,
18417,
543,
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,
1,
1,
1... | 1 |
#[test]
fn test_multi_cpu() {
let bionic = UbuntuDiskConfig::new(BIONIC_IMAGE_NAME.to_string());
let guest = Guest::new(Box::new(bionic));
let mut cmd = GuestCommand::new(&guest);
cmd.args(&["--cpus", "boot=2,max=4"])
.args(&["--memory", "size=512M"])
.arg... | rust_cleaned_test_functions.jsonl/26098 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 866
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25133,
21795,
368,
341,
286,
1077,
293,
20764,
284,
34960,
47583,
2648,
486,
931,
5349,
1271,
1317,
19121,
4708,
2389,
3904,
1423,
286,
1077,
8640,
284,
26215,
486,
931,
67758,
486,
931,
1883,
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_fourcc() {
let ftyp_fcc = 0x66747970;
let ftyp_value = FourCC::from(ftyp_fcc);
assert_eq!(&ftyp_value.value[..], b"ftyp");
let ftyp_fcc2: u32 = ftyp_value.into();
assert_eq!(ftyp_fcc, ftyp_fcc2);
} | rust_cleaned_test_functions.jsonl/35659 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 148
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
56142,
638,
368,
341,
286,
1077,
282,
3653,
761,
638,
284,
220,
15,
87,
21,
21,
22,
19,
22,
24,
22,
15,
280,
286,
1077,
282,
3653,
3142,
284,
13322,
3706,
486,
1499,
63106,
1082,
761,
638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_index_integrity() {
let slot = 1;
let num_entries = 100;
let (data_shreds, coding_shreds, leader_schedule_cache) =
setup_erasure_shreds(slot, 0, num_entries, 1.0);
assert!(data_shreds.len() > 3);
assert!(coding_shreds.len() > 3);
let bl... | rust_cleaned_test_functions.jsonl/116913 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3200
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3560,
4042,
67212,
368,
341,
286,
1077,
9446,
284,
220,
16,
280,
286,
1077,
1629,
26092,
284,
220,
16,
15,
15,
280,
286,
1077,
320,
691,
3712,
53369,
11,
10822,
3712,
53369,
11,
7653,
34530,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_repository_registrations_query() {
assert_eq!(repository_registrations_query(""), format!("{}.", CONFIG_KEY_REGISTRATIONS));
assert_eq!(
repository_registrations_query("a-b"),
format!("{}.a-b", CONFIG_KEY_REGISTRATIONS)
);
assert_eq!(
... | rust_cleaned_test_functions.jsonl/98261 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 300
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
47301,
4920,
3758,
804,
5738,
368,
341,
286,
2060,
10714,
10297,
23319,
4920,
3758,
804,
5738,
86076,
3561,
17223,
6257,
10465,
13202,
6600,
8064,
29503,
21792,
1106,
286,
2060,
10714,
33673,
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... | 1 |
#[test]
fn test_with_http_and_port_git_url_parts() {
let RemoteParts { domain, repository } =
get_remote_parts("http://host.xz:80/path/to/repo.git/").unwrap();
assert_eq!(domain, "host.xz");
assert_eq!(repository, "path/to/repo");
} | rust_cleaned_test_functions.jsonl/87539 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 137
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6615,
25888,
8378,
8716,
68801,
2903,
33217,
368,
341,
286,
1077,
20738,
28921,
314,
7947,
11,
12542,
335,
4035,
310,
633,
36425,
33217,
445,
1254,
1110,
3790,
1993,
89,
25,
23,
15,
50976,
32429,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_credit_with_lua() {
let code = r#"accounts[1].tokens = accounts[1].tokens + 1"#;
let mut accounts = [(Pubkey::default(), Account::default())];
run_lua(&mut create_keyed_accounts(&mut accounts), code, &[]).unwrap();
assert_eq!(accounts[0].1.tokens, 1);
} | rust_cleaned_test_functions.jsonl/113680 | {
"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,
51569,
6615,
76013,
368,
341,
286,
1077,
2038,
284,
435,
55543,
26206,
58,
16,
936,
30566,
284,
9618,
58,
16,
936,
30566,
488,
220,
16,
57676,
280,
286,
1077,
5206,
9618,
284,
17826,
29162,
792,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_process_authorize_ix_ok() {
let nonce_acc = nonce_account::create_account(1_000_000);
process_instruction(
&Pubkey::default(),
vec![
KeyedAccount::new(&Pubkey::default(), true, &nonce_acc),
KeyedAccount::new(
... | rust_cleaned_test_functions.jsonl/73075 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 544
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
22938,
551,
62686,
19817,
368,
341,
286,
1077,
39676,
17737,
284,
39676,
13500,
486,
3182,
13500,
7,
16,
62,
15,
15,
15,
62,
15,
15,
15,
317,
286,
1882,
54923,
1006,
310,
609,
29162,
79... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_affine_scalar_multiplication() {
let g = G2Affine::generator();
let a = Scalar::from_raw([
0x2b56_8297_a56d_a71c,
0xd8c3_9ecb_0ef3_75d1,
0x435c_38da_67bf_bf96,
0x8088_a050_26b6_59b2,
]);
let b = Scalar::from_raw([
0x785f_dd9b_26ef_8b85,
... | rust_cleaned_test_functions.jsonl/47809 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 315
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48914,
482,
41652,
91802,
1693,
368,
341,
262,
1077,
342,
284,
479,
17,
25841,
482,
486,
35851,
543,
262,
1077,
264,
284,
35176,
486,
1499,
16067,
8956,
286,
220,
15,
87,
17,
65,
20,
21,
62,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_value_string() {
let mut v0: String = "foo".to_string();
let v1 = Value::from("bar");
let v1p = "bar";
v0.from_value(v1);
assert_eq!(v0, v1p, "v0 should equal {} but is actually {}", v1p, v0);
// This is a noop and prints an error
v0... | rust_cleaned_test_functions.jsonl/83578 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 215
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
3142,
3904,
368,
341,
286,
1077,
5206,
348,
15,
25,
923,
284,
330,
7975,
3263,
983,
3904,
543,
286,
1077,
348,
16,
284,
5162,
486,
1499,
445,
2257,
797,
286,
1077,
348,
16,
79,
284,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_install_target_new_file_with_owner() {
let (at, mut ucmd) = at_and_ucmd!();
let file = "file";
let dir = "target_dir";
let uid = get_effective_uid();
at.touch(file);
at.mkdir(dir);
let result = ucmd
.arg(file)
.arg("--owner")
.arg(uid.to_strin... | rust_cleaned_test_functions.jsonl/47027 | {
"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,
34245,
11123,
5921,
2458,
6615,
29027,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
1077,
1034,
284,
330,
1192,
876,
262,
1077,
5419,
284,
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... | 3 |
#[test]
fn test_network_type_is_udp() -> Result<()> {
assert!(NetworkType::Udp4.is_udp());
assert!(NetworkType::Udp6.is_udp());
assert!(!NetworkType::Udp4.is_tcp());
assert!(!NetworkType::Udp6.is_tcp());
Ok(())
} | rust_cleaned_test_functions.jsonl/89876 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 116
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20966,
1819,
6892,
69432,
368,
1464,
5714,
71698,
341,
262,
2060,
10297,
12320,
929,
486,
52,
9796,
19,
2079,
69432,
1423,
262,
2060,
10297,
12320,
929,
486,
52,
9796,
21,
2079,
69432,
1423,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_zsh_escape() {
let test = "10%";
assert_eq!(wrap_colorseq_for_shell(test.to_owned(), Shell::Zsh), "10%%");
assert_eq!(
wrap_colorseq_for_shell(test.to_owned(), Shell::PowerShell),
test
);
} | rust_cleaned_test_functions.jsonl/56268 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 146
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6415,
927,
21832,
368,
341,
286,
1077,
1273,
284,
330,
16,
15,
95670,
286,
2060,
10714,
10297,
10097,
6714,
13262,
5478,
48945,
8623,
2389,
51973,
1507,
29402,
486,
57,
927,
701,
330,
16,
15,
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_user_playlist() {
let mut spotify_oauth = SpotifyOAuth::default().build();
match get_token(&mut spotify_oauth) {
Some(token_info) => {
let client_credential = SpotifyClientCredentials::default()
.token_info(token_info)
.build();
... | rust_cleaned_test_functions.jsonl/79294 | {
"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,
3317,
69267,
368,
341,
262,
1077,
5206,
87790,
91193,
284,
40537,
57850,
486,
2258,
1005,
5834,
543,
262,
2432,
633,
6458,
2099,
6984,
87790,
91193,
8,
341,
286,
4329,
13274,
3109,
8,
589,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_decode_valid_windows_1257_to_cow_without_bom_handling() {
let (cow, had_errors) = WINDOWS_1257.decode_without_bom_handling(b"abc\x80\xE4");
match cow {
Cow::Borrowed(_) => unreachable!(),
Cow::Owned(s) => {
assert_eq!(s, "abc\u{20AC}\u{00E4... | rust_cleaned_test_functions.jsonl/90258 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 220
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
8337,
58220,
62,
16,
17,
20,
22,
2346,
666,
363,
39904,
880,
316,
75642,
368,
341,
286,
1077,
320,
18921,
11,
1030,
20196,
8,
284,
75165,
62,
16,
17,
20,
22,
15922,
39904,
880,
316,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_send_messages_dump_db() {
let client = RpcClient::new_mock("mock_client".to_string());
let dir = tempdir().unwrap();
let db_file = dir
.path()
.join("send_messages.db")
.to_str()
.unwrap()
.to_string();
l... | rust_cleaned_test_functions.jsonl/50200 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2049
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13565,
23428,
18296,
8685,
368,
341,
286,
1077,
2943,
284,
79961,
2959,
486,
931,
34134,
445,
16712,
8179,
3263,
983,
3904,
1423,
286,
1077,
5419,
284,
2730,
3741,
1005,
15454,
543,
286,
1077,
292... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_page_check_options_in_check() {
let check = read_single_check("checks/tests/test5.json").unwrap();
let page: &Page = &check.clone().pages.unwrap()[0];
let options = page.options.clone().unwrap();
let cookies = options.cookies;
let headers = options.headers... | rust_cleaned_test_functions.jsonl/80333 | {
"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,
6129,
7200,
8743,
1243,
7200,
368,
341,
286,
1077,
1779,
284,
1349,
19487,
7200,
445,
49383,
62468,
12697,
20,
4323,
1827,
15454,
543,
286,
1077,
2150,
25,
609,
2665,
284,
609,
2028,
15997,
1005,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_match_til_zero() {
let input = "demo\u{0}second\u{0}";
let (f, rest) = match parse_c_string(input){
Ok((f, Some(rest))) => (f,rest),
_ => ("",""),
};
println!("{:?} {:?}", f, rest);
assert!(f == "demo");
assert!(rest == "se... | rust_cleaned_test_functions.jsonl/72357 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 189
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10708,
528,
321,
19359,
368,
341,
286,
1077,
1946,
284,
330,
25762,
3770,
90,
15,
92,
5569,
3770,
90,
15,
71612,
286,
1077,
320,
69,
11,
2732,
8,
284,
2432,
4715,
666,
3904,
5384,
1264,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_statsd_client_histogram_duration_with_tags() {
let client = StatsdClient::from_sink("prefix", NopMetricSink);
let res = client
.histogram_with_tags("key", Duration::from_nanos(4096))
.with_tag("foo", "bar")
.with_tag_value("beta")
.... | rust_cleaned_test_functions.jsonl/10605 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 208
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15381,
67,
8179,
68564,
25454,
6615,
16333,
368,
341,
286,
1077,
2943,
284,
29927,
67,
2959,
486,
1499,
51567,
445,
11849,
497,
451,
453,
54310,
45094,
317,
286,
1077,
592,
284,
2943,
198,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_reshape() -> Result<()> {
let s = Series::new("a", &[1, 2, 3, 4]);
for (dims, list_len) in [
(&[-1, 1], 4),
(&[4, 1], 4),
(&[2, 2], 2),
(&[-1, 2], 2),
(&[2, -1], 2),
] {
let out = s.reshape(dims)?;
... | rust_cleaned_test_functions.jsonl/55645 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 315
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
16137,
368,
1464,
5714,
71698,
341,
286,
1077,
274,
284,
11131,
486,
931,
445,
64,
497,
44590,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
10149,
286,
369,
320,
54490,
11,
1140,
6043,
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... | 4 |
#[test]
fn test_gray_f32() {
test_image_sum_f32("gradient-1c-32b-float.tiff", ColorType::Gray(32), 128.03194);
} | rust_cleaned_test_functions.jsonl/75194 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 60
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51331,
761,
18,
17,
368,
341,
262,
1273,
4954,
10160,
761,
18,
17,
445,
26394,
12,
16,
66,
12,
18,
17,
65,
2220,
1239,
734,
3092,
497,
3478,
929,
486,
28174,
7,
18,
17,
701,
220,
16,
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 |
#[test]
fn test_linuxcontainer_oci_state() {
let ret = new_linux_container_and_then(|c: LinuxContainer| c.oci_state());
assert!(ret.is_ok(), "Expecting Ok, Got {:?}", ret);
} | rust_cleaned_test_functions.jsonl/16624 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 89
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77463,
3586,
62,
2119,
4387,
368,
341,
286,
1077,
2112,
284,
501,
77463,
15847,
8378,
68367,
22428,
66,
25,
14340,
4502,
91,
272,
13,
2119,
4387,
1423,
286,
2060,
10297,
2122,
2079,
19817,
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 |
#[test]
fn test_valign() {
let c = TableCellProperty::new().vertical_align(VAlignType::Center);
let b = c.build();
assert_eq!(
str::from_utf8(&b).unwrap(),
r#"<w:tcPr><w:vAlign w:val="center" /></w:tcPr>"#
);
} | rust_cleaned_test_functions.jsonl/22962 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 153
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6189,
622,
368,
341,
286,
1077,
272,
284,
84370,
3052,
486,
931,
1005,
15292,
37015,
12410,
10069,
929,
486,
9392,
317,
286,
1077,
293,
284,
272,
13239,
543,
286,
2060,
10714,
33673,
310,
607,
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_nonnull_array_is_not_null() {
let a = Int32Array::from_slice(&[1, 2, 3, 4]);
let res = is_not_null(&a);
let expected = BooleanArray::from_slice(vec![true, true, true, true]);
assert_eq!(expected, res);
} | rust_cleaned_test_functions.jsonl/36455 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 124
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21637,
2921,
3858,
6892,
7913,
15162,
368,
341,
286,
1077,
264,
284,
1333,
18,
17,
1857,
486,
1499,
26488,
2099,
58,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
10149,
286,
1077,
592,
284,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_http_request_chunked_payload() {
let mut buf = BytesMut::from(
"GET /test HTTP/1.1\r\n\
transfer-encoding: chunked\r\n\r\n",
);
let mut reader = MessageDecoder::<Request>::default();
let (req, pl) = reader.decode(&mut buf).unwrap().unwrap(... | rust_cleaned_test_functions.jsonl/22286 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 416
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25888,
7893,
30539,
291,
32813,
368,
341,
286,
1077,
5206,
6607,
284,
30024,
51440,
486,
1499,
1006,
310,
330,
3806,
608,
1944,
10130,
14,
16,
13,
16,
12016,
1699,
5661,
1797,
8317,
12,
17159,
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_from_cow_str() {
assert_eq!(String::from(Cow::Borrowed("string")), "string");
assert_eq!(String::from(Cow::Owned(String::from("string"))), "string");
} | rust_cleaned_test_functions.jsonl/3157 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 76
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
666,
363,
2895,
368,
341,
262,
2060,
10714,
10297,
703,
486,
1499,
3025,
363,
486,
33,
7768,
291,
445,
917,
35674,
330,
917,
797,
262,
2060,
10714,
10297,
703,
486,
1499,
3025,
363,
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 |
#[test]
fn test_struct_array_builder() {
let boolean_data = ArrayData::builder(DataType::Boolean)
.len(4)
.add_buffer(Buffer::from([false, false, true, true].to_byte_slice()))
.build();
let int_data = ArrayData::builder(DataType::Int64)
.len(4)
... | rust_cleaned_test_functions.jsonl/11632 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 475
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15126,
3858,
28532,
368,
341,
286,
1077,
2710,
1769,
284,
2910,
1043,
486,
17850,
63941,
486,
6890,
340,
310,
659,
2892,
7,
19,
340,
310,
659,
718,
7776,
55574,
486,
1499,
2561,
3849,
11,
895,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_should_gather_scalar_index() {
let data = Tensor::from(arr1(&[1i64, 2, 3]));
let gatherer = Gather::new(0);
for idx in 2..3 {
let index = Tensor::from(arr0(idx as i64));
let outputs = gatherer.eval(tvec![data.clone().into(), index.into()]).unwrap()... | rust_cleaned_test_functions.jsonl/32385 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 270
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43378,
1889,
1856,
41652,
3560,
368,
341,
286,
1077,
821,
284,
26036,
486,
1499,
10939,
16,
2099,
58,
16,
72,
21,
19,
11,
220,
17,
11,
220,
18,
14382,
286,
1077,
9567,
261,
284,
48995,
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_integer_underflow() {
let resp_object = RespValue::Integer(-2);
let res = u64::from_resp(resp_object);
assert!(res.is_err());
} | rust_cleaned_test_functions.jsonl/22229 | {
"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,
31725,
58228,
4965,
368,
341,
286,
1077,
9039,
5314,
284,
79786,
1130,
486,
3486,
4080,
17,
317,
286,
1077,
592,
284,
575,
21,
19,
486,
1499,
35160,
20267,
5314,
317,
286,
2060,
10297,
416,
2079... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_reverse_iterate_with_lower_bound() {
let path = TempDir::new("test-raftstore").unwrap();
let engines = new_temp_engine(&path);
let (store, test_data) = load_default_dataset(engines);
let snap = RegionSnapshot::new(&store);
let mut iter_opt = IterOption::d... | rust_cleaned_test_functions.jsonl/7200 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 363
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43277,
11723,
349,
6615,
30425,
19447,
368,
341,
286,
1077,
1815,
284,
19944,
6184,
486,
931,
445,
1944,
12,
2944,
4314,
1827,
15454,
543,
286,
1077,
21106,
284,
501,
11771,
24823,
2099,
2343,
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... | 2 |
#[test]
fn test_mutable_extend_from_slice() {
let mut buf = MutableBuffer::new(100);
buf.extend_from_slice(b"hello");
assert_eq!(5, buf.len());
assert_eq!(b"hello", buf.data());
buf.extend_from_slice(b" world");
assert_eq!(11, buf.len());
assert_eq!(b"hel... | rust_cleaned_test_functions.jsonl/54334 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 267
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
5922,
70265,
5673,
26488,
368,
341,
286,
1077,
5206,
6607,
284,
31143,
4095,
486,
931,
7,
16,
15,
15,
317,
286,
6607,
15831,
5673,
26488,
1883,
1,
14990,
797,
286,
2060,
10714,
10297,
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_full_node_basic_flow() {
// launch environment of 4 validator nodes and 2 full nodes
let mut env = TestEnvironment::new(4);
env.setup_full_node_swarm(2);
env.launch_swarm(RoleType::Validator);
env.launch_swarm(RoleType::FullNode);
// execute smoke script
test_smoke_s... | rust_cleaned_test_functions.jsonl/106071 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 493
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16372,
5084,
34729,
27441,
368,
341,
262,
442,
7050,
4573,
315,
220,
19,
22935,
7798,
323,
220,
17,
2480,
7798,
198,
262,
1077,
5206,
6105,
284,
3393,
12723,
486,
931,
7,
19,
317,
262,
6105,
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... | 2 |
#[test]
fn test_entry_product_relation() {
let rng = &mut ark_std::test_rng();
let n = 1000usize;
let v = (0..n).map(|_| F::rand(rng)).collect::<Vec<_>>();
let monic_v = monic(&v);
let rrot_v = right_rotation(&monic_v);
let acc_v = accumulated_product(&monic_v);
let nm_rrot_v = right... | rust_cleaned_test_functions.jsonl/98979 | {
"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,
9078,
9840,
46984,
368,
341,
262,
1077,
28422,
284,
609,
6984,
55217,
15656,
486,
1944,
66849,
543,
262,
1077,
308,
284,
220,
16,
15,
15,
15,
51878,
280,
262,
1077,
348,
284,
320,
15,
496,
77,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_multiple_account_storage_no_bank_one_slot() {
solana_logger::setup();
let slot_expected: Slot = 0;
let tf = crate::append_vec::test_utils::get_append_vec_path(
"test_accountsdb_scan_account_storage_no_bank",
);
let write_versio... | rust_cleaned_test_functions.jsonl/1333 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1164
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55665,
1999,
28857,
45233,
13500,
23310,
6536,
35733,
11667,
27563,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
1428,
286,
1077,
9446,
32190,
25,
31316,
284,
220,
15,
280,
286,
1077,
6409,
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... | 7 |
#[test]
fn test_uniform_graph_distribution() {
let nodes = 4;
let edges = 2;
let distribution = UniformGraphDistribution::new(nodes, edges).unwrap();
let mut rng = thread_rng();
let mut edge_buckets = vec![vec![0; nodes]; nodes];
for _ in 0..10000 {
... | rust_cleaned_test_functions.jsonl/97719 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1167
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45066,
14738,
41465,
368,
341,
286,
1077,
7798,
284,
220,
19,
280,
286,
1077,
12822,
284,
220,
17,
401,
286,
1077,
7982,
284,
47889,
11212,
62377,
486,
931,
38705,
11,
12822,
568,
15454,
543,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_mld_immediate_report() {
// MLD specific part is mostly passthrough. This test case is here
// host should send the report immediately instead of setting a timer.
let mut s = MldGroupState::default();
let mut rng = new_rng(0);
s.... | rust_cleaned_test_functions.jsonl/123212 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 304
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
507,
17895,
14636,
14813,
368,
341,
1789,
286,
442,
386,
12335,
3151,
949,
374,
10008,
6368,
86901,
13,
1096,
1273,
1142,
374,
1588,
79133,
286,
442,
3468,
1265,
3624,
279,
1895,
7069,
4518,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_put_user() {
run_test(|url, client| {
let login =
create_and_authorize_user(url, &client, "test_put_user@gmail.com", "Admin2193!");
let put_user_response = client
.put(&format!("{}/biome/users/{}", url, login.user_id))
... | rust_cleaned_test_functions.jsonl/32289 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 688
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15557,
3317,
368,
341,
286,
1598,
4452,
22428,
1085,
11,
2943,
91,
341,
310,
1077,
5858,
4035,
394,
1855,
8378,
22938,
551,
3317,
6522,
11,
609,
2972,
11,
330,
1944,
15557,
3317,
10375,
905,
497... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mul_scalar_saturating() {
let a = Primitive::from(&vec![None, Some(6), None, Some(6)]).to(DataType::Int32);
let result = saturating_mul_scalar(&a, &1i32);
let expected = Primitive::from(&vec![None, Some(6), None, Some(6)]).to(DataType::Int32);
assert_eq!(result, e... | rust_cleaned_test_functions.jsonl/12708 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 267
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24944,
41652,
643,
2628,
1095,
368,
341,
286,
1077,
264,
284,
51460,
486,
1499,
2099,
4083,
20703,
4064,
11,
4329,
7,
21,
701,
2240,
11,
4329,
7,
21,
7252,
568,
983,
63941,
486,
1072,
18,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_access() {
assert_eq!("drwxr-xr-x", pretty_access(S_IFDIR | 0o755));
assert_eq!("-rw-r--r--", pretty_access(S_IFREG | 0o644));
assert_eq!("srw-r-----", pretty_access(S_IFSOCK | 0o640));
assert_eq!("lrw-r-xr-x", pretty_access(S_IFLNK | 0o655));
assert_eq!("... | rust_cleaned_test_functions.jsonl/36728 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 575
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12759,
368,
341,
286,
2060,
10714,
17223,
3612,
20984,
81,
6558,
81,
6558,
497,
5020,
12759,
3759,
19035,
12251,
760,
220,
15,
78,
22,
20,
20,
1106,
286,
2060,
10714,
0,
13645,
31768,
3795,
313,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_replacement_variables() {
let actual = parse_replacement_variables(
"https://deno.land/_vsc1/modules/${module}/v/${{version}}",
);
assert_eq!(actual.len(), 2);
assert!(actual.contains(&"module".to_owned()));
assert!(actual.contains(&"version".to_owned()));
} | rust_cleaned_test_functions.jsonl/57036 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 131
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
1288,
16101,
28182,
368,
341,
262,
1077,
5042,
284,
4715,
1288,
16101,
28182,
1006,
414,
330,
2428,
1110,
5183,
78,
87627,
19632,
85,
2388,
16,
22903,
11254,
4352,
4472,
85,
11254,
90,
4366... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ignore_non_admin_sender() {
// Set up dispatcher and mock sender
let sender = Box::new(MockNetworkSender::default());
let mut dispatcher = Dispatcher::new(sender.box_clone());
// Add circuit and service to splinter state
let circuit = Circuit::builder()
... | rust_cleaned_test_functions.jsonl/111694 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1187
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58493,
21637,
12207,
54356,
368,
341,
286,
442,
2573,
705,
38799,
323,
7860,
4646,
198,
286,
1077,
4646,
284,
8261,
486,
931,
66436,
12320,
20381,
486,
2258,
1423,
286,
1077,
5206,
38799,
284,
589... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_enum_long_values() {
with_key!(key, "EnumLongValues" => {
let mut vals = HashMap::with_capacity(3);
for i in &[5500, 9500, 15000] {
let name: String = format!("val{}", i);
let val = RegValue { vtype: REG_BINARY, bytes: (0..*i).map(|_| rand::random::<u... | rust_cleaned_test_functions.jsonl/128097 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 310
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31054,
17799,
9146,
368,
341,
262,
448,
3097,
10297,
792,
11,
330,
10766,
6583,
6227,
1,
589,
341,
286,
1077,
5206,
28356,
284,
10528,
486,
4197,
35603,
7,
18,
626,
286,
369,
600,
304,
44590,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_simple() {
let list = vec![Path::new("a/b/c")];
let (mut items, paths) =
FileTreeItems::create_items(&list, &BTreeSet::new())
.unwrap();
assert_eq!(items.len(), 3);
FileTreeItems::fold_paths(&mut items, &paths);
assert_eq!(items.len(), 2);
} | rust_cleaned_test_functions.jsonl/129801 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 131
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
30015,
368,
341,
197,
10217,
1140,
284,
7486,
20703,
1820,
486,
931,
445,
64,
3470,
2899,
899,
935,
197,
10217,
320,
6984,
3589,
11,
12716,
8,
4035,
298,
24848,
6533,
4353,
486,
3182,
121... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bit() {
let mut r = Register::new();
let mut b = MockBus::new();
r.set_A(0x40);
b.memory[0x80] = 0x40;
bit(0x80, &mut r, &mut b);
assert_eq!(r.get_status_zero(), false);
assert_eq!(r.get_status_negative(), false);
assert_eq!(r.get_status_overflow(), true)
} | rust_cleaned_test_functions.jsonl/14200 | {
"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,
13996,
368,
341,
262,
1077,
5206,
435,
284,
8451,
486,
931,
543,
262,
1077,
5206,
293,
284,
14563,
15073,
486,
931,
543,
262,
435,
980,
1566,
7,
15,
87,
19,
15,
317,
262,
293,
36611,
58,
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_pv_protected_method() {
let hdr = indoc! {"
#include <cstdint>
class Observer {
public:
Observer() {}
virtual void foo() const {}
virtual ~Observer() {}
protected:
virtual void baz() const {}
};
inline void bar() {}
"};
run_tes... | rust_cleaned_test_functions.jsonl/9950 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 653
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
91139,
22357,
1569,
9032,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
262,
671,
997,
366,
96975,
1339,
262,
536,
34041,
341,
262,
584,
510,
286,
34041,
368,
5613,
286,
4108,
737,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_str() {
let mut s = InlinableString::new();
for _ in 0..(INLINE_STRING_CAPACITY / 3) {
s.insert_str(0, "foo");
}
s.insert_str(0, "foo");
assert_eq!(
s,
String::from_iter((0..(INLINE_STRING_CAPACITY / 3) + 1).map... | rust_cleaned_test_functions.jsonl/109710 | {
"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,
17678,
2895,
368,
341,
286,
1077,
5206,
274,
284,
758,
3732,
480,
703,
486,
931,
1428,
286,
369,
716,
304,
220,
15,
496,
7,
55737,
12283,
92153,
608,
220,
18,
8,
341,
310,
274,
7030,
2895,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_column_writer_boolean_type_does_not_support_dictionary() {
let page_writer = get_test_page_writer();
let props = Arc::new(
WriterProperties::builder()
.set_dictionary_enabled(true)
.build(),
);
let mut writer = get_test_... | rust_cleaned_test_functions.jsonl/54347 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 405
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8744,
28908,
46642,
1819,
96374,
7913,
25827,
42605,
368,
341,
286,
1077,
2150,
28908,
284,
633,
4452,
6129,
28908,
543,
286,
1077,
6914,
284,
19689,
486,
931,
1006,
310,
29404,
7903,
486,
17850,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dead_fork_entry_verification_failure() {
let keypair2 = Keypair::new();
let res = check_dead_fork(|genesis_keypair, bank| {
let blockhash = bank.last_blockhash();
let slot = bank.slot();
let bad_hash = hash(&[2; 30]);
let hashes_per... | rust_cleaned_test_functions.jsonl/11047 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 578
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53427,
761,
669,
9078,
84245,
43618,
368,
341,
286,
1077,
1376,
12670,
17,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
592,
284,
1779,
53427,
761,
669,
22428,
77894,
3097,
12670,
11,
6073,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_deep_yield_with_type_error() {
let mut g = Gn::<()>::new(|| {
let mut g = Gn::<()>::new(|| {
yield_with(0);
});
g.next();
});
g.next();
} | rust_cleaned_test_functions.jsonl/91414 | {
"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,
87044,
83709,
6615,
1819,
4096,
368,
341,
262,
1077,
5206,
342,
284,
95151,
27638,
368,
6831,
931,
79453,
341,
286,
1077,
5206,
342,
284,
95151,
27638,
368,
6831,
931,
79453,
341,
310,
7540,
6615,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_dp_results() {
let dp_results = knap_01_dp(ITEMS, 400);
let dp_weights= dp_results.iter().fold(0, |a, &b| a + b.weight);
let dp_values = dp_results.iter().fold(0, |a, &b| a + b.value);
assert_eq!(dp_weights, 396);
assert_eq!(dp_values, 1030);
} | rust_cleaned_test_functions.jsonl/4929 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 140
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53872,
13576,
368,
341,
262,
1077,
11329,
13576,
284,
1148,
391,
62,
15,
16,
53872,
7,
11969,
50,
11,
220,
19,
15,
15,
317,
262,
1077,
11329,
21114,
28,
11329,
13576,
19471,
1005,
19961,
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_get_supported_cpuid() {
let kvm = KvmContext::new().unwrap();
let vm = Vm::new(kvm.fd()).expect("Cannot create new vm");
let cpuid = kvm
.kvm
.get_supported_cpuid(MAX_KVM_CPUID_ENTRIES)
.expect("Cannot get supported cpuid");
ass... | rust_cleaned_test_functions.jsonl/1913 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 194
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
57885,
39811,
2423,
368,
341,
286,
1077,
94748,
284,
730,
7338,
1972,
486,
931,
1005,
15454,
543,
286,
1077,
10995,
284,
647,
76,
486,
931,
5969,
7338,
58339,
6011,
17119,
445,
17444,
1855,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_exact_chunks_mut_remainder() {
let v: &mut [i32] = &mut [0, 1, 2, 3, 4];
let c = v.exact_chunks_mut(2);
assert_eq!(c.into_remainder(), &[4]);
} | rust_cleaned_test_functions.jsonl/8457 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 96
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71084,
65470,
29523,
86607,
1107,
368,
341,
262,
1077,
348,
25,
609,
6984,
508,
72,
18,
17,
60,
284,
609,
6984,
508,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
935,
262,
1077,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.