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_bank_inherit_fee_calculator() {
let (mut genesis_config, _mint_keypair) = create_genesis_config(500);
genesis_config.fee_calculator.target_lamports_per_signature = 123;
let bank0 = Arc::new(Bank::new(&genesis_config));
let bank1 = Arc::new(new_from_parent(&bank0)... | rust_cleaned_test_functions.jsonl/42417 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 226
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35733,
1243,
9263,
34305,
24005,
20022,
368,
341,
286,
1077,
320,
6984,
59366,
5332,
11,
716,
67791,
3097,
12670,
8,
284,
1855,
16322,
13774,
5332,
7,
20,
15,
15,
317,
286,
59366,
5332,
833,
212... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_test_constants() {
assert_eq!(_0, Zero::zero());
assert_eq!(_1, One::one());
assert_eq!(_2, Ratio::from_integer(2));
assert_eq!(_1_2, Ratio::new(1,2));
assert_eq!(_3_2, Ratio::new(3,2));
assert_eq!(_neg1_2, Ratio::new(-1,2));
} | rust_cleaned_test_functions.jsonl/47150 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 171
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4452,
55642,
368,
341,
1789,
286,
2060,
10714,
0,
2490,
15,
11,
18306,
486,
14154,
1423,
286,
2060,
10714,
0,
2490,
16,
11,
3776,
486,
603,
1423,
286,
2060,
10714,
0,
2490,
17,
11,
50748,
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_nested_broadcast() {
let system = new_kompact_system();
let receivers: Vec<Arc<Component<ReceiverComponent>>> = (0..3)
.map(|_i| system.create(ReceiverComponent::default))
.collect();
let group_ref: ActorPath = system
.system_path()
... | rust_cleaned_test_functions.jsonl/32538 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66279,
74923,
368,
341,
286,
1077,
1849,
284,
501,
4698,
14435,
531,
17687,
1428,
286,
1077,
39906,
25,
11312,
30192,
1287,
96689,
27,
25436,
2189,
20154,
284,
320,
15,
496,
18,
340,
310,
659,
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_new_l2cap_connection() {
let (mut exec, mut rfcomm) = setup_rfcomm_manager();
let id = PeerId(123);
let (mut remote, channel) = Channel::create();
assert!(rfcomm.new_l2cap_connection(id, channel).is_ok());
// The Session should still be active.
a... | rust_cleaned_test_functions.jsonl/49426 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 497
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
907,
17,
11346,
15866,
368,
341,
286,
1077,
320,
6984,
3883,
11,
5206,
36026,
3621,
8,
284,
6505,
65466,
3621,
12144,
1428,
286,
1077,
877,
284,
45147,
764,
7,
16,
17,
18,
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... | 2 |
#[test]
fn test_wait_with_output_once() {
let prog = if cfg!(target_os = "windows") {
Command::new("cmd").args(&["/C", "echo hello"]).stdout(Stdio::piped()).spawn().unwrap()
} else {
Command::new("echo").arg("hello").stdout(Stdio::piped()).spawn().unwrap()
};
... | rust_cleaned_test_functions.jsonl/5485 | {
"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,
18760,
6615,
7645,
7630,
368,
341,
286,
1077,
29271,
284,
421,
13286,
10297,
5657,
29387,
284,
330,
27077,
899,
341,
310,
7348,
486,
931,
445,
8710,
1827,
2116,
2099,
1183,
14,
34,
497,
330,
304... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_strings() {
test_case!("{}", "test\tstring");
test_case!("{:?}", "test\tstring");
test_case!("{:>99}", "test\tstring");
test_case!("{:>99?}", "test\tstring");
test_case!("{:^99}", "test\tstring");
test_case!("{:^99?}", "test\tstring");
test_case!("{:>99}", "test\tstr... | rust_cleaned_test_functions.jsonl/2745 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 601
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33500,
368,
341,
262,
1273,
19096,
79878,
330,
1944,
4955,
917,
797,
262,
1273,
19096,
88928,
25,
52652,
330,
1944,
4955,
917,
3071,
262,
1273,
19096,
88928,
96178,
24,
24,
9545,
330,
1944,
4955,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_send_dispatch() {
let checksum_caps = &ChecksumCapabilities::default();
let mut socket = ipv4_locals::socket(buffer(0), buffer(1));
assert!(socket.can_send());
assert_eq!(socket.dispatch(&checksum_caps, |_| unreachable!()),
Err(Error::Exhausted... | rust_cleaned_test_functions.jsonl/51527 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 560
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13565,
42991,
368,
341,
286,
1077,
32529,
52955,
284,
609,
73190,
55315,
486,
2258,
543,
286,
1077,
5206,
7575,
284,
45475,
19,
94552,
486,
9556,
12584,
7,
15,
701,
4147,
7,
16,
3237,
286,
2060,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_process_cross_program() {
#[derive(Debug, Serialize, Deserialize)]
enum MockInstruction {
NoopSuccess,
NoopFail,
ModifyOwned,
ModifyNotOwned,
}
fn mock_process_instruction(
program_id: &Pubkey,
... | rust_cleaned_test_functions.jsonl/103150 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3001
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
35284,
25096,
368,
341,
286,
11506,
27098,
42618,
11,
39900,
11,
48440,
5563,
286,
7618,
14563,
16664,
341,
310,
2308,
453,
7188,
345,
310,
2308,
453,
19524,
345,
310,
49370,
57641,
345,
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... | 7 |
#[test]
fn test_generate() {
let mut buffer = [0; MTU];
if let Ok(ie) = InformationElement::new(0xF, 0) {
let pos = ie.generate(&mut buffer);
assert_eq!(buffer[..pos], [InformationElementType::EBI as u8,
0, 1, // Length
0, // Spare
... | rust_cleaned_test_functions.jsonl/86347 | {
"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,
48851,
368,
341,
286,
1077,
5206,
4147,
284,
508,
15,
26,
19087,
52,
4821,
286,
421,
1077,
7622,
7,
645,
8,
284,
8085,
1691,
486,
931,
7,
15,
9770,
11,
220,
15,
8,
341,
310,
1077,
1133,
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_symlink_existing_directory() {
let (at, mut ucmd) = at_and_ucmd!();
let dir = "test_symlink_existing_dir";
let link = "test_symlink_existing_dir_link";
at.mkdir(dir);
ucmd.args(&["-s", dir, link]).succeeds().no_stderr();
assert!(at.dir_exists(dir));
assert!(at.is_sy... | rust_cleaned_test_functions.jsonl/4879 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 176
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58530,
44243,
62630,
14846,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
1077,
5419,
284,
330,
1944,
58530,
44243,
62630,
4334,
876,
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 |
#[test]
fn test_move_left_winapi() {
move_to(2, 0).unwrap();
move_left(2).unwrap();
assert_eq!(position().unwrap(), (0, 0));
} | rust_cleaned_test_functions.jsonl/15639 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 86
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17134,
9579,
25672,
2068,
368,
341,
286,
3271,
2346,
7,
17,
11,
220,
15,
568,
15454,
1428,
286,
3271,
9579,
7,
17,
568,
15454,
1428,
286,
2060,
10714,
10297,
3487,
1005,
15454,
1507,
320,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_handle_conf_change_when_apply_fsm_resume_pending_state() {
let mut cluster = new_node_cluster(0, 3);
let pd_client = Arc::clone(&cluster.pd_client);
pd_client.disable_default_operator();
let r1 = cluster.run_conf_change();
pd_client.must_add_peer(r1, new_peer(2, 2));
pd_... | rust_cleaned_test_functions.jsonl/23138 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 519
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10630,
16059,
15947,
47636,
36551,
97069,
58132,
37861,
4387,
368,
341,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
220,
18,
317,
262,
1077,
7744,
8179,
284,
19689,
486,
19982,
2099,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bit_mask_all_set() {
let mut mask = BitSet::new();
let mut all_bools = vec![];
let mut rng = make_rng();
for _ in 0..100 {
let mask_length = (rng.next_u32() % 50) as usize;
let bools: Vec<_> = std::iter::repeat(true).take(mask_length).coll... | rust_cleaned_test_functions.jsonl/29077 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 377
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13996,
9999,
5705,
2602,
368,
341,
286,
1077,
5206,
6911,
284,
57227,
486,
931,
543,
286,
1077,
5206,
678,
22159,
82,
284,
7486,
0,
15078,
286,
1077,
5206,
28422,
284,
1281,
66849,
1428,
286,
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... | 2 |
#[test]
fn test_range_scan_accounts() {
let (index, mut pubkeys) = setup_accounts_index_keys(3 * CFG.ITER_BATCH_SIZE);
pubkeys.sort();
run_test_range_indexes(&index, &pubkeys, None, None);
run_test_range_indexes(&index, &pubkeys, Some(CFG.ITER_BATCH_SIZE), None);
run_t... | rust_cleaned_test_functions.jsonl/74742 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 596
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9698,
28857,
55665,
368,
341,
286,
1077,
320,
1252,
11,
5206,
6675,
10563,
8,
284,
6505,
55665,
3560,
12631,
7,
18,
353,
46825,
13,
24733,
74009,
4098,
317,
286,
6675,
10563,
10614,
1428,
286,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_empty_array_static() {
let data = vec![0x80];
let parsed: Result<ParsedArray<super::ParsedArraySize1>, _> =
ParsedArray::deserialize_data(&data);
if let Err(crate::Error::ArrayParseError(
super::ArrayParseError::InvalidNumberOfElements(0, 1),
... | rust_cleaned_test_functions.jsonl/10815 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 230
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
3858,
25360,
368,
341,
286,
1077,
821,
284,
7486,
20703,
15,
87,
23,
15,
935,
286,
1077,
15676,
25,
5714,
21604,
18112,
1857,
27,
9522,
486,
82959,
1857,
1695,
16,
8066,
716,
29,
4035,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_tb() {
let tb = TaobaoMall::new("tb_account".into(), "tb_pwd".into());
let url = "https://detail.tmall.com/item.htm?id=636811454410".into();
let base64 = tb.generate_goods_poster(url);
println!("result is {}", base64);
} | rust_cleaned_test_functions.jsonl/74855 | {
"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,
23481,
368,
341,
286,
1077,
16363,
284,
23291,
69131,
44,
541,
486,
931,
445,
18387,
13500,
3263,
18122,
1507,
330,
18387,
50957,
3263,
18122,
1423,
1789,
286,
1077,
2515,
284,
330,
2428,
1110,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_executor_execute_same_block_multiple_times() {
let parent_block_id = *PRE_GENESIS_BLOCK_ID;
let block_id = gen_block_id(1);
let version = 100;
let txns: Vec<_> = (0..version)
.map(|i| encode_mint_transaction(gen_address(i), 100))
.collect();
let (executor, c... | rust_cleaned_test_functions.jsonl/54641 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 400
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
81207,
44329,
33574,
7113,
45233,
22353,
368,
341,
262,
1077,
2681,
7113,
842,
284,
353,
17357,
42362,
83366,
18756,
3450,
280,
262,
1077,
2504,
842,
284,
4081,
7113,
842,
7,
16,
317,
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... | 2 |
#[test]
fn test_query_friends_names() {
let doc = r#"{ human(id: "1000") { friends { name } } }"#;
let database = Database::new();
let schema = RootNode::new(&database, EmptyMutation::<Database>::new());
assert_eq!(
::execute(doc, None, &schema, &Variables::new(), &database),
Ok... | rust_cleaned_test_functions.jsonl/35471 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1180
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
75430,
9187,
368,
341,
262,
1077,
4629,
284,
435,
2,
14129,
3738,
3724,
25,
330,
16,
15,
15,
15,
899,
314,
4780,
314,
829,
335,
335,
335,
57676,
280,
262,
1077,
4625,
284,
9994,
486,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_verify_invalid_child_reference() {
let (root, proof, _) = test_generate_proof::<NoExtensionLayout>(
test_entries(),
vec![b"bravo"],
);
// InvalidChildReference because "bravo" is in an inline leaf node and a 32-byte value cannot
// fit in an inline leaf.
let items = vec![
(b"bravo", ... | rust_cleaned_test_functions.jsonl/56658 | {
"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,
35638,
31433,
17268,
25433,
368,
341,
10217,
320,
2888,
11,
11064,
11,
27439,
284,
1273,
48851,
86757,
27638,
2753,
12049,
2175,
17055,
197,
18185,
26092,
3148,
197,
40213,
20703,
65,
1,
1323,
27217... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_two_empties_do_not_intersect() {
let e1: EnumSet<Foo> = EnumSet::empty();
let e2: EnumSet<Foo> = EnumSet::empty();
assert!(!e1.intersects(e2));
} | rust_cleaned_test_functions.jsonl/9054 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 106
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23241,
62,
20968,
550,
26309,
7913,
72747,
368,
341,
286,
1077,
384,
16,
25,
14086,
1649,
30499,
2624,
29,
284,
14086,
1649,
486,
3194,
543,
286,
1077,
384,
17,
25,
14086,
1649,
30499,
2624,
29,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_hits() {
let tgt = (20, 30, -10, -5);
assert!(simulate(7, 2, tgt).1);
assert!(simulate(6, 3, tgt).1);
assert!(simulate(9, 0, tgt).1);
assert!(!simulate(17, -4, tgt).1);
} | rust_cleaned_test_functions.jsonl/126922 | {
"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,
63832,
368,
341,
286,
1077,
50475,
284,
320,
17,
15,
11,
220,
18,
15,
11,
481,
16,
15,
11,
481,
20,
317,
286,
2060,
10297,
86711,
7,
22,
11,
220,
17,
11,
50475,
568,
16,
317,
286,
2060,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_join_happy_path() {
use super::CaptureSink;
use crate::ground::Variable;
use crate::matching::plan::Source;
use crate::unification::Element;
use differential_dataflow::input::InputSession;
use std::collections::HashSet;
let x = MetaVar::new("x");
let y = MetaVar:... | rust_cleaned_test_functions.jsonl/31142 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1108
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31017,
1523,
11144,
2638,
368,
341,
262,
990,
2256,
486,
27429,
45094,
280,
262,
990,
17717,
486,
1951,
486,
7827,
280,
262,
990,
17717,
486,
89043,
486,
10393,
486,
3608,
280,
262,
990,
17717,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_highlight_indices() {
let text = "abc";
let indices: Vec<usize> = vec![1];
let attr = Attr {
fg: Color::Rgb(70, 130, 180),
bg: Color::Rgb(5, 10, 15),
..Attr::default()
};
let ansistring = AnsiString::from((text, &indice... | rust_cleaned_test_functions.jsonl/92162 | {
"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,
74546,
18333,
368,
341,
286,
1077,
1467,
284,
330,
13683,
876,
286,
1077,
14937,
25,
11312,
90244,
29,
284,
7486,
20703,
16,
935,
286,
1077,
6376,
284,
50943,
341,
310,
29799,
25,
3478,
486,
809... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_check_github_no_token() {
let mut cmd = main_command();
let test_github_path = fixtures_path().join("TEST_GITHUB.md");
cmd.arg("--verbose")
.arg(test_github_path)
.assert()
.success()
.stdout(contains("Total: 1"))
... | rust_cleaned_test_functions.jsonl/134338 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 237
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
1889,
3827,
6536,
6458,
368,
341,
286,
1077,
5206,
5439,
284,
1887,
10811,
543,
286,
1077,
1273,
1889,
3827,
2638,
284,
37664,
2638,
1005,
5987,
445,
10033,
2646,
73870,
21324,
3071,
286,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_write_read_cache() {
let (_tempdir, cache_dir, config_path) = test_prolog();
let cache_config = load_config!(
config_path,
"[cache]\n\
enabled = true\n\
directory = {cache_dir}\n\
baseline-compression-level = 3\n",
cache_dir
);
a... | rust_cleaned_test_functions.jsonl/84319 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1885
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
6443,
11529,
368,
341,
262,
1077,
5453,
3888,
3741,
11,
6500,
4334,
11,
2193,
2638,
8,
284,
1273,
2540,
839,
543,
262,
1077,
6500,
5332,
284,
2795,
5332,
33673,
286,
2193,
2638,
345,
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... | 5 |
#[test]
fn test_range_inclusive() {
assert!(range_inclusive(0, 5).collect::<Vec<int>>() ==
vec![0, 1, 2, 3, 4, 5]);
assert!(range_inclusive(0, 5).rev().collect::<Vec<int>>() ==
vec![5, 4, 3, 2, 1, 0]);
assert_eq!(range_inclusive(200, -5).count(), 0);
assert_eq!(range_incl... | rust_cleaned_test_functions.jsonl/61272 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 240
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9698,
1243,
8336,
368,
341,
262,
2060,
10297,
9669,
1243,
8336,
7,
15,
11,
220,
20,
568,
17384,
27638,
10050,
4159,
61586,
47761,
310,
7486,
20703,
15,
11,
220,
16,
11,
220,
17,
11,
220,
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_plan_build_verifies_vendored_state() {
let mut settings = settings_testing::dummy_raze_settings();
settings.genmode = GenMode::Vendored;
let mut fetcher = StubMetadataFetcher::with_metadata(minimum_dependency_metadata());
let mut planner = BuildPlannerImpl::new(&mut fetcher);
... | rust_cleaned_test_functions.jsonl/130152 | {
"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,
26564,
20801,
26042,
9606,
2273,
408,
3018,
4387,
368,
341,
262,
1077,
5206,
5003,
284,
5003,
70962,
486,
31390,
59969,
2986,
10853,
543,
262,
5003,
22822,
8516,
284,
9316,
3636,
486,
53,
408,
301... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_conflicting_methods() {
let cxx = indoc! {"
uint32_t Bob::get() const { return a; }
uint32_t Fred::get() const { return b; }
"};
let hdr = indoc! {"
#include <cstdint>
struct Bob {
uint32_t a;
uint32_t get() const;
};
... | rust_cleaned_test_functions.jsonl/9806 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 355
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16059,
78208,
36084,
368,
341,
262,
1077,
272,
4146,
284,
1257,
509,
0,
314,
698,
286,
2622,
18,
17,
528,
14261,
486,
455,
368,
733,
314,
470,
264,
26,
456,
286,
2622,
18,
17,
528,
27488,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_simplify_negated_and() {
let expr = binary_expr(
col("c2").gt(lit(5)),
Operator::And,
Expr::not(col("c2").gt(lit(5))),
);
let expected = expr.clone();
assert_eq!(simplify(&expr), expected);
} | rust_cleaned_test_functions.jsonl/19684 | {
"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,
643,
70206,
28209,
657,
8378,
368,
341,
1789,
286,
1077,
15169,
284,
7868,
21915,
1006,
310,
1375,
445,
66,
17,
1827,
5178,
2333,
275,
7,
20,
6965,
310,
28498,
486,
3036,
345,
310,
28819,
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_decoder() {
let data = include_str!("single-sample.txt");
let segs = load_input(data);
for seg in segs {
println!("decoded outputs: {:?}", seg.outputs);
let m: HashMap<&str, u16> = SEVEN_ARRAY.iter().map(|v| *v).collect();
let digits =... | rust_cleaned_test_functions.jsonl/120833 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 278
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49843,
368,
341,
286,
1077,
821,
284,
2924,
2895,
17223,
15338,
83879,
3909,
797,
286,
1077,
4810,
82,
284,
2795,
5898,
2592,
317,
286,
369,
4810,
304,
4810,
82,
341,
310,
13751,
17223,
62913,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_update_timestamp() {
let mut crds = Crds::default();
let val = CrdsValue::new_unsigned(CrdsData::ContactInfo(ContactInfo::new_localhost(
&Pubkey::default(),
0,
)));
assert_eq!(crds.insert(val.clone(), 0), Ok(None));
assert_eq!(crds... | rust_cleaned_test_functions.jsonl/17134 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 684
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
23073,
368,
341,
286,
1077,
5206,
1560,
5356,
284,
4553,
5356,
486,
2258,
543,
286,
1077,
1044,
284,
4553,
5356,
1130,
486,
931,
67830,
3025,
81,
5356,
1043,
486,
8732,
1731,
99102,
1731,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vector_eq_pos() {
let p1 = Tuple::vector(1.0, 2.0, 3.0);
let p2 = Tuple::vector(1.0, 2.0, 3.0);
assert_eq!(p1, p2);
} | rust_cleaned_test_functions.jsonl/113503 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 103
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12247,
10714,
6479,
368,
341,
286,
1077,
281,
16,
284,
24622,
486,
3215,
7,
16,
13,
15,
11,
220,
17,
13,
15,
11,
220,
18,
13,
15,
317,
286,
1077,
281,
17,
284,
24622,
486,
3215,
7,
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... | 1 |
#[test]
fn test_intersection() {
{
let left = VecDocSet::from(vec![1, 3, 9]);
let right = VecDocSet::from(vec![3, 4, 9, 18]);
let mut intersection = Intersection::new(vec![left, right]);
assert_eq!(intersection.doc(), 3);
assert_eq!(intersectio... | rust_cleaned_test_functions.jsonl/13256 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 424
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82558,
368,
341,
286,
341,
310,
1077,
2115,
284,
11312,
9550,
1649,
486,
1499,
25592,
20703,
16,
11,
220,
18,
11,
220,
24,
2558,
310,
1077,
1290,
284,
11312,
9550,
1649,
486,
1499,
25592,
20703,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pyobject_drop_with_gil_decreases_refcnt() {
let gil = Python::acquire_gil();
let py = gil.python();
let obj = get_object(py);
// Ensure that obj does not get freed
let _ref = obj.clone_ref(py);
let obj_ptr = obj.as_ptr();
unsafe {
... | rust_cleaned_test_functions.jsonl/25427 | {
"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,
40291,
1700,
29584,
6615,
1889,
321,
2259,
837,
2264,
7793,
15853,
368,
341,
286,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
286,
1077,
4510,
284,
342,
321,
43193,
543,
286,
1077... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_concurrent_non_blocking() {
let system = KompactConfig::default().build().expect("System");
let comp = system.create(AsyncComponent::new);
system
.start_notify(&comp)
.wait_timeout(TIMEOUT)
.expect("Component didn't start");
le... | rust_cleaned_test_functions.jsonl/107765 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 462
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3382,
3231,
21637,
91449,
368,
341,
286,
1077,
1849,
284,
730,
14435,
531,
2648,
486,
2258,
1005,
5834,
1005,
17119,
445,
2320,
797,
286,
1077,
1367,
284,
1849,
2520,
7,
6525,
2189,
486,
931,
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_from_config_default() {
let mut c = Config::with_none();
c.icons = Some(Icons {
when: None,
theme: None,
separator: Some(" ".to_string()),
});
let expected = Some(IconSeparator(" ".to_string()));
assert_eq!(expected, Ico... | rust_cleaned_test_functions.jsonl/17369 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 175
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
5332,
9993,
368,
341,
286,
1077,
5206,
272,
284,
5532,
486,
4197,
31488,
543,
286,
272,
78874,
284,
4329,
35066,
341,
310,
979,
25,
2240,
345,
310,
6912,
25,
2240,
345,
310,
24792,
25,
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_eval() {
let gil = Python::acquire_gil();
let py = gil.python();
// Make sure builtin names are accessible
let v: i32 = py
.eval("min(1, 2)", None, None)
.map_err(|e| e.print(py))
.unwrap()
.extract()
.u... | rust_cleaned_test_functions.jsonl/1053 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 598
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
368,
341,
286,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
286,
1077,
4510,
284,
342,
321,
43193,
1428,
286,
442,
7405,
2704,
59626,
5036,
525,
15614,
198,
286,
1077,
348,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_channel_data_equal() -> Result<()> {
let tests = vec![
(
"equal",
ChannelData {
number: ChannelNumber(MIN_CHANNEL_NUMBER),
data: vec![1, 2, 3],
..Default::default()
},
ChannelData {
... | rust_cleaned_test_functions.jsonl/76712 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1160
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14571,
1769,
11478,
368,
1464,
5714,
71698,
341,
262,
1077,
7032,
284,
7486,
90515,
286,
2399,
310,
330,
25795,
756,
310,
13434,
1043,
341,
394,
1372,
25,
13434,
2833,
3189,
687,
23688,
19364,
132... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_number_ud() {
let mut p = Lexer::<DefaultContext>::new(b"12_km 12.34_km");
assert_eq!(
p.next().tok,
Token::LiteralIntUD(Box::new((12, "_km".to_string())))
);
assert_eq!(
p.next().tok,
Token::LiteralFloatUD(Box::new(... | rust_cleaned_test_functions.jsonl/35689 | {
"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,
5500,
71939,
368,
341,
286,
1077,
5206,
281,
284,
85082,
27638,
3675,
1972,
6831,
931,
1883,
1,
16,
17,
88680,
220,
16,
17,
13,
18,
19,
88680,
797,
286,
2060,
10714,
33673,
310,
281,
4529,
100... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_metrics_report_update_check_failure_reason_omaha() {
block_on(async {
let config = config_generator();
let mut state_machine = StateMachine::new(
StubPolicyEngine,
StubHttpRequest,
StubInstaller::default(),
... | rust_cleaned_test_functions.jsonl/94227 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 443
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37686,
14813,
8882,
7200,
43618,
38229,
62,
316,
13546,
368,
341,
286,
2504,
4470,
18285,
341,
310,
1077,
2193,
284,
2193,
25813,
543,
310,
1077,
5206,
1584,
38695,
284,
3234,
21605,
486,
931,
100... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_proof() {
let mock_store = MockAccumulatorStore::new();
let accumulator = MerkleAccumulator::new(
*ACCUMULATOR_PLACEHOLDER_HASH,
vec![],
0,
0,
Arc::new(mock_store),
);
let batch1 = create_leaves(500..600);
let root_hash1 = accumulator.a... | rust_cleaned_test_functions.jsonl/51491 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 204
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86757,
368,
341,
262,
1077,
7860,
14809,
284,
14563,
14603,
372,
10511,
6093,
486,
931,
543,
262,
1077,
56312,
284,
8755,
23089,
14603,
372,
10511,
486,
931,
1006,
286,
353,
29442,
2794,
71680,
81... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_eval_swap2() {
let mut s = Stack::new();
s.push(Elt::Bool(false)).unwrap();
let res = s.eval(Op::Swap);
assert!(res.is_err());
if let Err(Error::Underflow) = res {
} else {
assert!(false);
}
} | rust_cleaned_test_functions.jsonl/34525 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 159
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
40991,
17,
368,
341,
286,
1077,
5206,
274,
284,
14284,
486,
931,
543,
286,
274,
2552,
10722,
4832,
486,
11233,
3576,
4579,
15454,
1428,
286,
1077,
592,
284,
274,
31710,
54494,
486,
46179,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_linear() {
let v = randge_linear(5..15, 5, thread_rng());
let v: Vec<_> = v.collect();
println!("{:?}", v);
} | rust_cleaned_test_functions.jsonl/88284 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 86
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40674,
368,
341,
286,
1077,
348,
284,
10382,
709,
40674,
7,
20,
496,
16,
20,
11,
220,
20,
11,
4516,
66849,
1423,
286,
1077,
348,
25,
11312,
32399,
29,
284,
348,
29124,
543,
286,
13751,
88928,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_derivation() {
let mut keyset = KeySet::new(TestKey::default(), Default::default());
keyset.rotate_phase();
keyset.derive_and_store_next_key();
keyset.rotate_phase();
assert_eq!(keyset.active_key().key().derivations, 2);
} | rust_cleaned_test_functions.jsonl/61047 | {
"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,
3097,
35345,
39127,
368,
341,
286,
1077,
5206,
1376,
746,
284,
5309,
1649,
486,
931,
31159,
1592,
486,
2258,
1507,
7899,
486,
2258,
5231,
286,
1376,
746,
35944,
37593,
543,
286,
1376,
746,
75819,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_raw_varint32() {
test_write("96 01", |os| os.write_raw_varint32(150));
test_write("ff ff ff ff 0f", |os| os.write_raw_varint32(0xffffffff));
} | rust_cleaned_test_functions.jsonl/104514 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 99
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7645,
12673,
9165,
16067,
4612,
396,
18,
17,
368,
341,
286,
1273,
9165,
445,
24,
21,
220,
15,
16,
497,
760,
436,
91,
2643,
3836,
16067,
4612,
396,
18,
17,
7,
16,
20,
15,
1106,
286,
1273,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_remove() {
let mut tester = RingBuf::with_capacity(15);
// this test isn't covering what it wants to
let cap = tester.capacity();
// len is the length *after* removal
for len in range(0, cap - 1) {
... | rust_cleaned_test_functions.jsonl/39515 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 730
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
368,
341,
1789,
23459,
286,
1077,
5206,
37111,
284,
21525,
15064,
486,
4197,
35603,
7,
16,
20,
317,
16885,
286,
442,
419,
1273,
4436,
944,
18202,
1128,
432,
6801,
311,
198,
286,
1077,
206... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_from_config_size() {
let yaml_string = "sorting:\n column: size";
let yaml = YamlLoader::load_from_str(yaml_string).unwrap()[0].clone();
assert_eq!(
Some(SortColumn::Size),
SortColumn::from_config(&Config::with_yaml(yaml))
);
} | rust_cleaned_test_functions.jsonl/54302 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
5332,
2368,
368,
341,
286,
1077,
32246,
3904,
284,
330,
67039,
7190,
77,
220,
3250,
25,
1379,
876,
286,
1077,
32246,
284,
809,
9467,
9181,
486,
1078,
5673,
2895,
7021,
9467,
3904,
568,
154... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_div() {
assert_eq!(_neg1_1i / _0_1i, _1_1i);
for &c in all_consts.iter() {
if c != Zero::zero() {
assert_eq!(c / c, _1_0i);
}
}
} | rust_cleaned_test_functions.jsonl/108416 | {
"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,
16237,
368,
341,
310,
2060,
10714,
0,
2490,
28775,
16,
62,
16,
72,
608,
716,
15,
62,
16,
72,
11,
716,
16,
62,
16,
72,
317,
310,
369,
609,
66,
304,
678,
48530,
19471,
368,
341,
394,
421,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bench_tps_bank_client() {
let (genesis_block, id) = create_genesis_block(10_000);
let bank = Bank::new(&genesis_block);
let clients = vec![BankClient::new(bank)];
let mut config = Config::default();
config.id = id;
config.tx_count = 10;
co... | rust_cleaned_test_functions.jsonl/1527 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 259
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
19762,
528,
1690,
35733,
8179,
368,
341,
286,
1077,
320,
77894,
7113,
11,
877,
8,
284,
1855,
16322,
13774,
7113,
7,
16,
15,
62,
15,
15,
15,
317,
286,
1077,
6073,
284,
8547,
486,
931,
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_union_type_matches() {
let polar = Polar::new();
polar
.register_constant(sym!("User"), term!("unimportant"))
.unwrap();
polar.load_str("actor User {}").unwrap();
let query = polar.new_query(
&format!("{} matches {}", A... | rust_cleaned_test_functions.jsonl/31753 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 554
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51621,
1819,
38344,
368,
341,
1789,
286,
1077,
24660,
284,
55896,
486,
931,
543,
286,
24660,
198,
310,
659,
6343,
34967,
62512,
17223,
1474,
3975,
4647,
17223,
359,
15333,
5455,
310,
659,
15454,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_call_member3() {
let mut vm = VirtualMachine::new();
vm.add_class(Class::new(
"Point".to_owned(),
vec![
Field::new("x".to_owned(), TypeId::Int32),
Field::new("y".to_owned(), TypeId::Int32),
]
));
vm.add_function(Function::new(
... | rust_cleaned_test_functions.jsonl/17402 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 523
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13429,
19388,
18,
368,
341,
262,
1077,
5206,
10995,
284,
20721,
21605,
486,
931,
1428,
262,
10995,
1364,
4790,
31368,
486,
931,
1006,
286,
330,
2609,
3263,
983,
51973,
3148,
286,
7486,
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... | 1 |
#[test]
fn test_add_location_valid() {
let properties = vec![
PropertyValueBuilder::new()
.with_name("locationName".into())
.with_data_type(DataType::String)
.with_string_value("Taco Alley".into())
.build()
.unwr... | rust_cleaned_test_functions.jsonl/20000 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 613
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
13126,
8337,
368,
341,
286,
1077,
5888,
284,
7486,
90515,
310,
94338,
3297,
486,
931,
741,
394,
659,
4197,
1269,
445,
2527,
675,
3263,
18122,
2398,
394,
659,
4197,
1769,
1819,
63941,
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_rng_32_seeded() {
let seed = &[1, 23, 456, 7890, 12345];
let mut ra: IsaacRng = SeedableRng::from_seed(seed);
let mut rb: IsaacRng = SeedableRng::from_seed(seed);
assert_eq!(ra.gen_ascii_str(100u), rb.gen_ascii_str(100u));
} | rust_cleaned_test_functions.jsonl/85138 | {
"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,
66849,
62,
18,
17,
3453,
29935,
368,
341,
286,
1077,
10320,
284,
44590,
16,
11,
220,
17,
18,
11,
220,
19,
20,
21,
11,
220,
22,
23,
24,
15,
11,
220,
16,
17,
18,
19,
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_wire_size_vec() {
let v1: Vec<u32> = vec![1, 2, 3, 4];
assert_eq!(v1.wire_size(), 4 * 5);
let v2: Vec<u64> = vec![1, 2, 3, 4];
assert_eq!(v2.wire_size(), (8 * 4) + 4);
} | rust_cleaned_test_functions.jsonl/38921 | {
"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,
75206,
2368,
13251,
368,
341,
310,
1077,
348,
16,
25,
11312,
34837,
18,
17,
29,
284,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
935,
310,
2060,
10714,
10297,
85,
16,
1418,
554,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_literal_long_overflow() {
err(
"fun f() { let x = 9223372036854775808L; }",
pos(1, 19),
Msg::NumberOverflow("long".into()),
);
ok("fun f() { let x = 9223372036854775807L; }");
err(
"fun f() { let x = -922337203685477... | rust_cleaned_test_functions.jsonl/106625 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 278
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34100,
17799,
79073,
368,
341,
286,
1848,
1006,
310,
330,
11894,
282,
368,
314,
1077,
856,
284,
220,
24,
17,
17,
18,
18,
22,
17,
15,
18,
21,
23,
20,
19,
22,
22,
20,
23,
15,
23,
43,
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_convert_qualified_option_statement() {
let b = ast::BaseNode::default();
let pkg = ast::Package {
base: b.clone(),
path: "path".to_string(),
package: "main".to_string(),
files: vec![ast::File {
base: b.clone(),
... | rust_cleaned_test_functions.jsonl/30445 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1926
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
62,
36335,
9672,
37404,
368,
341,
286,
1077,
293,
284,
11763,
486,
3978,
1955,
486,
2258,
543,
286,
1077,
24793,
284,
11763,
486,
13100,
341,
310,
2331,
25,
293,
15997,
3148,
310,
1815,
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_thread_info() {
assert_eq!(
query(&b"qThreadExtraInfo,ffff"[..]),
Done(
&b""[..],
Query::ThreadInfo(ThreadId {
pid: Id::Id(65535),
tid: Id::Any
})
)
);
} | rust_cleaned_test_functions.jsonl/40119 | {
"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,
10814,
3109,
368,
341,
262,
2060,
10714,
33673,
286,
3239,
2099,
65,
1,
80,
6855,
11612,
1731,
11,
7238,
36864,
496,
17036,
286,
27357,
1006,
310,
609,
65,
3014,
95874,
1259,
310,
11361,
486,
68... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tuple_struct() {
#[derive(Debug, PartialEq, Valuable, Serialize)]
struct S1();
#[derive(Debug, PartialEq, Valuable, Serialize)]
struct S2(i8, u8);
assert_ser_eq!(
S1(),
&[
Token::TupleStruct { name: "S1", len: 0 },
Token::TupleStructEn... | rust_cleaned_test_functions.jsonl/44216 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 312
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21773,
15126,
368,
341,
262,
11506,
27098,
42618,
11,
55039,
11,
4104,
13128,
11,
39900,
5563,
262,
2036,
328,
16,
543,
262,
11506,
27098,
42618,
11,
55039,
11,
4104,
13128,
11,
39900,
5563,
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_sprite_evaluation_basic() {
let mut context = Context::new();
let mut sprites = Sprites::new();
// set scanline position
context.vpos = 1;
context.hpos = 65;
// init oam test in range sprites
init_oam(&mut sprites.primary_oam);
set_sprite(&mut sprites.primary_oam, 0x1, 0x1, 0);
... | rust_cleaned_test_functions.jsonl/74930 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 303
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45489,
86505,
34729,
368,
341,
197,
10217,
5206,
2266,
284,
9608,
486,
931,
543,
197,
10217,
5206,
46757,
284,
15515,
3611,
486,
931,
543,
197,
197,
322,
738,
8569,
1056,
2309,
198,
197,
28413,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_db_tables() -> common_exception::Result<()> {
// prepare test data
let mut fake_apis = FakeStoreApis::new();
fake_apis.insert_db(0, "test");
fake_apis.insert_tbl("test", TableInfo {
id: 0,
ver: 0,
name: "t1".to_string(),
schema: Arc::new(DataSc... | rust_cleaned_test_functions.jsonl/59320 | {
"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,
3062,
8685,
35632,
368,
1464,
4185,
17499,
486,
2077,
71698,
341,
262,
442,
10549,
1273,
821,
198,
262,
1077,
5206,
12418,
62,
13725,
284,
36965,
6093,
91121,
486,
931,
543,
262,
12418,
62,
13725,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_add_normal() {
let a = PrimitiveArray::from([Some(11111i128), Some(11100i128), None, Some(22200i128)])
.to(DataType::Decimal(5, 2));
let b = PrimitiveArray::from([Some(22222i128), Some(22200i128), None, Some(11100i128)])
.to(DataType::Decimal(5, 2));
... | rust_cleaned_test_functions.jsonl/6873 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 324
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
13973,
368,
341,
286,
1077,
264,
284,
51460,
1857,
486,
1499,
2561,
8373,
7,
16,
16,
16,
16,
16,
72,
16,
17,
23,
701,
4329,
7,
16,
16,
16,
15,
15,
72,
16,
17,
23,
701,
2240,
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_process_pull_request() {
let mut node_crds = Crds::default();
let entry = CrdsValue::new_unsigned(CrdsData::ContactInfo(ContactInfo::new_localhost(
&Pubkey::new_rand(),
0,
)));
let node_pubkey = entry.label().pubkey();
let node = Cr... | rust_cleaned_test_functions.jsonl/45200 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 883
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
65693,
7893,
368,
341,
286,
1077,
5206,
2436,
32331,
5356,
284,
4553,
5356,
486,
2258,
543,
286,
1077,
4343,
284,
4553,
5356,
1130,
486,
931,
67830,
3025,
81,
5356,
1043,
486,
8732,
1731,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_utf8_lossy() {
let xs = b"hello";
assert_eq!(String::from_utf8_lossy(xs), Slice("hello"));
let xs = "ศไทย中华Việt Nam".as_bytes();
assert_eq!(String::from_utf8_lossy(xs), Slice("ศไทย中华Việt Nam"));
let xs = b"Hello\xC2 There\xFF Goodbye";
asser... | rust_cleaned_test_functions.jsonl/113356 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 976
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
39453,
23,
11193,
88,
368,
341,
286,
1077,
11943,
284,
293,
1,
14990,
876,
286,
2060,
10714,
10297,
703,
486,
1499,
39453,
23,
11193,
88,
53322,
701,
56476,
445,
14990,
14929,
286,
1077,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hash_calculation_invalid_file() -> io::Result<()> {
let dir = tempfile::Builder::new().tempdir()?;
let mut buf = [0u8; 1 << 10];
let src = dir.path().join("a");
let e = FileEntry { path: src, ..Default::default() };
let r = hash_calculation(&mut buf, &e, &... | rust_cleaned_test_functions.jsonl/112503 | {
"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,
8950,
38241,
2914,
31433,
2458,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_buffering_mode_from_str() {
assert_eq!(buffering_mode_from_str("o"), Ok(BufferingMode::Oneshot));
assert_eq!(buffering_mode_from_str("oneshot"), Ok(BufferingMode::Oneshot));
assert_eq!(buffering_mode_from_str("c"), Ok(BufferingMode::Circular));
assert_eq!(bufferin... | rust_cleaned_test_functions.jsonl/15127 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 232
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7776,
287,
7302,
5673,
2895,
368,
341,
286,
2060,
10714,
10297,
7573,
287,
7302,
5673,
2895,
445,
78,
3975,
7622,
55574,
287,
3636,
486,
1925,
4288,
354,
1106,
286,
2060,
10714,
10297,
7573,
287,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_extensions2() {
use der_parser::oid;
let crt = crate::parse_x509_der(include_bytes!("../assets/extension2.der"))
.unwrap()
.1;
let tbs = crt.tbs_certificate;
assert_eq!(
tbs.policy_constraints().unwrap().1,
&PolicyConstraints {
require_... | rust_cleaned_test_functions.jsonl/53334 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 392
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60498,
17,
368,
341,
262,
990,
2694,
18517,
486,
588,
280,
262,
1077,
97967,
284,
17717,
486,
6400,
3212,
20,
15,
24,
35345,
77863,
12524,
17223,
1244,
5160,
14,
12427,
17,
75819,
5455,
286,
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_compile_literal() {
let text = "Test String";
let instructions = compile(text).unwrap();
assert_eq!(1, instructions.len());
assert_eq!(&Literal(text), &instructions[0]);
} | rust_cleaned_test_functions.jsonl/18166 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 109
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74170,
34100,
368,
972,
286,
1077,
1467,
284,
330,
2271,
923,
3534,
286,
1077,
11221,
284,
19192,
7235,
568,
15454,
1647,
286,
2060,
10714,
10297,
16,
11,
11221,
19406,
6201,
286,
2060,
10714,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_completion_with_ref() {
let fixture = r#"
struct Foo;
fn foo(arg: &Foo) {}
fn main() {
let arg = Foo;
foo($0)
}"#;
let (offset, text) = test_utils::extract_offset(fixture);
let line_index = LineIndex {
i... | rust_cleaned_test_functions.jsonl/70338 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1201
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60164,
6615,
7793,
368,
341,
286,
1077,
12507,
284,
435,
2,
698,
286,
2036,
33428,
280,
286,
5168,
15229,
9404,
25,
609,
40923,
8,
5613,
286,
5168,
1887,
368,
341,
310,
1077,
1392,
284,
33428,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_set_scalar() {
let mut c = Config::default();
c.set("value", true).unwrap();
assert_eq!(c.get("value").ok(), Some(true));
} | rust_cleaned_test_functions.jsonl/96883 | {
"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,
2602,
41652,
368,
341,
262,
1077,
5206,
272,
284,
5532,
486,
2258,
1428,
262,
272,
980,
445,
957,
497,
830,
568,
15454,
1428,
262,
2060,
10714,
10297,
66,
670,
445,
957,
1827,
562,
1507,
4329,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_while_expr() {
let tests = vec![
("let i = 1; while (i < 3) { let i = i + 1 }; i;", Some(Object::Int(3))),
("赋能 i = 1; 闭环 (i < 3) { 赋能 i = i + 1 }; i;", Some(Object::Int(3))),
("闭环 (4 < 3) { 3 };", None),
("赋能 i = 1; 闭环 (i < 3) { 赋能 i = i+1... | rust_cleaned_test_functions.jsonl/12297 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 284
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86069,
21915,
368,
341,
286,
1077,
7032,
284,
7486,
90515,
310,
3489,
1149,
600,
284,
220,
16,
26,
1393,
320,
72,
366,
220,
18,
8,
314,
1077,
600,
284,
600,
488,
220,
16,
20066,
600,
32503,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_is_normal() {
assert!(!Float::NaN::<f32>().is_normal());
assert!(!Float::infinity::<f32>().is_normal());
assert!(!Float::neg_infinity::<f32>().is_normal());
assert!(!Zero::zero::<f32>().is_normal());
assert!(!Float::neg_zero::<f32>().is_normal());
... | rust_cleaned_test_functions.jsonl/101568 | {
"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,
6892,
13973,
368,
341,
286,
2060,
0,
3471,
5442,
486,
22831,
27638,
69,
18,
17,
10483,
285,
13973,
1423,
286,
2060,
0,
3471,
5442,
486,
80016,
27638,
69,
18,
17,
10483,
285,
13973,
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_levelfilter_from_str() {
let tests = [
("off", Ok(LevelFilter::Off)),
("error", Ok(LevelFilter::Error)),
("warn", Ok(LevelFilter::Warn)),
("info", Ok(LevelFilter::Info)),
("debug", Ok(LevelFilter::Debug)),
("trace", ... | rust_cleaned_test_functions.jsonl/71726 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 396
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
3449,
490,
2044,
5673,
2895,
368,
341,
286,
1077,
7032,
284,
2278,
310,
3489,
1847,
497,
7622,
30263,
5632,
486,
4596,
6965,
310,
3489,
841,
497,
7622,
30263,
5632,
486,
1454,
6965,
310,
348... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_release_ignore_panic() {
let p = project()
.file(
"Cargo.toml",
r#"
[package]
name = "foo"
version = "0.0.1"
authors = []
[dependencies]
a = { path = "a" }
[profile.test]
... | rust_cleaned_test_functions.jsonl/95368 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 455
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24577,
58493,
620,
31270,
368,
341,
262,
1077,
281,
284,
2390,
741,
286,
659,
1192,
1006,
310,
330,
98228,
73494,
75,
756,
310,
435,
2,
698,
310,
508,
1722,
921,
310,
829,
284,
330,
7975,
698,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_len() {
let field = BooleanBitfield::from_bytes(INPUT);
assert_eq!(field.len(), 16);
let field = BooleanBitfield::new();
assert_eq!(field.len(), 8);
} | rust_cleaned_test_functions.jsonl/30472 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 99
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6043,
368,
341,
286,
1077,
2070,
284,
6992,
8344,
2566,
486,
1499,
12524,
57911,
317,
286,
2060,
10714,
10297,
2566,
19406,
1507,
220,
16,
21,
626,
286,
1077,
2070,
284,
6992,
8344,
2566,
486,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_default_resource() {
let app = App::new()
.scope("/app", |scope| {
scope
.resource("/path1", |r| r.f(|_| HttpResponse::Ok()))
.default_resource(|r| r.f(|_| HttpResponse::BadRequest()))
})
.finish(... | rust_cleaned_test_functions.jsonl/22455 | {
"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,
9993,
17962,
368,
341,
286,
1077,
906,
284,
1845,
486,
931,
741,
310,
659,
4186,
4283,
676,
497,
760,
4186,
91,
341,
394,
6891,
198,
503,
659,
9233,
4283,
2343,
16,
497,
760,
81,
91,
435,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_case_1() {
let key = [0u8; 32];
let message = [0u8; 64];
let expected = [0u8; 16];
poly1305_test_runner(&key, &message, &expected).unwrap();
} | rust_cleaned_test_functions.jsonl/27916 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 83
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19096,
62,
16,
368,
341,
197,
10217,
1376,
284,
508,
15,
84,
23,
26,
220,
18,
17,
935,
197,
10217,
1943,
284,
508,
15,
84,
23,
26,
220,
21,
19,
935,
197,
10217,
3601,
284,
508,
15,
84,
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_split_comment_words_basic() {
let content = "abc";
let pos = SingleLineSpan {
line: 0.into(),
start_col: 0,
end_col: 3,
};
let opposite_content = "def";
let opposite_pos = SingleLineSpan {
line: 0.into(),
... | rust_cleaned_test_functions.jsonl/21421 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 459
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
17638,
18981,
34729,
368,
341,
286,
1077,
2213,
284,
330,
13683,
876,
286,
1077,
1133,
284,
11327,
2460,
12485,
341,
310,
1555,
25,
220,
15,
39860,
3148,
310,
1191,
10211,
25,
220,
15,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_execute_tokenomics_successfully() {
let funds = Coin::new(100_000_000, "udesmos");
let info = mock_info("addr0001", &[]);
let custom = mock_dependencies_with_custom_querier(&[funds]);
let (instance_options, memory_limit) = mock_instance_options();
let mut deps = Instance::fr... | rust_cleaned_test_functions.jsonl/67197 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 430
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44329,
6458,
23320,
18632,
3641,
368,
341,
262,
1077,
10514,
284,
26233,
486,
931,
7,
16,
15,
15,
62,
15,
15,
15,
62,
15,
15,
15,
11,
330,
28146,
8631,
797,
262,
1077,
3546,
284,
7860,
3109,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_thread_wakes_after_no_work() {
init_test_log();
let system = ActorSystem::create(ActorSystemConfig::default().thread_pool_size(1));
let aid = system.spawn().with((), simple_handler).unwrap();
// Sleep for a little longer than the condvar's default timeout
... | rust_cleaned_test_functions.jsonl/25335 | {
"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,
10814,
1670,
2050,
19844,
6536,
11498,
368,
341,
286,
2930,
4452,
5224,
1428,
286,
1077,
1849,
284,
24718,
2320,
486,
3182,
7,
18870,
2320,
2648,
486,
2258,
1005,
4528,
15709,
2368,
7,
16,
1106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_from_latest_snapshot_archives() {
solana_logger::setup();
let collector = Pubkey::new_unique();
let key1 = Keypair::new();
let key2 = Keypair::new();
let key3 = Keypair::new();
let (genesis_config, mint_keypair) = create_genesis_config(1_000_... | rust_cleaned_test_functions.jsonl/67617 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1700
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35733,
5673,
64880,
53265,
34330,
1886,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
31953,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
1376,
16,
284,
6569,
1082,
1310,
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... | 6 |
#[test]
fn test_move_up_down_until_depth_change_line_mode() {
let fj = parse_top_level_json(OBJECT.to_owned()).unwrap();
let mut viewer = JsonViewer::new(fj, Mode::Line);
assert_movements(
&mut viewer,
vec![
(Action::MoveDownUntilDepthChange, 1),
... | rust_cleaned_test_functions.jsonl/41764 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 645
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17134,
8237,
13998,
44352,
19061,
15947,
6528,
7302,
368,
341,
286,
1077,
75371,
284,
4715,
10426,
8274,
9455,
19238,
10467,
2389,
51973,
6011,
15454,
543,
286,
1077,
5206,
25708,
284,
8308,
28271,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_unknown_script() {
let vm_validator = TestValidator::new();
let address = account_config::testnet_dd_account_address();
let transaction = transaction_test_helpers::get_test_signed_txn(
address,
1,
&vm_genesis::GENESIS_KEYPAIR.0,
vm_genesis::G... | rust_cleaned_test_functions.jsonl/35407 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 298
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
57507,
14660,
368,
341,
262,
1077,
10995,
64959,
284,
3393,
14256,
486,
931,
1428,
262,
1077,
2621,
284,
2692,
5332,
486,
1944,
4711,
43174,
13500,
6744,
543,
262,
1077,
7745,
284,
7745,
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_code_module_builder_referenced() {
let modules = vec![
create_object_info(true, 0x1000, Some(0x1000)),
create_object_info(false, 0x3000, Some(0x1000)),
];
let mut builder = ModuleListBuilder {
inner: modules.iter().map(|m| (m.clone(), ... | rust_cleaned_test_functions.jsonl/12571 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 223
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4136,
10750,
28532,
73386,
5767,
368,
341,
286,
1077,
13454,
284,
7486,
90515,
310,
1855,
5314,
3109,
3715,
11,
220,
15,
87,
16,
15,
15,
15,
11,
4329,
7,
15,
87,
16,
15,
15,
15,
6965,
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_item_bag() {
let mut b = ItemBag::new();
b.add("red towel");
b.add("hamster");
//copy contents as strings to test against sorted list
let mut c_as_s = b.contents_as_strings();
c_as_s.sort();
assert_eq!(b.count("red towel"),1);
asser... | rust_cleaned_test_functions.jsonl/108271 | {
"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,
5634,
74368,
368,
341,
286,
1077,
5206,
293,
284,
5739,
12933,
486,
931,
543,
286,
293,
1364,
445,
1151,
42613,
797,
286,
293,
1364,
445,
94265,
797,
286,
442,
8560,
8794,
438,
9069,
311,
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_variants() {
serde_test::assert_tokens(&CloseCode::UnknownError, &[Token::U16(4000)]);
serde_test::assert_tokens(&CloseCode::UnknownOpcode, &[Token::U16(4001)]);
serde_test::assert_tokens(&CloseCode::DecodeError, &[Token::U16(4002)]);
serde_test::assert_tokens(&Cl... | rust_cleaned_test_functions.jsonl/4566 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 542
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4612,
62278,
368,
341,
286,
61570,
4452,
486,
2207,
28838,
2099,
7925,
2078,
486,
13790,
1454,
11,
44590,
3323,
486,
52,
16,
21,
7,
19,
15,
15,
15,
41958,
286,
61570,
4452,
486,
2207,
28838,
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_decrement_by_example_0() {
let mut h = Histogram::new();
h.increment_by(1, 1).unwrap();
h.increment_by(2, 2).unwrap();
h.decrement_by(1, 1).unwrap();
assert_eq!(h.get(2).unwrap(), 2);
assert_eq!(h.get(1).unwrap(), 0);
} | rust_cleaned_test_functions.jsonl/82149 | {
"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,
2259,
13477,
3710,
39304,
62,
15,
368,
341,
286,
1077,
5206,
305,
284,
82138,
486,
931,
1428,
286,
305,
56936,
3710,
7,
16,
11,
220,
16,
568,
15454,
543,
286,
305,
56936,
3710,
7,
17,
11,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_some_args() {
#[rustfmt::skip]
let oup = exec_target(
TARGET_EXE_PATH,
&["-a", "--connect-timeout", "50", "--ftp-pasv", "--http2",
"--max-time", "100", "--no-alpn", "-N",
"--socks5-gssapi-service", "name1", "-y", "1000", "--sslv3",
"htt... | rust_cleaned_test_functions.jsonl/97090 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 246
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
61855,
8384,
368,
341,
262,
11506,
35788,
12501,
486,
20599,
921,
262,
1077,
5908,
79,
284,
3883,
11123,
1006,
286,
41033,
4966,
36,
7944,
345,
286,
609,
1183,
12,
64,
497,
14482,
6459,
7246,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nested_each_with_parent() {
let json_str = r#"{"a": [{"b": [{"d": 100}], "c": 200}]}"#;
let data = Json::from_str(json_str).unwrap();
let mut handlebars = Registry::new();
assert!(handlebars
.register_template_string(
"t0",
... | rust_cleaned_test_functions.jsonl/127934 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 289
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66279,
32046,
6615,
15960,
368,
341,
286,
1077,
2951,
2895,
284,
435,
55543,
4913,
64,
788,
61753,
65,
788,
61753,
67,
788,
220,
16,
15,
15,
72441,
330,
66,
788,
220,
17,
15,
15,
25439,
9863,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_schnorr_sign_verify() {
let gen = Generator::new();
let (privkey, pubkey) = gen.random_keypair().unwrap();
let message = Message::default();
let signature = privkey.sign_schnorr(&message).unwrap();
assert!(pubkey.verify_schnorr(&message, &signature).is_ok(... | rust_cleaned_test_functions.jsonl/100078 | {
"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,
643,
2125,
17391,
11172,
35638,
368,
341,
286,
1077,
4081,
284,
28358,
486,
931,
543,
286,
1077,
320,
11887,
792,
11,
95116,
8,
284,
4081,
7829,
3097,
12670,
1005,
15454,
543,
286,
1077,
1943,
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_benchmarks() {
new_test_ext().execute_with(|| {
assert_ok!(test_benchmark_claim::<Test>());
assert_ok!(test_benchmark_transfer::<Test>());
assert_ok!(test_benchmark_free::<Test>());
assert_ok!(test_benchmark_force_transfer::<Test>());
assert_ok!(test_benchmark_freeze::<Test>());... | rust_cleaned_test_functions.jsonl/88736 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 143
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
19762,
15544,
368,
341,
197,
8638,
4452,
9927,
1005,
10257,
6615,
79453,
341,
298,
6948,
19817,
10297,
1944,
880,
39381,
84969,
27638,
2271,
32872,
298,
6948,
19817,
10297,
1944,
880,
39381,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_create_wallet_request_successful_serialization() {
let req = CreateWalletRequest {
master_derivation_key: MasterDerivationKey([0; 32]),
wallet_driver_name: "sqlite".into(),
wallet_name: "testwallet".into(),
wallet_password: "testpassword".i... | rust_cleaned_test_functions.jsonl/94809 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 211
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
62308,
7893,
92951,
25602,
2022,
368,
341,
286,
1077,
4232,
284,
4230,
38259,
1900,
341,
310,
7341,
35345,
39127,
3097,
25,
10824,
22171,
39127,
1592,
2561,
15,
26,
220,
18,
17,
17036,
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_temporary_views() -> Result<(), Box<dyn Error>> {
ore::test::init_logging();
let (server, mut client_a) = util::start_server(util::Config::default())?;
let mut client_b = server.connect()?;
client_a
.batch_execute("CREATE VIEW v AS VALUES (1, 'foo'), (2, 'bar'), (3, 'foo... | rust_cleaned_test_functions.jsonl/26338 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 459
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11771,
7592,
39498,
368,
1464,
5714,
68843,
8261,
92846,
4600,
2452,
341,
262,
16144,
486,
1944,
486,
2327,
59982,
1428,
262,
1077,
320,
4030,
11,
5206,
2943,
4306,
8,
284,
4094,
486,
2468,
12015,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 9 |
#[test]
fn test_get_set_mpstate() {
let hv = hypervisor::new().unwrap();
let vm = hv.create_vm().unwrap();
let vcpu = vm.create_vcpu(0, None).unwrap();
let mut kvi: kvm_vcpu_init = kvm_vcpu_init::default();
vm.get_preferred_target(&mut kvi).unwrap();
let res = vc... | rust_cleaned_test_functions.jsonl/38432 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 216
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
2602,
39898,
2454,
368,
341,
286,
1077,
22747,
284,
9751,
31396,
486,
931,
1005,
15454,
543,
286,
1077,
10995,
284,
22747,
2520,
39008,
1005,
15454,
543,
286,
1077,
348,
16475,
284,
10995,
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_extract_config_data_reads_first_value_when_given_an_array_for_service_url_mapping() {
let mock_reader = Box::new(MockPackageReader::new());
// Create 2 service map definitions that map different services
mock_reader.append_service_pkg_def(create_svc_pkg_def(
v... | rust_cleaned_test_functions.jsonl/19458 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 836
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
5332,
1769,
66628,
12978,
3142,
47636,
57653,
12008,
3858,
5478,
12267,
2903,
26930,
368,
341,
286,
1077,
7860,
22306,
284,
8261,
486,
931,
66436,
13100,
5062,
486,
931,
1423,
286,
442,
4230,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rescue_backward() {
let warrior = warrior_at_level(6);
warrior.rescue_toward(Direction::Backward);
assert_eq!(warrior.action(), Some(Action::Rescue(Direction::Backward)));
} | rust_cleaned_test_functions.jsonl/72722 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 85
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4918,
31724,
70477,
368,
341,
262,
1077,
37390,
284,
37390,
3752,
8274,
7,
21,
317,
262,
37390,
4705,
31724,
528,
81971,
81740,
486,
3707,
1606,
317,
262,
2060,
10714,
10297,
11455,
3254,
12395,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_invalid_signature() {
let corrupted_jwt_str = TEST_JWT
.to_string()
.chars()
.take(TEST_JWT.len() - 1)
.collect::<String>()
+ "f";
let jwt: JsonWebToken<
CoreJweContentEncryptionAlgorithm,
CoreJws... | rust_cleaned_test_functions.jsonl/66762 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 545
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
39859,
368,
341,
286,
1077,
49400,
95576,
2895,
284,
13602,
10598,
18454,
198,
310,
659,
983,
3904,
741,
310,
659,
19255,
741,
310,
659,
22769,
50320,
10598,
18454,
19406,
368,
481,
220,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_value_parse() {
let geo_query_strict = r#"{"type": "geo", "value": {"lon": 1.0, "lat": 1.0}}"#;
let val_geo_query_strict: serde_json::value::Value =
serde_json::from_str(geo_query_strict).unwrap();
let payload_interface_geo_query: PayloadInterface =
... | rust_cleaned_test_functions.jsonl/95102 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2836
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3142,
21039,
368,
341,
286,
1077,
27581,
5738,
2895,
849,
284,
435,
55543,
4913,
1313,
788,
330,
13052,
497,
330,
957,
788,
5212,
12212,
788,
220,
16,
13,
15,
11,
330,
5524,
788,
220,
16,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_simple_1() {
let src_data = b"(test)";
let expected_document = yass_document!(("test"));
let expected_positions = pos_array![];
let (result_doc, pos_map) = yass_parser::parse(yass_parser::ParserLimits::unlimited(), src_data).unwrap();
assert_eq!(result_doc, expected_document)... | rust_cleaned_test_functions.jsonl/126480 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 160
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
62,
16,
368,
341,
262,
1077,
2286,
1769,
284,
293,
29209,
1944,
24023,
262,
1077,
3601,
26231,
284,
379,
395,
26231,
10297,
445,
1944,
4010,
262,
1077,
3601,
37219,
284,
1133,
3858,
0,
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_keys_empty_match() {
let input = "a a a a
aaaa
";
new_ucmd!()
.args(&["-k", "1,1", "-t", "a"])
.pipe_in(input)
.succeeds()
.stdout_only(input);
} | rust_cleaned_test_functions.jsonl/20514 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 121
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12631,
15124,
10708,
368,
341,
262,
1077,
1946,
284,
330,
64,
264,
264,
264,
198,
28458,
198,
876,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
12,
74,
497,
330,
16,
11,
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_keysend_payments_to_public_node() {
let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
let _chan = create_announced... | rust_cleaned_test_functions.jsonl/16965 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 527
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3097,
6681,
91257,
2346,
27074,
5084,
368,
341,
10217,
26023,
1645,
18343,
82,
284,
1855,
45552,
1645,
18343,
82,
7,
17,
317,
10217,
2436,
18343,
82,
284,
1855,
5084,
18343,
82,
7,
17,
11,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.