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_scalar_struct() {
let field_a = Field::new("A", DataType::Int32, false);
let field_b = Field::new("B", DataType::Boolean, false);
let field_c = Field::new("C", DataType::Utf8, false);
let field_e = Field::new("e", DataType::Int16, false);
let field_f = Fi... | rust_cleaned_test_functions.jsonl/48127 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3619
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41652,
15126,
368,
341,
286,
1077,
2070,
4306,
284,
8601,
486,
931,
445,
32,
497,
33172,
486,
1072,
18,
17,
11,
895,
317,
286,
1077,
2070,
880,
284,
8601,
486,
931,
445,
33,
497,
33172,
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_vector_1() {
// hash of empty string
let x = [];
let h_expected = [0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14,
0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24,
0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c,
0xa4, 0... | rust_cleaned_test_functions.jsonl/55636 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 275
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12247,
62,
16,
368,
341,
262,
442,
5175,
315,
4287,
914,
198,
262,
1077,
856,
284,
5907,
262,
1077,
305,
32190,
284,
508,
15,
8371,
18,
11,
220,
15,
7929,
15,
11,
220,
15,
8148,
19,
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_create_key_set_values_and_serialize() {
let _setup = SetupMocks::init();
let to_did = "8XFh8yBzrpJQmNyZzgoTqB";
let my_vk = "C73MRnns4qUjR5N4LRwTyiXVPKPrA5q4LCT8PZzxVdt9";
let bytes = CreateKeyBuilder::create()
.for_did(&to_did).unwrap()
... | rust_cleaned_test_functions.jsonl/90059 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 249
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
3097,
2602,
9146,
8378,
88686,
368,
314,
1572,
286,
1077,
716,
15188,
284,
18626,
72577,
486,
2327,
543,
286,
1077,
311,
814,
307,
284,
330,
23,
66138,
71,
23,
88,
33,
89,
22252,
41,
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_group_locks_by_regions() {
fn lock(key: &[u8], deleted: bool) -> (Key, (PessimisticLock, bool)) {
(
Key::from_raw(key),
(
PessimisticLock {
primary: key.to_vec().into_boxed_slice(),
... | rust_cleaned_test_functions.jsonl/127370 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1207
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6288,
9818,
82,
3710,
58035,
368,
341,
286,
5168,
5296,
4857,
25,
44590,
84,
23,
1125,
11062,
25,
1807,
8,
1464,
320,
1592,
11,
320,
47,
66733,
4532,
11989,
11,
1807,
593,
341,
310,
2399,
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_lex_float() {
let tokens = Lexer::new().lex("1.0 123.5 1003.125").unwrap();
assert_eq!(tokens,
vec![Token::Float(1.0), Token::Float(123.5), Token::Float(1003.125)]);
} | rust_cleaned_test_functions.jsonl/33563 | {
"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,
74547,
17586,
368,
341,
286,
1077,
11211,
284,
85082,
486,
931,
1005,
2571,
445,
16,
13,
15,
220,
16,
17,
18,
13,
20,
220,
16,
15,
15,
18,
13,
16,
17,
20,
1827,
15454,
543,
286,
2060,
1071... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_human_lose () {
use crate::lib::model::player::Human;
let mut h = Human::new();
h.bet = 1;
h.lose();
//amount bet will go to 0 with loss
assert!(h.bet == 0);
} | rust_cleaned_test_functions.jsonl/125152 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 130
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86247,
62,
1469,
1719,
341,
1789,
286,
990,
17717,
486,
2740,
486,
2528,
486,
3434,
486,
33975,
280,
286,
1077,
5206,
305,
284,
11097,
486,
931,
1428,
286,
305,
948,
295,
284,
220,
16,
280,
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_id_struct() {
make_helpers();
unsafe {
let lib = Library::new(LIBPATH).unwrap();
let f: Symbol<unsafe extern fn(S) -> S> = lib.get(b"test_identity_struct\0").unwrap();
assert_eq!(S { a: 1, b: 2, c: 3, d: 4 }, f(S { a: 1, b: 2, c: 3, d: 4 }));
}
} | rust_cleaned_test_functions.jsonl/8230 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 157
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
842,
15126,
368,
341,
262,
1281,
54473,
543,
262,
19860,
341,
286,
1077,
3051,
284,
11635,
486,
931,
4957,
3256,
13593,
568,
15454,
543,
286,
1077,
282,
25,
19612,
27,
38157,
15637,
5168,
3759,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_f32() {
//big-endian floating-point 8.1250
let buf = vec![0x41, 0x02, 0x00, 0x00];
let mut writer = Vec::new();
writer.write(buf.as_slice()).unwrap();
let mut reader = MemReader::new(writer);
let f = reader.read_be_f32().unwrap();
as... | rust_cleaned_test_functions.jsonl/39755 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 173
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
761,
18,
17,
368,
341,
286,
442,
16154,
13068,
1103,
19057,
16574,
220,
23,
13,
16,
17,
20,
15,
198,
286,
1077,
6607,
284,
7486,
20703,
15,
87,
19,
16,
11,
220,
15,
87,
15,
17,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_clear_request_count() {
let keypair = Keypair::new();
let mut faucet = Faucet::new(keypair, None, None, None);
faucet.request_current += 256;
assert_eq!(faucet.request_current, 256);
faucet.clear_request_count();
assert_eq!(faucet.request_current, ... | rust_cleaned_test_functions.jsonl/117721 | {
"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,
21811,
7893,
3180,
368,
341,
286,
1077,
1376,
12670,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
5206,
71453,
284,
96362,
295,
486,
931,
4857,
12670,
11,
2240,
11,
2240,
11,
2240,
317,
286,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_four() {
// It is completely outside the box1
let box1 = &[10, 15, 50, 40];
let box2 = &[100, 150, 50, 40];
assert_eq!(overlaps(&box1, &box2), false);
} | rust_cleaned_test_functions.jsonl/71430 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 108
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
56142,
368,
341,
286,
442,
1084,
374,
6587,
4889,
279,
3745,
16,
198,
286,
1077,
3745,
16,
284,
44590,
16,
15,
11,
220,
16,
20,
11,
220,
20,
15,
11,
220,
19,
15,
935,
286,
1077,
3745,
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_t525() {
init();
let result = t525(&t536(&*GUID));
println!("{}", result.len());
println!("{:?}", result);
} | rust_cleaned_test_functions.jsonl/104755 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 90
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
20,
17,
20,
368,
341,
286,
2930,
543,
286,
1077,
1102,
284,
259,
20,
17,
20,
2099,
83,
20,
18,
21,
2099,
9,
41778,
1106,
286,
13751,
79878,
1102,
19406,
1423,
286,
13751,
88928,
25,
526... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_mods() {
#[derive(Default)]
struct ModsLoader {
pub count: Arc<AtomicUsize>,
}
impl ModuleLoader for ModsLoader {
fn resolve(
&self,
specifier: &str,
referrer: &str,
_is_main: bool,
) -> Result<ModuleSpecifier, Error> {
s... | rust_cleaned_test_functions.jsonl/12399 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1580
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7480,
82,
368,
341,
262,
11506,
27098,
87874,
5563,
262,
2036,
85064,
9181,
341,
414,
6675,
1760,
25,
19689,
27,
65857,
52,
2141,
12520,
262,
555,
262,
11605,
13711,
9181,
369,
85064,
9181,
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_profiles_merge() {
figment::Jail::expect_with(|jail| {
jail.create_file("Rocket.toml", r#"
[default.limits]
stream = "50kb"
[global]
limits = { forms = "2kb" }
[debug.limits]
fil... | rust_cleaned_test_functions.jsonl/22117 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 713
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64021,
20888,
368,
341,
286,
4144,
478,
486,
41,
604,
486,
17119,
6615,
22428,
73,
604,
91,
341,
310,
17540,
2520,
2458,
445,
80017,
73494,
75,
497,
435,
2,
698,
394,
508,
2258,
918,
22866,
92... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_iterator_step_by_nth_back() {
let mut it = (0..16).step_by(5);
assert_eq!(it.nth_back(0), Some(15));
assert_eq!(it.nth_back(0), Some(10));
assert_eq!(it.nth_back(0), Some(5));
assert_eq!(it.nth_back(0), Some(0));
assert_eq!(it.nth_back(0), None);
let mut it = (0..16)... | rust_cleaned_test_functions.jsonl/70143 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 436
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13491,
11946,
3710,
78342,
3895,
368,
341,
262,
1077,
5206,
432,
284,
320,
15,
496,
16,
21,
568,
9520,
3710,
7,
20,
317,
262,
2060,
10714,
10297,
275,
1253,
339,
3895,
7,
15,
701,
4329,
7,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_operators() {
test_lexer! {
"+ += - -= * *= / /=",
ast::Token {
span: Span::new(0, 1),
kind: ast::Kind::Plus,
},
ast::Token {
span: Span::new(2, 4),
kind: ast::Kind::PlusEq,
... | rust_cleaned_test_functions.jsonl/57217 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 710
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25634,
2973,
368,
341,
286,
1273,
62,
38815,
0,
341,
310,
6630,
1421,
481,
5982,
353,
11404,
608,
608,
428,
345,
310,
11763,
486,
3323,
341,
394,
9390,
25,
11903,
486,
931,
7,
15,
11,
220,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_statsd_client_as_counted() {
let client: Box<dyn Counted> = Box::new(StatsdClient::from_sink("prefix", NopMetricSink));
client.count("some.counter", 5).unwrap();
} | rust_cleaned_test_functions.jsonl/48392 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 92
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15381,
67,
8179,
11898,
3180,
291,
368,
341,
286,
1077,
2943,
25,
8261,
92846,
4504,
291,
29,
284,
8261,
486,
931,
7,
16635,
67,
2959,
486,
1499,
51567,
445,
11849,
497,
451,
453,
54310,
45094,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_bitv_set_is_disjoint() {
let a = BitvSet::from_bitv(Bitv::from_bytes(&[0b10100010]));
let b = BitvSet::from_bitv(Bitv::from_bytes(&[0b01000000]));
let c = BitvSet::new();
let d = BitvSet::from_bitv(Bitv::from_bytes(&[0b00110000]));
assert!(!a.is_disjoint(... | rust_cleaned_test_functions.jsonl/119312 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 322
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13996,
85,
2602,
6892,
9932,
32850,
368,
341,
286,
1077,
264,
284,
6495,
85,
1649,
486,
1499,
13996,
85,
68653,
85,
486,
1499,
12524,
2099,
58,
15,
65,
16,
15,
16,
15,
15,
15,
16,
15,
14382,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bug_merge() -> crate::Result<()> {
let mut schema_builder = schema::Schema::builder();
let int_field = schema_builder.add_u64_field("intvals", INDEXED);
let index = Index::create_in_ram(schema_builder.build());
let mut index_writer = index.writer_for_tests().unwra... | rust_cleaned_test_functions.jsonl/941 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 488
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73232,
20888,
368,
1464,
17717,
486,
2077,
71698,
341,
286,
1077,
5206,
10802,
28532,
284,
10802,
486,
8632,
486,
17850,
543,
286,
1077,
526,
5013,
284,
10802,
28532,
1364,
7300,
21,
19,
5013,
445... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_invalid_hex_empty_str() {
let res: Result<RgbColor, Error> = "".parse();
assert!(res.is_err());
assert_eq!(
format!("{}", res.unwrap_err()),
"unexpected hex color format: expected(Color hex code must not be empty), got(Color hex was empty)"
... | rust_cleaned_test_functions.jsonl/46472 | {
"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,
31433,
32655,
15124,
2895,
368,
341,
286,
1077,
592,
25,
5714,
23370,
9511,
1636,
11,
4600,
29,
284,
44907,
6400,
543,
286,
2060,
10297,
416,
2079,
9266,
1423,
286,
2060,
10714,
33673,
310,
3561,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_djb2() {
assert_eq!(djb2_string("a"), 0x0002b606u32);
assert_eq!(djb2_string("ab"), 0x00597728u32);
assert_eq!(djb2_string("abc"), 0x0b885c8bu32);
assert_eq!(djb2_string("abcd"), 0x7c93ee4fu32);
assert_eq!(djb2_string("abcde"), 0x0f11b894u32);
asse... | rust_cleaned_test_functions.jsonl/95810 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 309
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
38978,
17,
368,
341,
286,
2060,
10714,
10297,
67,
38978,
17,
3904,
445,
64,
3975,
220,
15,
87,
15,
15,
15,
17,
65,
21,
15,
21,
84,
18,
17,
317,
286,
2060,
10714,
10297,
67,
38978,
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_serialize_enum_as_number() -> Result<(), Error> {
combined_keys_gen!(sender_combined_key, receiver_combined_key);
let shared_key = SharedKey::generate();
use serde_repr::*;
#[derive(Serialize_repr, Deserialize_repr, PartialEq, Debug)]
#[repr(u8)]
enum SmallPrime {
... | rust_cleaned_test_functions.jsonl/31587 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 433
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
31054,
11898,
5500,
368,
1464,
5714,
68843,
4600,
29,
341,
262,
10856,
12631,
16322,
10297,
11644,
89945,
3097,
11,
13964,
89945,
3097,
317,
262,
1077,
6094,
3097,
284,
16990,
1592,
486,
1936... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_std_dev() {
test_case(-0.0, 2.0, (1f64 / 3.0).sqrt(), |x| x.std_dev());
test_case(0.0, 2.0, (1f64 / 3.0).sqrt(), |x| x.std_dev());
test_almost(0.1, 4.0, (1.2675f64).sqrt(), 1e-15, |x| x.std_dev());
test_case(10.0, 11.0, (1f64 / 12.0).sqrt(), |x| x.std_dev());
... | rust_cleaned_test_functions.jsonl/47369 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 231
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15656,
10433,
368,
341,
286,
1273,
19096,
4080,
15,
13,
15,
11,
220,
17,
13,
15,
11,
320,
16,
69,
21,
19,
608,
220,
18,
13,
15,
568,
26888,
1507,
760,
87,
91,
856,
13091,
10433,
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_invalid_read_bits() {
let val: u32 = 30;
val.read_bits_in_range(&BitRange {
msb_index: 32,
lsb_index: 2,
});
} | rust_cleaned_test_functions.jsonl/4119 | {
"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,
31433,
6443,
20034,
368,
341,
286,
1077,
1044,
25,
575,
18,
17,
284,
220,
18,
15,
280,
286,
1044,
4125,
20034,
1243,
9698,
2099,
8344,
6046,
341,
310,
9829,
65,
3560,
25,
220,
18,
17,
345,
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 |
#[test]
fn test_override_0msat_htlc_minimum() {
let mut zero_config = UserConfig::default();
zero_config.own_channel_config.our_htlc_minimum_msat = 0;
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, &[Non... | rust_cleaned_test_functions.jsonl/16951 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 381
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48576,
62,
15,
1011,
266,
49086,
17257,
84855,
368,
341,
10217,
5206,
7168,
5332,
284,
2657,
2648,
486,
2258,
543,
197,
14154,
5332,
13,
779,
14571,
5332,
13,
413,
49086,
17257,
84855,
21416,
266,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rows() {
let expected = vec![1_u8, 2, 3];
let block = Block::<Simple>::new().column("A", vec![1_u8, 2, 3]);
let actual: Vec<u8> = block.rows().map(|row| row.get("A").unwrap()).collect();
assert_eq!(expected, actual);
} | rust_cleaned_test_functions.jsonl/52589 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 135
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10949,
368,
341,
286,
1077,
3601,
284,
7486,
20703,
16,
7300,
23,
11,
220,
17,
11,
220,
18,
935,
286,
1077,
2504,
284,
8362,
27638,
16374,
6831,
931,
1005,
6229,
445,
32,
497,
7486,
20703,
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_set_global_commands() {
let route = Route::SetGlobalCommands {
application_id: APPLICATION_ID,
};
assert_eq!(
route.to_string(),
format!(
"applications/{application_id}/commands",
application_id = APPLICA... | rust_cleaned_test_functions.jsonl/119849 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 197
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
19296,
44151,
368,
341,
286,
1077,
6021,
284,
9572,
486,
1649,
11646,
30479,
341,
310,
3766,
842,
25,
59237,
3450,
345,
286,
2605,
286,
2060,
10714,
33673,
310,
6021,
2389,
3904,
3148,
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_known_neurons() {
let driver = fake::FakeDriver::default();
let neurons = [
(
1,
Neuron {
id: Some(NeuronId { id: 1 }),
controller: Some(principal(1)),
cached_neuron_stake_e8s: 100_000_000,
di... | rust_cleaned_test_functions.jsonl/42976 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3334
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71690,
96156,
368,
341,
262,
1077,
5579,
284,
12418,
486,
52317,
11349,
486,
2258,
543,
262,
1077,
33213,
284,
2278,
286,
2399,
310,
220,
16,
345,
310,
4182,
36090,
341,
394,
877,
25,
4329,
8204... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_comment() {
let input = "// hello
let x = 5
";
let expected = vec![
Token::Comment(" hello".to_string()),
Token::Keyword(Keyword::Let),
Token::Ident("x".to_string()),
Token::Assign,
Token::Int(FieldElement::from(5)),
];
let mu... | rust_cleaned_test_functions.jsonl/72660 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 233
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17638,
368,
341,
262,
1077,
1946,
284,
35574,
23811,
198,
286,
1077,
856,
284,
220,
20,
198,
262,
41620,
262,
1077,
3601,
284,
7486,
90515,
286,
9660,
486,
10677,
445,
23811,
3263,
983,
3904,
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... | 2 |
#[test]
fn test_bump_fee_absolute_reduce_single_recipient() {
let (wallet, _, _) = get_funded_wallet(get_test_wpkh());
let addr = Address::from_str("2N1Ffz3WaNzbeLFBb51xyFMHYSEUXcbiSoX").unwrap();
let (psbt, mut original_details) = wallet
.create_tx(
TxBuilder... | rust_cleaned_test_functions.jsonl/11358 | {
"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,
880,
1510,
34305,
50874,
64596,
19487,
7080,
14117,
368,
341,
286,
1077,
320,
35735,
11,
8358,
27439,
284,
633,
761,
36053,
62308,
5433,
4452,
1670,
20819,
71,
1423,
286,
1077,
10789,
284,
9177,
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... | 2 |
#[test]
fn test_get_account_state_with_proof() {
let (mock_db, client, _runtime) = create_database_client_and_runtime();
let account = get_first_account_from_mock_db(&mock_db);
let received_proof = client
.get_account_state_with_proof(account, Some(0), Some(0))
.unwrap()
.i... | rust_cleaned_test_functions.jsonl/102715 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 582
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
13500,
4387,
6615,
86757,
368,
341,
262,
1077,
320,
16712,
8685,
11,
2943,
11,
716,
22255,
8,
284,
1855,
27341,
8179,
8378,
33232,
1428,
262,
1077,
2692,
284,
633,
12978,
13500,
5673,
34134,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_is_colocated() {
let hw1 = RefCell::new(CpuHardware::new());
let hw2 = RefCell::new(CpuHardware::new());
unsafe {
let buf1 = Buffer::raw(&hw1, 1);
let buf2 = Buffer::raw(&hw1, 1);
let buf3 = Buffer::raw(&hw2, 1);
assert!(buf... | rust_cleaned_test_functions.jsonl/78624 | {
"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,
6892,
10211,
509,
657,
368,
341,
286,
1077,
31256,
16,
284,
8550,
3599,
486,
931,
3025,
5584,
66862,
486,
931,
1423,
286,
1077,
31256,
17,
284,
8550,
3599,
486,
931,
3025,
5584,
66862,
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_grow_fn() {
let mut v = vec![0u, 1];
v.grow_fn(3, |i| i);
assert!(v == vec![0u, 1, 0, 1, 2]);
} | rust_cleaned_test_functions.jsonl/98368 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 92
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
651,
15246,
368,
341,
286,
1077,
5206,
348,
284,
7486,
20703,
15,
84,
11,
220,
16,
935,
286,
348,
1302,
651,
15246,
7,
18,
11,
760,
72,
91,
600,
317,
286,
2060,
10297,
85,
621,
7486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_prefix_with_variant_forms_of_spelling() {
env::set_var("a_A_C", "abc");
let environment = Environment::with_prefix("a");
assert!(environment.collect().unwrap().contains_key("a_c"));
env::remove_var("a_A_C");
env::set_var("aB_A_C", "abc");
let environment = Environment... | rust_cleaned_test_functions.jsonl/22984 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 256
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13974,
6615,
46112,
64282,
3575,
10123,
6293,
368,
341,
262,
6105,
486,
746,
4612,
445,
64,
1566,
920,
497,
330,
13683,
3071,
262,
1077,
4573,
284,
11586,
486,
4197,
13974,
445,
64,
3071,
262,
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_systemd_unit_render() {
let service = ServiceConfig {
name: "hello".into(),
command: string_vec!["/bin/sh", "-c", "echo hello"],
level: ServiceLevel::System,
env: convert_args!(btreemap!(
"FOO" => "foo",
"BAR... | rust_cleaned_test_functions.jsonl/70430 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 484
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17687,
67,
14832,
22781,
368,
341,
286,
1077,
2473,
284,
5362,
2648,
341,
310,
829,
25,
330,
14990,
3263,
18122,
3148,
310,
3210,
25,
914,
13251,
0,
1183,
14,
6863,
14688,
497,
6523,
66,
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_explicit_directory_paths() {
let paths = RootedSystemLayout::new("~/.archetect/").unwrap();
let archetect = Archetect::builder().with_layout(paths).build().unwrap();
println!("{}", archetect.layout().catalog_cache_dir().display());
} | rust_cleaned_test_functions.jsonl/117171 | {
"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,
14214,
6026,
14846,
24152,
368,
341,
286,
1077,
12716,
284,
18854,
291,
2320,
2175,
486,
931,
81012,
11930,
1113,
13176,
14,
1827,
15454,
543,
286,
1077,
5325,
13176,
284,
9494,
13176,
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_limited_delay() {
std::env::set_var(ENV_INTERVAL, "15");
let t = TimerProvider::new();
assert_eq!(t.get_delay_ms(), 100);
} | rust_cleaned_test_functions.jsonl/103570 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 90
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
907,
31511,
22198,
368,
341,
286,
1460,
486,
3160,
486,
746,
4612,
7,
30360,
37353,
11,
330,
16,
20,
5038,
715,
286,
1077,
259,
284,
17759,
5179,
486,
931,
543,
286,
2060,
10714,
10297,
83,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_map() {
assert_eq!(Vector3::new(7.12f64, 3.8f64, -6.98f64).map(|x| x.floor()), Vector3::new(7.0f64, 3.0f64, -7.0f64));
assert_eq!(Vector3::new(7.12f64, 3.8f64, -6.98f64).map(|x| x.max(0.0f64)), Vector3::new(7.12f64, 3.8f64, 0.0f64));
} | rust_cleaned_test_functions.jsonl/5672 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 157
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5376,
368,
341,
262,
2060,
10714,
10297,
3781,
18,
486,
931,
7,
22,
13,
16,
17,
69,
21,
19,
11,
220,
18,
13,
23,
69,
21,
19,
11,
481,
21,
13,
24,
23,
69,
21,
19,
568,
2186,
22428,
87,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_push_get() {
let mut v = SmallVector::zero();
v.push(1);
assert_eq!(1, v.len());
assert_eq!(&1, v.get(0));
v.push(2);
assert_eq!(2, v.len());
assert_eq!(&2, v.get(1));
v.push(3);
assert_eq!(3, v.len());
assert_eq!(&3... | rust_cleaned_test_functions.jsonl/86518 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 203
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14218,
3062,
368,
341,
286,
1077,
5206,
348,
284,
14994,
3781,
486,
14154,
543,
286,
348,
2552,
7,
16,
317,
286,
2060,
10714,
10297,
16,
11,
348,
19406,
1423,
286,
2060,
10714,
0,
2099,
16,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rename_imm() {
let mut opcode = OpcodeData {
name: "TestOp",
immediates: vec![("field1", ImmType::BLA), ("field2", ImmType::BLA)],
inputs: Inputs::NOV,
outputs: Outputs::NOV,
flags: InstrFlags::NF,
};
let fixups... | rust_cleaned_test_functions.jsonl/54514 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 478
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79399,
71370,
368,
341,
286,
1077,
5206,
30028,
284,
78899,
1043,
341,
310,
829,
25,
330,
2271,
7125,
756,
310,
5551,
973,
25,
7486,
20703,
445,
2566,
16,
497,
15335,
929,
486,
9389,
32,
701,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_flags() {
let mut s = Sprite::new([0; 64]);
s.set_flag(0, true);
assert_eq!(s.is_flags_set(0), true);
s.set_flag(7, true);
assert_eq!(s.is_flags_set(7), true);
s.set_flag(7, false);
assert_eq!(s.is_flags_set(7), false);
} | rust_cleaned_test_functions.jsonl/33295 | {
"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,
45489,
14130,
368,
341,
286,
1077,
5206,
274,
284,
21556,
486,
931,
2561,
15,
26,
220,
21,
19,
2558,
286,
274,
980,
10933,
7,
15,
11,
830,
317,
286,
2060,
10714,
10297,
82,
2079,
14130,
2602,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_groupby_sort_by() {
let df = df! {
"a" => ["a", "a", "a", "b", "b", "c"],
"b" => [1, 2, 3, 4, 5, 6],
"c" => [6, 1, 4, 3, 2, 1]
}
.unwrap();
let out = df
.lazy()
.groupby([col("a")])
.agg([col("b").sort_by([col("c")], [true]).f... | rust_cleaned_test_functions.jsonl/141 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 311
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49646,
6288,
1694,
18435,
3710,
368,
341,
262,
1077,
6764,
284,
6764,
0,
341,
286,
330,
64,
1,
589,
4383,
64,
497,
330,
64,
497,
330,
64,
497,
330,
65,
497,
330,
65,
497,
330,
66,
8097,
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_transactions() {
let store = MemoryBlockstore::default();
let mut tree = StateTree::new(&store, StateTreeVersion::V3).unwrap();
let mut addresses: Vec<Address> = Vec::new();
let test_addresses = vec!["t0100", "t0101", "t0102"];
for a in test_addresses.ite... | rust_cleaned_test_functions.jsonl/62013 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1341
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68182,
368,
341,
286,
1077,
3553,
284,
13850,
4713,
4314,
486,
2258,
543,
286,
1077,
5206,
4916,
284,
3234,
6533,
486,
931,
2099,
4314,
11,
3234,
6533,
5637,
486,
53,
18,
568,
15454,
543,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_query_for_manage_neuron() {
let driver = FakeDriver::default();
let gov = Governance::new(
fixture_for_manage_neuron(),
driver.get_fake_env(),
driver.get_fake_ledger(),
);
// Test that anybody can call `get_neuron_info` as long as the
// neuron exi... | rust_cleaned_test_functions.jsonl/42481 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1185
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
5478,
56473,
13925,
36090,
368,
341,
262,
1077,
5579,
284,
36965,
11349,
486,
2258,
543,
262,
1077,
47625,
284,
80589,
486,
931,
1006,
286,
12507,
5478,
56473,
13925,
36090,
3148,
286,
5579,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_domain_type_number() {
let ty = DomainType {
annotation: Default::default(),
id: "ty".to_string(),
r#type: Type::Number,
};
let prog = Context::new_root(&Default::default())
.with_domain("foo")
.render_with(&ty);
let expect = quote! {
... | rust_cleaned_test_functions.jsonl/26903 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 382
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20111,
1819,
5500,
368,
341,
262,
1077,
13580,
284,
21070,
929,
341,
286,
21223,
25,
7899,
486,
2258,
3148,
286,
877,
25,
330,
1881,
3263,
983,
3904,
3148,
286,
435,
2,
1313,
25,
3990,
486,
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_unresolved_macro_range() {
check_expect(
r#"foo::bar!(92);"#,
expect![[r#"
[
Diagnostic {
message: "unresolved macro `foo::bar!`",
range: 5..8,
severity: Er... | rust_cleaned_test_functions.jsonl/34393 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 495
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
39747,
58810,
9698,
368,
341,
286,
1779,
68918,
1006,
310,
435,
55543,
7975,
486,
2257,
10297,
24,
17,
42788,
2,
345,
310,
1720,
0,
15505,
81,
2,
698,
394,
2278,
503,
49988,
341,
664,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_memory_type() {
// case 1
let result = MemType::create(0, Some(u32::MAX), false);
assert!(result.is_ok());
let ty = result.unwrap();
assert!(!ty.inner.0.is_null());
assert!(!ty.registered);
assert_eq!(ty.min(), 0);
assert_eq!(ty.max... | rust_cleaned_test_functions.jsonl/84028 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 322
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19195,
1819,
368,
341,
286,
442,
1142,
220,
16,
198,
286,
1077,
1102,
284,
13550,
929,
486,
3182,
7,
15,
11,
4329,
8154,
18,
17,
486,
10586,
701,
895,
317,
286,
2060,
10297,
1382,
2079,
19817,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rpc_new() {
let GenesisBlockInfo {
genesis_block,
mint_keypair,
..
} = create_genesis_block(10_000);
let exit = Arc::new(AtomicBool::new(false));
let bank = Bank::new(&genesis_block);
let cluster_info = Arc::new(RwLock::... | rust_cleaned_test_functions.jsonl/57819 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 741
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60799,
5921,
368,
341,
286,
1077,
40788,
4713,
1731,
341,
310,
59366,
7113,
345,
310,
28337,
3097,
12670,
345,
310,
54538,
286,
335,
284,
1855,
16322,
13774,
7113,
7,
16,
15,
62,
15,
15,
15,
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_add_uncountable() {
let len = UNCOUNTABLE_INFLECTIONS.read().unwrap().len();
add_uncountable(vec!["aaaaa"].into_iter());
assert_eq!(len + 1, UNCOUNTABLE_INFLECTIONS.read().unwrap().len());
} | rust_cleaned_test_functions.jsonl/42793 | {
"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,
2891,
76576,
629,
480,
368,
341,
286,
1077,
2422,
284,
6643,
38143,
3494,
65487,
28017,
50,
4125,
1005,
15454,
1005,
2892,
543,
286,
912,
76576,
629,
480,
25592,
0,
1183,
28458,
64,
5521,
18122,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_binary_into() {
let bytes = Bytes::from_static(b"test");
let b: Bytes = Binary::from("test").into();
assert_eq!(b, bytes);
let b: Bytes = Binary::from(bytes.clone()).into();
assert_eq!(b, bytes);
} | rust_cleaned_test_functions.jsonl/89004 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 127
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31761,
45514,
368,
341,
286,
1077,
5820,
284,
30024,
486,
1499,
25360,
1883,
1,
1944,
797,
286,
1077,
293,
25,
30024,
284,
17718,
486,
1499,
445,
1944,
1827,
18122,
543,
286,
2060,
10714,
10297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bitwise_and_simd() {
let buf1 = [0b00110011u8; 64];
let buf2 = [0b11110000u8; 64];
let mut buf3 = [0b00000000; 64];
unsafe { bitwise_bin_op_simd(&buf1, &buf2, &mut buf3, |a, b| a & b) };
for i in buf3.iter() {
assert_eq!(&0b00110000u8, i);
... | rust_cleaned_test_functions.jsonl/6791 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 188
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13996,
4482,
8378,
18314,
67,
368,
341,
286,
1077,
6607,
16,
284,
508,
15,
65,
15,
15,
16,
16,
15,
15,
16,
16,
84,
23,
26,
220,
21,
19,
935,
286,
1077,
6607,
17,
284,
508,
15,
65,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_nonce_state_size() {
let data = Versions::new(
State::Initialized(Data::default()),
true, // separate_domains
);
let size = bincode::serialized_size(&data).unwrap();
assert_eq!(State::size() as u64, size);
} | rust_cleaned_test_functions.jsonl/25553 | {
"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,
48508,
4387,
2368,
368,
341,
286,
1077,
821,
284,
85174,
486,
931,
1006,
310,
3234,
486,
22495,
18959,
486,
2258,
14702,
310,
830,
11,
442,
8651,
70199,
198,
286,
1439,
286,
1077,
1379,
284,
954... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_contains_elem() {
let mut e1: EnumSet<Foo> = EnumSet::empty();
e1.add(A);
assert!(e1.contains_elem(A));
assert!(!e1.contains_elem(B));
assert!(!e1.contains_elem(C));
e1.add(A);
e1.add(B);
assert!(e1.contains_elem(A));
asser... | rust_cleaned_test_functions.jsonl/9059 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 233
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
63598,
28179,
368,
341,
286,
1077,
5206,
384,
16,
25,
14086,
1649,
30499,
2624,
29,
284,
14086,
1649,
486,
3194,
543,
286,
384,
16,
1364,
4346,
317,
286,
2060,
10297,
68,
16,
8786,
28179,
4346,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_query_for_manage_neuron() {
let driver = fake::FakeDriver::default();
let gov = Governance::new(
fixture_for_manage_neuron(),
driver.get_fake_env(),
driver.get_fake_ledger(),
);
// Test that anybody can call `get_neuron_info` as long as the
// neuron e... | rust_cleaned_test_functions.jsonl/1123 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1831
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
5478,
56473,
13925,
36090,
368,
341,
262,
1077,
5579,
284,
12418,
486,
52317,
11349,
486,
2258,
543,
262,
1077,
47625,
284,
80589,
486,
931,
1006,
286,
12507,
5478,
56473,
13925,
36090,
3148,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_copy_symlink_force() {
let (at, mut ucmd) = at_and_ucmd!();
at.touch("file");
at.symlink_file("file", "file-link");
at.touch("copy");
ucmd.args(&["file-link", "copy", "-f", "--no-dereference"])
.succeeds();
assert_eq!(at.resolve_link("copy"), "file");
} | rust_cleaned_test_functions.jsonl/39665 | {
"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,
16096,
58530,
44243,
40739,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
518,
42129,
445,
1192,
797,
262,
518,
77577,
44243,
2458,
445,
1192,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_layout_rect() {
let a = LayoutRect {
time: Span {
begin: 2,
end: 10,
},
row: 1,
height: 1,
};
let b = LayoutRect {
time: Span {
begin: 1,
end: 17,
... | rust_cleaned_test_functions.jsonl/17099 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 291
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14466,
16979,
368,
341,
286,
1077,
264,
284,
13821,
4415,
341,
310,
882,
25,
11903,
341,
394,
3161,
25,
220,
17,
345,
394,
835,
25,
220,
16,
15,
345,
310,
1153,
310,
2802,
25,
220,
16,
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_assert_panics_expect_at_least_and_at_most_with_too_few_requests() {
let mock = mock("GET", "/hello")
.expect_at_least(3)
.expect_at_most(5)
.create();
request("GET /hello", "");
request("GET /hello", "");
mock.assert();
} | rust_cleaned_test_functions.jsonl/82437 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 139
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16553,
71099,
1211,
68918,
3752,
88716,
8378,
3752,
81416,
6615,
2346,
78,
761,
365,
37216,
368,
341,
262,
1077,
7860,
284,
7860,
445,
3806,
497,
3521,
14990,
1138,
286,
659,
17119,
3752,
88716,
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_generate_nonce_p256_3() {
let mut vrf = ECVRF::from_suite(CipherSuite::P256_SHA256_TAI).unwrap();
let mut ord = BigNum::new().unwrap();
vrf.group.order(&mut ord, &mut vrf.bn_ctx).unwrap();
let sk = hex::decode("c9afa9d845ba75166b5c215767b1d6934e50c3db36e... | rust_cleaned_test_functions.jsonl/112463 | {
"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,
48851,
48508,
620,
17,
20,
21,
62,
18,
368,
341,
286,
1077,
5206,
348,
8052,
284,
468,
19589,
17612,
486,
1499,
57239,
3025,
10558,
28000,
486,
47,
17,
20,
21,
38096,
17,
20,
21,
1139,
15469,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_coprocessor() {
let (_cluster, client, _) = must_new_cluster_and_kv_client();
// SQL push down commands
let mut req = Request::default();
req.set_tp(REQ_TYPE_DAG);
client.coprocessor(&req).unwrap();
} | rust_cleaned_test_functions.jsonl/61687 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 105
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
453,
40848,
269,
368,
341,
262,
1077,
5453,
18855,
11,
2943,
11,
27439,
284,
1969,
5921,
28441,
8378,
97066,
8179,
543,
262,
442,
7870,
4484,
1495,
11293,
198,
262,
1077,
5206,
4232,
284,
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_row_group_metadata_thrift_conversion_empty() {
let schema_descr = get_test_schema_descr();
let row_group_meta = RowGroupMetaData::builder(schema_descr.clone()).build();
assert!(row_group_meta.is_err());
if let Err(e) = row_group_meta {
assert_eq!(
... | rust_cleaned_test_functions.jsonl/106312 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 225
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8530,
6288,
22220,
5854,
41380,
64132,
15124,
368,
341,
286,
1077,
10802,
64622,
284,
633,
4452,
25371,
64622,
1428,
286,
1077,
2802,
6288,
13381,
284,
10801,
2808,
37307,
486,
17850,
42735,
64622,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_len() {
let mut e = EnumSet::new();
assert_eq!(e.len(), 0);
e.insert(A);
e.insert(B);
e.insert(C);
assert_eq!(e.len(), 3);
e.remove(&A);
assert_eq!(e.len(), 2);
e.clear();
assert_eq!(e.len(), 0);
} | rust_cleaned_test_functions.jsonl/2750 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 184
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6043,
368,
341,
286,
1077,
5206,
384,
284,
14086,
1649,
486,
931,
543,
286,
2060,
10714,
10297,
68,
19406,
1507,
220,
15,
317,
286,
384,
7030,
4346,
317,
286,
384,
7030,
5349,
317,
286,
384,
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_databag_stripping() {
use crate::protocol::{Event, ExtraValue};
use crate::types::{Annotated, Value};
let mut processor = TrimmingProcessor::new();
fn make_nested_object(depth: usize) -> Annotated<Value> {
if depth == 0 {
return Annotated::new(Value::String(... | rust_cleaned_test_functions.jsonl/112688 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 901
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
2096,
351,
1261,
461,
10732,
368,
341,
262,
990,
17717,
486,
17014,
22964,
1556,
11,
24992,
1130,
2440,
262,
990,
17717,
486,
9242,
22964,
2082,
87029,
11,
5162,
2315,
262,
1077,
5206,
17654,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_runtime_ctrl_alt_del() {
let req = VmmAction::SendCtrlAltDel;
check_runtime_request(req, |result, vmm| {
assert_eq!(result, Ok(VmmData::Empty));
assert!(vmm.send_ctrl_alt_del_called)
});
let req = VmmAction::SendCtrlAltDel;
check_r... | rust_cleaned_test_functions.jsonl/44541 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 269
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33232,
22667,
32105,
18029,
368,
341,
286,
1077,
4232,
284,
647,
3821,
2512,
486,
11505,
15001,
26017,
16532,
280,
286,
1779,
33232,
7893,
6881,
11,
760,
1382,
11,
348,
3821,
91,
341,
310,
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_bilinear() {
let mut dev = primitiv_utils::select_device(-1);
devices::set_default(&mut *dev);
{
let mut bilinears = vec![
Bilinear::new((true, true, true)),
Bilinear::new((true, true, false)),
Bilinear::new((tru... | rust_cleaned_test_functions.jsonl/57722 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3106
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
70933,
368,
341,
286,
1077,
5206,
3483,
284,
548,
2353,
344,
17309,
486,
1742,
9204,
4080,
16,
317,
286,
7611,
486,
746,
9993,
2099,
6984,
353,
3583,
317,
286,
341,
310,
1077,
5206,
20316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_part_two() {
let rules: Rules = "shiny gold bags contain 1 bright white bag, 2 bright yellow bags.
bright white bags contain 1 bright yellow bag."
.parse()
.unwrap();
assert_eq!(part2(rules), 1 + 1 + 2 * 1);
} | rust_cleaned_test_functions.jsonl/57737 | {
"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,
10495,
23241,
368,
341,
286,
1077,
5601,
25,
22847,
284,
330,
927,
6441,
6623,
17899,
6644,
220,
16,
9906,
4158,
8968,
11,
220,
17,
9906,
13753,
17899,
624,
72116,
4158,
17899,
6644,
220,
16,
99... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_new_service() {
let cnt = Rc::new(Cell::new(0));
let cnt2 = cnt.clone();
let blank = move || Ok::<_, ()>(Srv1(cnt2.clone()));
let new_srv = blank
.into_new_service()
.and_then(move || Ok(Srv2(cnt.clone())));
if let Async::Ready(mut ... | rust_cleaned_test_functions.jsonl/91388 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 321
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
12267,
368,
341,
286,
1077,
13195,
284,
81463,
486,
931,
82530,
486,
931,
7,
15,
1106,
286,
1077,
13195,
17,
284,
13195,
15997,
543,
286,
1077,
10113,
284,
3271,
1369,
7622,
27638,
6878,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_keypair_input() {
let arg_matches = ArgMatches::default();
let KeypairWithSource { source, .. } = keypair_input(&arg_matches, "").unwrap();
assert_eq!(source, Source::Generated);
} | rust_cleaned_test_functions.jsonl/125388 | {
"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,
3097,
12670,
5898,
368,
341,
286,
1077,
1392,
38344,
284,
7638,
42470,
486,
2258,
543,
286,
1077,
6569,
1082,
1310,
2354,
3608,
314,
2530,
11,
5241,
335,
284,
1376,
12670,
5898,
2099,
858,
38344,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_zip() {
let mut x = SortedVecSet::new();
x.insert(5);
x.insert(12);
x.insert(11);
let mut y = SortedVecSet::new();
y.insert("foo");
y.insert("bar");
let x = x;
let y = y;
let mut z = x.iter().zip(&y);
asse... | rust_cleaned_test_functions.jsonl/110154 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 253
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42131,
368,
341,
286,
1077,
5206,
856,
284,
52688,
10050,
1649,
486,
931,
543,
286,
856,
7030,
7,
20,
317,
286,
856,
7030,
7,
16,
17,
317,
286,
856,
7030,
7,
16,
16,
626,
286,
1077,
5206,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_find_lifetimes_trait_impl() {
check(
r#"
trait Foo<'a> {
fn foo() -> &'a ();
}
impl<'a> Foo<'a> for &'a () {
fn foo() -> &'a$0 () {
unimplemented!()
}
}
"#,
expect![[r#"
'a LifetimeParam FileId(0) 47..49 47..49
... | rust_cleaned_test_functions.jsonl/60667 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 279
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
907,
333,
6889,
78491,
21007,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
29432,
33428,
18291,
64,
29,
341,
262,
5168,
15229,
368,
1464,
30136,
64,
9563,
532,
6383,
18291,
64,
29,
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_read_from_fake_file() {
let file = "fake.txt";
match DFAReader::new_from_file(file) {
Err(DFAReaderError::Io(_)) => assert!(true),
_ => assert!(false, "Io::Error expected."),
}
} | rust_cleaned_test_functions.jsonl/47836 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 133
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
5673,
56881,
2458,
368,
341,
286,
1077,
1034,
284,
330,
30570,
3909,
876,
286,
2432,
93631,
5062,
486,
931,
5673,
2458,
4866,
8,
341,
310,
15495,
5432,
3627,
5062,
1454,
486,
42799,
2490,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_validate_okay_transitions() {
let (graph, in0, _, _) = simple_graph();
let req = SchedRequest { graph: &graph };
let mut sched = Scheduler::default();
sched.current_sched = 100;
sched.set_node_schedule(in0, 1);
sched.validate(&req);
} | rust_cleaned_test_functions.jsonl/66797 | {
"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,
42681,
19817,
352,
7965,
5930,
368,
341,
286,
1077,
320,
4439,
11,
304,
15,
11,
8358,
27439,
284,
4285,
14738,
543,
286,
1077,
4232,
284,
328,
2397,
1900,
314,
4771,
25,
609,
4439,
3634,
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_is_absolute() {
macro_rules! t(
($path:expr, $abs:expr, $vol:expr, $cwd:expr, $rel:expr) => (
{
let path = Path::new($path);
let (abs, vol, cwd, rel) = ($abs, $vol, $cwd, $rel);
let b = path.is_absolu... | rust_cleaned_test_functions.jsonl/102780 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1114
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
50874,
368,
341,
286,
18072,
21407,
0,
259,
1006,
310,
1711,
2343,
96011,
11,
400,
3435,
96011,
11,
400,
12536,
96011,
11,
400,
32165,
96011,
11,
400,
3748,
96011,
8,
589,
2399,
394,
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_dcr_b_underflow() {
let mut state = State8080::empty_state();
state.memory = vec![0x05];
state.b = 0x00;
emulate_8080_op(&mut state);
assert_eq!(state.b, 0xff);
} | rust_cleaned_test_functions.jsonl/7753 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 121
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
5082,
880,
58228,
4965,
368,
341,
286,
1077,
5206,
1584,
284,
3234,
23,
15,
23,
15,
486,
3194,
4387,
543,
286,
1584,
36611,
284,
7486,
20703,
15,
87,
15,
20,
935,
286,
1584,
948,
284,
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_handle_funding_transaction_zero_amount() {
let (mut contract_state, _name, _secret) = init_contract();
let mut funding_transaction = init_funding_transaction();
funding_transaction.primary_coins = Amount::zero();
assert!(contract_state
.handle_funding_transaction(funding... | rust_cleaned_test_functions.jsonl/11408 | {
"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,
10630,
761,
37189,
28884,
19359,
13471,
368,
341,
262,
1077,
320,
6984,
5116,
4387,
11,
716,
606,
11,
716,
20474,
8,
284,
2930,
51499,
543,
262,
1077,
5206,
10773,
28884,
284,
2930,
761,
37189,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bounded_string() {
let input = &[0, 0, 0, 3, 0x78, 0x78, 0x78, 0xff];
let res: NomResult<String> = bounded_string(3)(input);
assert_eq!(res, Ok((&[0xffu8][..], "xxx".to_string())));
let res: NomResult<String> = bounded_string(4)(input);
assert_eq!(res, O... | rust_cleaned_test_functions.jsonl/39179 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 257
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
13082,
3904,
368,
341,
286,
1077,
1946,
284,
44590,
15,
11,
220,
15,
11,
220,
15,
11,
220,
18,
11,
220,
15,
87,
22,
23,
11,
220,
15,
87,
22,
23,
11,
220,
15,
87,
22,
23,
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_arstechnica_cert() {
Context::new(
"arstechnica",
"arstechnica.com",
&[
include_bytes!("testdata/cert-arstechnica.0.der"),
include_bytes!("testdata/cert-arstechnica.1.der"),
include_bytes!("testdata/cert-arstechnica.2.der"),
... | rust_cleaned_test_functions.jsonl/802 | {
"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,
25842,
5342,
2125,
3001,
37097,
368,
341,
262,
9608,
486,
931,
1006,
286,
330,
277,
5342,
2125,
3001,
756,
286,
330,
277,
5342,
2125,
3001,
905,
756,
286,
609,
9640,
310,
2924,
12524,
17223,
924... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_memory_copy() {
let program = Program::new_for_tests(Vec::new(), 0, 0);
let mut processor = Processor::new_empty(program, 100);
let memory_index = 200;
let target_memory_index = 400;
let values = [0x10_u8, 0x25, 0x56, 0xe5];
for (i, value) in valu... | rust_cleaned_test_functions.jsonl/94620 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2443
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19195,
16096,
368,
341,
286,
1077,
2025,
284,
6687,
486,
931,
5478,
32509,
49923,
486,
931,
1507,
220,
15,
11,
220,
15,
317,
286,
1077,
5206,
17654,
284,
43377,
486,
931,
15124,
36827,
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... | 8 |
#[test]
fn test_stream_nowait_context() {
let m = Arc::new(AtomicUsize::new(0));
let m2 = Arc::clone(&m);
let sys = System::new();
sys.block_on(async move {
let _addr = ContextNoWait::create(move |ctx| {
let (tx, rx) = unbounded_channel();
let _ = tx.send(Ping);
... | rust_cleaned_test_functions.jsonl/56899 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 379
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12673,
20813,
1315,
8467,
368,
341,
262,
1077,
296,
284,
19689,
486,
931,
7,
65857,
52,
2141,
486,
931,
7,
15,
1106,
262,
1077,
296,
17,
284,
19689,
486,
19982,
2099,
76,
626,
262,
1077,
5708,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_big5_encode() {
// Empty
encode_big5("", b"");
// ASCII
encode_big5("\u{0061}\u{0062}", b"\x61\x62");
// Edge cases
encode_big5("\u{9EA6}\u{0061}", b"麦\x61");
encode_big5("\u{2626B}\u{0061}", b"𦉫\x61");
encode_big5(... | rust_cleaned_test_functions.jsonl/20630 | {
"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,
36386,
20,
11224,
368,
341,
286,
442,
22228,
198,
286,
16164,
36386,
20,
19814,
293,
3014,
626,
286,
442,
39316,
198,
286,
16164,
36386,
20,
4921,
84,
90,
15,
15,
21,
16,
11035,
84,
90,
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_hidden_prob_calc_not_seen_active_after_active_connect() {
// Test the specific case where we fail to see the network in an active scan after we
// previously connected to the network after an active scan was required.
let mut network_config = NetworkConfig::new(
... | rust_cleaned_test_functions.jsonl/114365 | {
"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,
26739,
20794,
38241,
7913,
60668,
12930,
19844,
12930,
15720,
368,
341,
286,
442,
3393,
279,
3151,
1142,
1380,
582,
3690,
311,
1490,
279,
3922,
304,
458,
4541,
8569,
1283,
582,
198,
286,
442,
8597... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_intersect_regions_new_range_overlaps_multiple_existing() {
let actual = intersect_regions(
vec![
UnchangedRange {
base_range: 20..50,
offsets: vec![3, -8],
},
UnchangedRange {
... | rust_cleaned_test_functions.jsonl/89255 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 507
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
72747,
58035,
5921,
9698,
15431,
89722,
45233,
62630,
368,
341,
286,
1077,
5042,
284,
31796,
58035,
1006,
310,
7486,
90515,
394,
1230,
17353,
6046,
341,
503,
2331,
9698,
25,
220,
17,
15,
496,
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_hindi_truncation() -> io::Result<()> {
test_truncate_length("नमस्ते", 3, "नमस्", "…")
} | rust_cleaned_test_functions.jsonl/106757 | {
"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,
1523,
28685,
3547,
1347,
367,
368,
1464,
6399,
486,
2077,
71698,
341,
262,
1273,
3547,
26900,
5118,
445,
60096,
87244,
78368,
30484,
97,
34370,
497,
220,
18,
11,
330,
60096,
87244,
78368,
29607,
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 |
#[test]
fn test_all_satisfiable() {
let seed = 234595182222252245;
let num_names = 100;
let intkey_iterator = IntKeyIterator::new(num_names, 0.0, seed);
let context = signing::create_context("secp256k1").unwrap();
let private_key = context.new_random_private_key().unwrap... | rust_cleaned_test_functions.jsonl/101968 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 871
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5705,
643,
7478,
2156,
368,
341,
286,
1077,
10320,
284,
220,
17,
18,
19,
20,
24,
20,
16,
23,
17,
17,
17,
17,
17,
20,
17,
17,
19,
20,
280,
286,
1077,
1629,
9187,
284,
220,
16,
15,
15,
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_uncompressed_length() {
let cases = vec![
(Some(""), Some(0)),
(
Some("0B000000789CCB48CDC9C95728CF2FCA4901001A0B045D"),
Some(11),
),
(
Some("0C000000789CCB48CDC9C95728CF2F32303402001D8004202E... | rust_cleaned_test_functions.jsonl/91312 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 636
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
45703,
5118,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
320,
8373,
86076,
4329,
7,
15,
6965,
310,
2399,
394,
4329,
445,
15,
33,
15,
15,
15,
15,
15,
15,
22,
23,
24,
3706,
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... | 2 |
#[test]
fn test_pointer_member_variable() {
let ir = ir_from_cc(
"struct SomeStruct {
SomeStruct* ptr;
};",
)
.unwrap();
assert_ir_matches!(
ir,
quote! {
Field {
identifier: Some("ptr") ...
type_: Ok(MappedTy... | rust_cleaned_test_functions.jsonl/37166 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 770
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21425,
19388,
14635,
368,
341,
262,
1077,
6216,
284,
6216,
5673,
28955,
1006,
286,
330,
1235,
4329,
9422,
341,
310,
4329,
9422,
9,
10087,
280,
286,
20066,
756,
262,
1727,
262,
659,
15454,
543,
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_create_tx_custom_sighash() {
let (wallet, _, _) = get_funded_wallet(get_test_wpkh());
let addr = wallet.get_new_address().unwrap();
let (psbt, _) = wallet
.create_tx(
TxBuilder::with_recipients(vec![(addr.script_pubkey(), 30_000)])
... | rust_cleaned_test_functions.jsonl/11336 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 292
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
17805,
15875,
643,
1090,
988,
368,
341,
286,
1077,
320,
35735,
11,
8358,
27439,
284,
633,
761,
36053,
62308,
5433,
4452,
1670,
20819,
71,
1423,
286,
1077,
10789,
284,
15085,
670,
5921,
6744,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tensor_native_type_zero() {
let tensor = <Tensor<i32>>::new(&[1000]);
// Checking against null-initialized slice/vector makes
// the unit test succeed often on repeated runs.
for v in tensor.as_ref() {
assert_eq!(0, *v);
}
} | rust_cleaned_test_functions.jsonl/45388 | {
"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,
23188,
44494,
1819,
19359,
368,
341,
286,
1077,
15626,
284,
366,
25336,
21897,
18,
17,
77595,
931,
2099,
58,
16,
15,
15,
15,
10149,
286,
442,
46093,
2348,
845,
68028,
15983,
80382,
3643,
198,
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... | 2 |
#[test]
fn test_observe_without_resource() {
let path = "/test";
let mut server = CoAPServer::new("127.0.0.1:5691").unwrap();
server.handle(request_handler).unwrap();
let mut client = CoAPClient::new("127.0.0.1:5691").unwrap();
let error = client.observe(path, |_msg| {})... | rust_cleaned_test_functions.jsonl/40410 | {
"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,
36322,
13267,
39904,
17962,
368,
341,
286,
1077,
1815,
284,
3521,
1944,
876,
286,
1077,
5206,
3538,
284,
3539,
2537,
5475,
486,
931,
445,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
20,
21,
24,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_delta_byte_array_unique_arrays() {
let data = vec![
vec![ByteArray::from(vec![1])],
vec![ByteArray::from(vec![2, 3]), ByteArray::from(vec![4, 5, 6])],
vec![
ByteArray::from(vec![7, 8]),
ByteArray::from(vec![9, 0, 1, 2]),... | rust_cleaned_test_functions.jsonl/38531 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 233
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26710,
19737,
3858,
21218,
68983,
368,
341,
286,
1077,
821,
284,
7486,
90515,
310,
7486,
20703,
18394,
486,
1499,
25592,
20703,
16,
2467,
1259,
310,
7486,
20703,
18394,
486,
1499,
25592,
20703,
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_time_serialization() {
let time = Time::new(time::time!(0:00));
let json = json!({ "time test": time });
assert_eq!(json!({"time test":"00:00:00"}), json);
} | rust_cleaned_test_functions.jsonl/47262 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 98
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3009,
25602,
2022,
368,
341,
286,
1077,
882,
284,
4120,
486,
931,
9730,
486,
1678,
10297,
15,
25,
15,
15,
1106,
286,
1077,
2951,
284,
2951,
0,
2306,
330,
1678,
1273,
788,
882,
3011,
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_apply_TextEdit_overlong_end() {
let lines: Vec<String> = r#"abc = 123"#.lines().map(|l| l.to_owned()).collect();
let expect: Vec<String> = r#"nb = 123"#.lines().map(|l| l.to_owned()).collect();
let edit = TextEdit {
range: Range {
start: Position {
... | rust_cleaned_test_functions.jsonl/86859 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 328
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36551,
20550,
4036,
15431,
4825,
6213,
368,
341,
262,
1077,
5128,
25,
11312,
3464,
29,
284,
435,
55543,
13683,
284,
220,
16,
17,
18,
57676,
13,
7969,
1005,
2186,
22428,
75,
91,
326,
2389,
51973,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ledger_with_one_tick_per_slot() {
let GenesisConfigInfo {
mut genesis_config, ..
} = create_genesis_config(123);
genesis_config.ticks_per_slot = 1;
let (ledger_path, _blockhash) = create_new_tmp_ledger!(&genesis_config);
let blockstore... | rust_cleaned_test_functions.jsonl/47528 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 587
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
38367,
1389,
6615,
11667,
43612,
5678,
27563,
368,
341,
286,
1077,
40788,
2648,
1731,
341,
310,
5206,
59366,
5332,
11,
54538,
286,
335,
284,
1855,
16322,
13774,
5332,
7,
16,
17,
18,
317,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_request_errors() {
let mut raw = BytesMut::from("GET htt:p// HTTP/1.1\r\nHost: hyper.rs\r\n\r\n");
let ctx = ParseContext {
cached_headers: &mut None,
req_method: &mut None,
};
Server::parse(&mut raw, ctx).unwrap_err();
} | rust_cleaned_test_functions.jsonl/122733 | {
"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,
21039,
7893,
20196,
368,
341,
286,
1077,
5206,
7112,
284,
30024,
51440,
486,
1499,
445,
3806,
54320,
44389,
322,
10130,
14,
16,
13,
16,
12016,
1699,
9296,
25,
17071,
25638,
12016,
1699,
12016,
169... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_slope() {
let mut jump_model = JumpModel::new_model(
FixedU128::from_float(0.01),
FixedU128::from_float(0.11),
FixedU128::from_float(0.31),
Percent::from_percent(80),
)
.unwrap();
let x1 = 70;
let x2 = 75;
let y1 = jump_model.get_borrow_rate(Percent::from_percent(x1)).un... | rust_cleaned_test_functions.jsonl/99034 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 387
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79743,
368,
341,
197,
10217,
5206,
7784,
5047,
284,
28788,
1712,
486,
931,
5047,
1006,
298,
12727,
3286,
52,
16,
17,
23,
486,
1499,
17586,
7,
15,
13,
15,
16,
1326,
298,
12727,
3286,
52,
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_parse_attribute_refaddr_32() {
let buf = [0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x99, 0x99];
let unit = test_parse_attribute_unit(4, Format::Dwarf32, LittleEndian);
let form = constants::DW_FORM_ref_addr;
let value = AttributeValue::DebugInfoRef(DebugInf... | rust_cleaned_test_functions.jsonl/102035 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 190
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
16791,
7793,
6214,
62,
18,
17,
368,
341,
286,
1077,
6607,
284,
508,
15,
87,
15,
16,
11,
220,
15,
87,
15,
17,
11,
220,
15,
87,
15,
18,
11,
220,
15,
87,
15,
19,
11,
220,
15,
87,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_config_bad_owner() {
let from_pubkey = solana_sdk::pubkey::new_rand();
let config_pubkey = solana_sdk::pubkey::new_rand();
let new_config = MyConfig::new(84);
let signer0_pubkey = solana_sdk::pubkey::new_rand();
let signer0_account = RefCell::new(AccountSh... | rust_cleaned_test_functions.jsonl/4696 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 556
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5332,
34199,
29027,
368,
341,
286,
1077,
504,
34014,
792,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
2193,
34014,
792,
284,
2048,
3362,
61783,
486,
9585,
792,
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_xcdyoutubekit_54() {
let fixture = load_fixture("XCDYouTubeKit-54");
let report: AppleCrashReport = fixture.parse().unwrap();
insta::assert_yaml_snapshot!("XCDYouTubeKit-54", &report);
} | rust_cleaned_test_functions.jsonl/71679 | {
"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,
3212,
4385,
88,
411,
392,
1225,
275,
62,
20,
19,
368,
341,
262,
1077,
12507,
284,
2795,
74409,
445,
55,
6484,
53746,
7695,
12,
20,
19,
797,
262,
1077,
1895,
25,
8162,
16001,
988,
10361,
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_parse_invalid_utc() {
// Try a sentence with invalite utc
let mut p = NmeaParser::new();
assert_eq!(
p.parse_sentence("!AIVDM,1,1,,B,4028iqT47wP00wGiNbH8H0700`2H,0*13"),
Err(ParseError::InvalidSentence(String::from(
"Failed to parse... | rust_cleaned_test_functions.jsonl/52789 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 225
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
31433,
84259,
368,
341,
286,
442,
9735,
264,
11652,
448,
48044,
632,
69596,
198,
286,
1077,
5206,
281,
284,
451,
2660,
64,
6570,
486,
931,
543,
286,
2060,
10714,
33673,
310,
281,
4632,
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_json_ct() {
let resp = Response::build(StatusCode::OK)
.header(CONTENT_TYPE, "text/json")
.json(vec!["v1", "v2", "v3"]);
let ct = resp.headers().get(CONTENT_TYPE).unwrap();
assert_eq!(ct, HeaderValue::from_static("text/json"));
assert_eq!(r... | rust_cleaned_test_functions.jsonl/18839 | {
"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,
9455,
26134,
368,
341,
286,
1077,
9039,
284,
5949,
486,
5834,
7,
15872,
486,
3925,
340,
310,
659,
2708,
98747,
1825,
4189,
11,
330,
1318,
8931,
1138,
310,
659,
2236,
25592,
0,
1183,
85,
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_with_page_length_option() {
let test_file_path = "test.log";
let expected_test_file_path = "test_page_length.log.expected";
let expected_test_file_path1 = "test_page_length1.log.expected";
let mut scenario = new_ucmd!();
let value = file_last_modified_time(&scenario, test_fil... | rust_cleaned_test_functions.jsonl/103051 | {
"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,
6615,
6129,
5118,
9672,
368,
341,
262,
1077,
1273,
2458,
2638,
284,
330,
1944,
1665,
876,
262,
1077,
3601,
4452,
2458,
2638,
284,
330,
1944,
6129,
5118,
1665,
56835,
876,
262,
1077,
3601,
4452,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_did_doc_parse_key_reference_works() {
assert_eq!(String::from("1"), DidDoc::_parse_key_reference(&_key_reference_1()));
assert_eq!(_key_1(), DidDoc::_parse_key_reference(&_key_1()));
} | rust_cleaned_test_functions.jsonl/21968 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 102
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
307,
18869,
21039,
3097,
25433,
11498,
82,
368,
341,
286,
2060,
10714,
10297,
703,
486,
1499,
445,
16,
3975,
14568,
9550,
13541,
6400,
3097,
25433,
49038,
792,
25433,
62,
16,
7392,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.