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_once_for_priming() {
assert!(once_for_priming_prime_cache());
{
let cache = ONCE_FOR_PRIMING.read().unwrap();
assert!(cache.is_some());
}
} | rust_cleaned_test_functions.jsonl/13150 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 94
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7630,
5478,
5294,
59076,
368,
341,
262,
2060,
10297,
13184,
5478,
5294,
59076,
38217,
11529,
1423,
262,
341,
286,
1077,
6500,
284,
6197,
2104,
14516,
10571,
1791,
1718,
4125,
1005,
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 |
#[test]
fn test_enum_modifies_scope() {
// Enable once enum correctly modifies scope.
use parser::translation_unit;
let env = &mut Env::new();
assert!(translation_unit(
r"
typedef int a;
int foo() {
int x = (enum {a})1;
_Atomic... | rust_cleaned_test_functions.jsonl/107576 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 338
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31054,
7480,
9606,
23199,
368,
341,
262,
442,
18567,
3055,
7618,
12440,
82949,
6891,
624,
262,
990,
6729,
486,
3053,
14832,
280,
262,
1077,
6105,
284,
609,
6984,
37039,
486,
931,
543,
1066,
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_stft_pad_truncate_win_length_1() {
_test_stft(10, 7, Some(2), Some(5), None, PadMode::Truncate).unwrap();
} | rust_cleaned_test_functions.jsonl/104786 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 66
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1261,
723,
30290,
3547,
26900,
25672,
5118,
62,
16,
368,
341,
262,
716,
1944,
1261,
723,
7,
16,
15,
11,
220,
22,
11,
4329,
7,
17,
701,
4329,
7,
20,
701,
2240,
11,
25299,
3636,
486,
1282,
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 |
#[test]
fn test_parse_type_expression_tvar() {
let mut p = Parser::new(r#"A"#);
let parsed = p.parse_type_expression();
let loc = Locator::new(&p.source[..]);
assert_eq!(
parsed,
TypeExpression {
base: BaseNode {
location: loc.get(1, 1, 1, 2),
... | rust_cleaned_test_functions.jsonl/67814 | {
"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,
21039,
1819,
28068,
528,
947,
368,
341,
262,
1077,
5206,
281,
284,
21102,
486,
931,
2601,
55543,
32,
57676,
317,
262,
1077,
15676,
284,
281,
4632,
1819,
28068,
543,
262,
1077,
1329,
284,
98653,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_seek_terminated() {
let bitset = BitSet::with_max_value(1000);
let mut empty = BitSetDocSet::from(bitset);
assert_eq!(empty.seek(TERMINATED), TERMINATED)
} | rust_cleaned_test_functions.jsonl/13266 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 95
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74473,
62,
68659,
368,
341,
286,
1077,
2699,
746,
284,
57227,
486,
4197,
6345,
3142,
7,
16,
15,
15,
15,
317,
286,
1077,
5206,
4287,
284,
57227,
9550,
1649,
486,
1499,
54672,
746,
317,
286,
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 |
#[test]
fn test_timestamp_from_json_milliseconds() {
let schema = Schema::new(vec![Field::new(
"a",
DataType::Timestamp(TimeUnit::Millisecond, None),
true,
)]);
let builder = ReaderBuilder::new()
.with_schema(Arc::new(schema))
... | rust_cleaned_test_functions.jsonl/29466 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 696
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23073,
5673,
9455,
717,
56194,
368,
341,
286,
1077,
10802,
284,
12539,
486,
931,
25592,
20703,
1877,
486,
931,
1006,
310,
330,
64,
756,
310,
33172,
486,
20812,
36968,
4562,
486,
12328,
45866,
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_contains_rect() {
let rect = Rectangle::new((5.0, 10.0), (20.0, 30.0));
// Contains itself
let r = Rectangle::new((5.0, 10.0), (20.0, 30.0));
assert!(rect.contains_rect(&r), "{:?}", r);
// Contains rect on one of its edges
let r = Rectangle::new(... | rust_cleaned_test_functions.jsonl/44166 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 508
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
63598,
16979,
368,
341,
286,
1077,
7608,
284,
19280,
486,
931,
1188,
20,
13,
15,
11,
220,
16,
15,
13,
15,
701,
320,
17,
15,
13,
15,
11,
220,
18,
15,
13,
15,
3237,
286,
442,
30811,
5086,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_table_alias() -> Result<()> {
// Alias on from
let query: Query = parse(
r###"
from e = employees
join salaries side:left [salaries.emp_no == e.emp_no]
group [e.emp_no] (
aggregate [
emp_salary = ... | rust_cleaned_test_functions.jsonl/62562 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 437
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5237,
35947,
368,
1464,
5714,
71698,
341,
286,
442,
58040,
389,
504,
198,
286,
1077,
3239,
25,
11361,
284,
4715,
1006,
310,
435,
14374,
698,
310,
504,
384,
284,
8256,
198,
310,
5138,
36432,
3108... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_reserve_shrink_to_fit() {
let mut m = HashMap::new();
m.insert(0, 0);
m.remove(&0);
assert!(m.capacity() >= m.len());
for i in 0..128 {
m.insert(i, i);
}
m.reserve(256);
let usable_cap = m.capacity();
for i in 1... | rust_cleaned_test_functions.jsonl/8517 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 521
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
89591,
3712,
34365,
2346,
32416,
368,
341,
286,
1077,
5206,
296,
284,
10528,
486,
931,
543,
286,
296,
7030,
7,
15,
11,
220,
15,
317,
286,
296,
4850,
2099,
15,
317,
286,
2060,
10297,
76,
59168,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_sparse_checkout() {
let settings = testutils::user_settings();
let mut test_workspace = testutils::init_workspace(&settings, false);
let repo = &test_workspace.repo;
let working_copy_path = test_workspace.workspace.workspace_root().clone();
let root_file1_path = RepoPath::fr... | rust_cleaned_test_functions.jsonl/16324 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1879
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71123,
68186,
368,
341,
262,
1077,
5003,
284,
1273,
6031,
486,
872,
10853,
543,
262,
1077,
5206,
1273,
75560,
284,
1273,
6031,
486,
2327,
75560,
2099,
6511,
11,
895,
317,
262,
1077,
15867,
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_iter_categorical() {
use crate::reset_string_cache;
use crate::SINGLE_LOCK;
let _lock = SINGLE_LOCK.lock();
reset_string_cache();
let ca = Utf8Chunked::new("", &[Some("foo"), None, Some("bar"), Some("ham")]);
let ca = ca.cast(&DataType::Categorical... | rust_cleaned_test_functions.jsonl/15558 | {
"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,
11723,
87455,
368,
341,
286,
990,
17717,
486,
9716,
3904,
11529,
280,
286,
990,
17717,
486,
50,
25696,
27661,
280,
286,
1077,
716,
1023,
284,
66759,
27661,
21003,
543,
286,
7585,
3904,
11529,
543,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_setup_regs() {
let hv = hypervisor::new().unwrap();
let vm = hv.create_vm().unwrap();
let vcpu = vm.create_vcpu(0, None).unwrap();
let regions = vec![(
GuestAddress(layout::RAM_64BIT_START),
(layout::FDT_MAX_SIZE + 0x1000) as usize,
... | rust_cleaned_test_functions.jsonl/38427 | {
"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,
21363,
36910,
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,
2520,
2273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pos_numbers() {
test_pos_number(b"\x00", 0);
test_pos_number(b"\x01", 1);
test_pos_number(b"\x0a", 10);
test_pos_number(b"\x17", 23);
test_pos_number(b"\x18\x18", 24);
test_pos_number(b"\x18\x19", 25);
test_pos_number(b"\x18\x64", 100);
test_pos_number(b"\x19\x03\... | rust_cleaned_test_functions.jsonl/62579 | {
"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,
6479,
32964,
368,
341,
262,
1273,
6479,
5500,
1883,
11934,
87,
15,
15,
497,
220,
15,
317,
262,
1273,
6479,
5500,
1883,
11934,
87,
15,
16,
497,
220,
16,
317,
262,
1273,
6479,
5500,
1883,
11934,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_submit_payment_through_credential_request() {
init!("true");
use utils::libindy::payments::get_wallet_token_info;
let balance = get_wallet_token_info().unwrap().get_balance();
assert!(balance > 0);
let mut cred = create_credential_with_price(5);
as... | rust_cleaned_test_functions.jsonl/82318 | {
"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,
31674,
26696,
87399,
666,
30320,
7893,
368,
341,
286,
2930,
17223,
1866,
797,
286,
990,
12439,
486,
2740,
48990,
486,
63043,
486,
455,
62308,
6458,
3109,
280,
286,
1077,
8172,
284,
633,
62308,
645... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ansi_iterator() {
let input = "\x1B[48;2;5;10;15m\x1B[38;2;70;130;180mhi\x1B[0m";
let ansistring = ANSIParser::default().parse_ansi(input);
let mut it = ansistring.iter();
let attr = Attr {
fg: Color::Rgb(70, 130, 180),
bg: Color::Rgb(5, 10... | rust_cleaned_test_functions.jsonl/92161 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 306
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
52067,
13491,
368,
341,
286,
1077,
1946,
284,
2917,
87,
16,
33,
58,
19,
23,
26,
17,
26,
20,
26,
16,
15,
26,
16,
20,
76,
3462,
16,
33,
58,
18,
23,
26,
17,
26,
22,
15,
26,
16,
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_size_vec() {
assert_eq!(size_vec(vec![1, 2, 3]), vec![0, 0, 0, 3, 1, 2, 3]);
} | rust_cleaned_test_functions.jsonl/32373 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 67
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2368,
13251,
368,
341,
286,
2060,
10714,
10297,
2141,
13251,
25592,
20703,
16,
11,
220,
17,
11,
220,
18,
9719,
7486,
20703,
15,
11,
220,
15,
11,
220,
15,
11,
220,
18,
11,
220,
16,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_is_not_null_function() -> Result<()> {
let tests = vec![ScalarFunctionTest {
name: "is-not-null-passed",
columns: vec![Series::from_data(vec![Some(1i32), Some(0i32), None])],
expect: Series::from_data(vec![true, true, false]),
error: "",
}];
test_scal... | rust_cleaned_test_functions.jsonl/58909 | {
"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,
6892,
7913,
15162,
9174,
368,
1464,
5714,
71698,
341,
262,
1077,
7032,
284,
7486,
20703,
20639,
5152,
2271,
341,
286,
829,
25,
330,
285,
29169,
60341,
46967,
291,
756,
286,
8147,
25,
7486,
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... | 2 |
#[test]
fn test_empty_block_segment_postings() {
let mut postings = BlockSegmentPostings::empty();
assert!(postings.docs().is_empty());
assert_eq!(postings.doc_freq(), 0);
postings.advance();
assert!(postings.docs().is_empty());
assert_eq!(postings.doc_freq(), 0);... | rust_cleaned_test_functions.jsonl/40748 | {
"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,
15124,
7113,
28061,
6333,
819,
368,
341,
286,
1077,
5206,
74481,
284,
8362,
21086,
4133,
819,
486,
3194,
543,
286,
2060,
10297,
2203,
819,
71339,
1005,
285,
15124,
1423,
286,
2060,
10714,
10297,
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_handcrafted() {
let fixture = load_fixture("handcrafted");
let report: AppleCrashReport = fixture.parse().unwrap();
insta::assert_yaml_snapshot!("handcrafted", &report);
} | rust_cleaned_test_functions.jsonl/71678 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 75
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23194,
79794,
368,
341,
262,
1077,
12507,
284,
2795,
74409,
445,
10661,
79794,
797,
262,
1077,
1895,
25,
8162,
16001,
988,
10361,
284,
12507,
4632,
1005,
15454,
543,
262,
1761,
64,
486,
2207,
6438... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_arguments_diagnostics_color() {
fn get_color_mode(color_flag: &str) -> ColorMode {
let args = stringvec!["-c", "foo.c", color_flag];
match parse_arguments_(args, false) {
CompilerArguments::Ok(args) => args.color_mode,
o => pa... | rust_cleaned_test_functions.jsonl/17752 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 359
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
43433,
814,
18938,
6714,
368,
341,
286,
5168,
633,
6714,
7302,
13441,
10933,
25,
609,
495,
8,
1464,
3478,
3636,
341,
310,
1077,
2827,
284,
914,
4083,
0,
1183,
12,
66,
497,
330,
7975,
52... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_destroy() -> Result<(), Error> {
let mut i = MemRegistry::new().indexed_no_reentrance()?;
let _ = block_on(|res| i.register("stream", "", "", res))?;
// Normal case: destroy registered stream.
assert_eq!(block_on(|res| i.destroy("stream", res)), Ok(true));
... | rust_cleaned_test_functions.jsonl/39866 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 450
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18066,
368,
1464,
5714,
68843,
4600,
29,
341,
286,
1077,
5206,
600,
284,
13550,
15603,
486,
931,
1005,
97473,
6536,
1288,
23745,
681,
368,
69493,
286,
1077,
716,
284,
2504,
4470,
22428,
416,
91,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_replace_split_self_for_target() {
check_assist(
replace_qualified_name_with_use,
"
use std::fmt::Debug;
impl std::fmt<|> for Foo {
}
",
"
use std::fmt::{self, Debug};
impl fmt<|> for Foo {
}
",
);
} | rust_cleaned_test_functions.jsonl/19569 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 158
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10633,
17052,
25637,
5478,
11123,
368,
341,
286,
1779,
12083,
380,
1006,
310,
8290,
62,
36335,
1269,
6615,
15951,
345,
310,
6228,
810,
1460,
486,
12501,
486,
7939,
401,
6383,
1460,
486,
12501,
27,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_version_long() {
let oup = exec_target(TARGET_EXE_PATH, &["--version"]);
assert_eq!(oup.stderr, "");
assert_eq!(oup.stdout, version_msg!());
assert_eq!(oup.status.success(), true);
} | rust_cleaned_test_functions.jsonl/67521 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 119
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9438,
17799,
368,
341,
286,
1077,
5908,
79,
284,
3883,
11123,
4140,
16474,
4966,
36,
7944,
11,
609,
1183,
313,
4366,
15049,
286,
2060,
10714,
10297,
13346,
34742,
11,
14498,
286,
2060,
10714,
1029... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_gautami() {
run_test(
&TEST_DATA,
"harfbuzz/good-gautami.te",
"telugu/gautami.ttf",
&[JOINER_GLYPH_INDEX],
74,
);
} | rust_cleaned_test_functions.jsonl/91175 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 214
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
2717,
10606,
368,
341,
394,
1598,
4452,
1006,
503,
609,
10033,
7896,
345,
503,
330,
12982,
10798,
8889,
4846,
1386,
2371,
2717,
10606,
31853,
756,
503,
330,
22924,
29785,
4846,
2717,
10606,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_ecu_id_parser() {
let expected: IResult<&[u8], &str> = Ok((&[], "ecu1"));
assert_eq!(expected, parse_ecu_id(b"ecu1"));
assert_eq!(
Err(nom::Err::Incomplete(nom::Needed::Size(1))),
parse_ecu_id(b"ecu")
);
} | rust_cleaned_test_functions.jsonl/73183 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 168
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36844,
84,
842,
18517,
368,
341,
286,
1077,
3601,
25,
358,
2077,
52244,
58,
84,
23,
1125,
609,
495,
29,
284,
7622,
42902,
12995,
330,
757,
84,
16,
4010,
286,
2060,
10714,
10297,
7325,
11,
4715... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_status_codes() {
use std::collections::HashSet;
// Make sure that within the 0-EXECUTION_STATUS_MAX_CODE that all of the status codes succeed
for possible_major_status_code in 0..=EXECUTION_STATUS_MAX_CODE {
if STATUS_CODE_VALUES.contains(&possible_major_status_code) {
... | rust_cleaned_test_functions.jsonl/22801 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 677
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4773,
38482,
368,
341,
262,
990,
1460,
486,
51137,
486,
44601,
280,
262,
442,
7405,
2704,
429,
2878,
279,
220,
15,
12,
46340,
28617,
9348,
6806,
10020,
429,
678,
315,
279,
2639,
13912,
11996,
72... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_exchange_code_fails_gracefully_on_transport_error() {
let client = BasicClient::new(
ClientId::new("aaa".to_string()),
Some(ClientSecret::new("bbb".to_string())),
AuthUrl::new(Url::parse("http://auth").unwrap()),
Some(TokenUrl::new(Url::parse("http://token").u... | rust_cleaned_test_functions.jsonl/12780 | {
"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,
59212,
4136,
761,
6209,
15682,
578,
3641,
4470,
46398,
4096,
368,
341,
262,
1077,
2943,
284,
14625,
2959,
486,
931,
1006,
286,
8423,
764,
486,
931,
445,
32646,
3263,
983,
3904,
14702,
286,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_transitions_visual_select() {
let mut vm: VimMachine<KeyEvent> = VimMachine::default();
let mut ctx = VimContext::default();
// Test charwise shapes.
ctx.persist.shape = Some(TargetShape::CharWise);
vm.input_key(key!('v'));
assert_pop2!(vm, CURRE... | rust_cleaned_test_functions.jsonl/74567 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1002
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7965,
5930,
64630,
13051,
368,
341,
286,
1077,
5206,
10995,
25,
94484,
21605,
42003,
1556,
29,
284,
94484,
21605,
486,
2258,
543,
286,
1077,
5206,
5635,
284,
94484,
1972,
486,
2258,
1428,
286,
442... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mark_valid_then_ancestor_invalid() {
let forks = tr(0) / (tr(1) / (tr(2) / (tr(3) / (tr(4) / (tr(5) / tr(6))))));
let mut heaviest_subtree_fork_choice = HeaviestSubtreeForkChoice::new_from_tree(forks);
let duplicate_confirmed_slot: Slot = 4;
let duplicate_confirme... | rust_cleaned_test_functions.jsonl/70831 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 258
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18924,
8337,
68367,
62,
66878,
31433,
368,
341,
286,
1077,
73574,
284,
489,
7,
15,
8,
608,
320,
376,
7,
16,
8,
608,
320,
376,
7,
17,
8,
608,
320,
376,
7,
18,
8,
608,
320,
376,
7,
19,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_32f_is_0c() {
// Arrange
let fahren: f32 = 32f32;
let expected_celsius: f32 = 0f32;
let actual_celsius;
// Act
actual_celsius = f_to_c(fahren);
// Assert
assert!(expected_celsius == actual_celsius)
} | rust_cleaned_test_functions.jsonl/126690 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 113
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
18,
17,
69,
6892,
62,
15,
66,
368,
341,
197,
322,
40580,
198,
10217,
282,
21176,
25,
282,
18,
17,
284,
220,
18,
17,
69,
18,
17,
280,
10217,
3601,
666,
40247,
25,
282,
18,
17,
284,
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_set_ratelimiter_bytes_per_second() {
let path = tempdir_with_prefix("_rust_rocksdb_test_set_rate_limiter_bytes_per_second");
let mut opts = DBOptions::new();
opts.create_if_missing(true);
// compaction and flush rate limited below 100MB/sec
opts.set_ratelimiter(100 * 1024 * 1... | rust_cleaned_test_functions.jsonl/34091 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 247
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
70475,
301,
17700,
12524,
5678,
29644,
368,
341,
262,
1077,
1815,
284,
2730,
3741,
6615,
13974,
16975,
35788,
26608,
14553,
1999,
4452,
2602,
9246,
907,
17700,
12524,
5678,
29644,
797,
262,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_blockhash_query_new_ok() {
let blockhash = hash(&[1u8]);
let nonce_pubkey = Pubkey::new(&[1u8; 32]);
assert_eq!(
BlockhashQuery::new(Some(blockhash), true, None),
BlockhashQuery::None(blockhash),
);
assert_eq!(
Blockhas... | rust_cleaned_test_functions.jsonl/16475 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 607
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7113,
8296,
5738,
5921,
19817,
368,
341,
286,
1077,
2504,
8296,
284,
5175,
2099,
58,
16,
84,
23,
2558,
286,
1077,
39676,
34014,
792,
284,
22611,
792,
486,
931,
2099,
58,
16,
84,
23,
26,
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_position_reread_anchor_different_than_block() -> crate::Result<()> {
let positions_delta: Vec<u32> = (0..2_000_000).collect();
let positions_data = create_positions_data(&positions_delta[..])?;
assert_eq!(positions_data.len(), 5003499);
let mut position_reader = P... | rust_cleaned_test_functions.jsonl/110174 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 329
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9661,
1710,
485,
329,
56532,
82741,
51613,
7113,
368,
1464,
17717,
486,
2077,
71698,
341,
286,
1077,
9892,
26710,
25,
11312,
34837,
18,
17,
29,
284,
320,
15,
496,
17,
62,
15,
15,
15,
62,
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... | 5 |
#[test]
fn test_parsing_with_logging() {
let mut parser = Parser::new();
parser.set_language(get_language("rust")).unwrap();
let mut messages = Vec::new();
parser.set_logger(Some(Box::new(|log_type, message| {
messages.push((log_type, message.to_string()));
})));
parser
... | rust_cleaned_test_functions.jsonl/15857 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 351
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
28598,
6615,
59982,
368,
341,
262,
1077,
5206,
6729,
284,
21102,
486,
931,
543,
262,
6729,
980,
29021,
5433,
29021,
445,
35788,
15197,
15454,
1428,
262,
1077,
5206,
6605,
284,
11312,
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... | 2 |
#[test]
fn test_get_spl_token_owner_filter() {
let owner = Pubkey::new_unique();
assert_eq!(
get_spl_token_owner_filter(
&Pubkey::from_str("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA").unwrap(),
&[
RpcFilterType::Memcmp(Memcmp {
... | rust_cleaned_test_functions.jsonl/3062 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 963
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
643,
500,
6458,
29027,
8727,
368,
341,
286,
1077,
6372,
284,
22611,
792,
486,
931,
21218,
543,
286,
2060,
10714,
33673,
310,
633,
643,
500,
6458,
29027,
8727,
1006,
394,
609,
29162,
792,
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_string() -> Result<(), Box<EvalAltResult>> {
let engine = Engine::new();
assert_eq!(
engine.eval::<String>(r#""Test string: \u2764""#)?,
"Test string: ❤"
);
assert_eq!(
engine.eval::<String>("\"Test\rstring: \\u2764\"")?,
"Test\rstring: ❤"
);
... | rust_cleaned_test_functions.jsonl/69063 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1291
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3904,
368,
1464,
5714,
68843,
8261,
23835,
831,
26017,
2077,
2452,
341,
262,
1077,
4712,
284,
8200,
486,
931,
1428,
262,
2060,
10714,
33673,
286,
4712,
31710,
27638,
703,
2235,
81,
2,
3014,
2271,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ignore_non_admin_sender() {
// Set up dispatcher and mock sender
let mock_sender = MockSender::new();
let mut dispatcher = Dispatcher::new(Box::new(mock_sender.clone()));
let table = RoutingTable::default();
let reader: Box<dyn RoutingTableReader> = Box::... | rust_cleaned_test_functions.jsonl/128131 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1601
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58493,
21637,
12207,
54356,
368,
341,
286,
442,
2573,
705,
38799,
323,
7860,
4646,
198,
286,
1077,
7860,
54356,
284,
14563,
20381,
486,
931,
543,
286,
1077,
5206,
38799,
284,
58969,
486,
931,
6775... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_guild_channel_kind() {
assert_eq!(
GuildChannel::Category(guild_category()).kind(),
ChannelType::GuildCategory
);
assert_eq!(
GuildChannel::Stage(guild_stage()).kind(),
ChannelType::GuildStageVoice
);
assert_... | rust_cleaned_test_functions.jsonl/54431 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 288
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
1498,
14571,
33162,
368,
341,
286,
2060,
10714,
33673,
310,
32492,
9629,
486,
6746,
92103,
11847,
6011,
15314,
3148,
310,
13434,
929,
486,
72574,
6746,
198,
286,
1439,
286,
2060,
10714,
33673,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_display_mock_matching_multiple_headers() {
let mock = mock("GET", "/")
.match_header("content-type", "text")
.match_header("content-length", Matcher::Regex(r"\d+".to_string()))
.match_header("authorization", Matcher::Any)
.match_header("x-request-id", Matcher:... | rust_cleaned_test_functions.jsonl/82423 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 224
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14825,
34134,
70763,
45233,
26719,
368,
341,
262,
1077,
7860,
284,
7860,
445,
3806,
497,
3521,
1138,
286,
659,
6347,
8757,
445,
1796,
10604,
497,
330,
1318,
1138,
286,
659,
6347,
8757,
445,
1796,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_seq_unsigned_long_long() {
check(Vec::<u64>::new(), Some(4));
check(vec![0u64, 1, 2], Some(4 + 4 + 8 * 3));
} | rust_cleaned_test_functions.jsonl/79661 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 72
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14486,
67830,
17799,
17799,
368,
341,
262,
1779,
49923,
27638,
84,
21,
19,
6831,
931,
1507,
4329,
7,
19,
1106,
262,
1779,
25592,
20703,
15,
84,
21,
19,
11,
220,
16,
11,
220,
17,
1125,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_big_bitv_tests() {
let v = from_bytes([ // 88 bits
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0]);
assert!(!v.all());
assert!(!v.any());
assert!(v.none());
let v = from_bytes([ // 88 bits
0, 0, 0b00010100, 0,
... | rust_cleaned_test_functions.jsonl/12163 | {
"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,
36386,
13996,
85,
32509,
368,
341,
286,
1077,
348,
284,
504,
12524,
2561,
442,
220,
23,
23,
9472,
198,
310,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
345,
310,
220,
15,
11,
220,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_override_struct_variant_width_exceeds_max_width() {
let mut config = Config::default();
config.override_value("struct_variant_width", "101");
assert_eq!(config.struct_variant_width(), 100);
} | rust_cleaned_test_functions.jsonl/130661 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 119
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48576,
15126,
46112,
7927,
2702,
4635,
82,
6345,
7927,
368,
341,
310,
1077,
5206,
2193,
284,
5532,
486,
2258,
543,
310,
2193,
96802,
3142,
445,
1235,
46112,
7927,
497,
330,
16,
15,
16,
797,
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 |
#[test]
fn test_sealing_and_unsealing() {
let ciphertext =
symmetric::seal(EncryptionAlg::AES256GCM, &ENCRYPTION_KEY, &NONCE, PLAINTEXT).unwrap();
let plaintext = symmetric::unseal(EncryptionAlg::AES256GCM, &ENCRYPTION_KEY, &ciphertext)
.unwrap();
assert_eq!(Vec... | rust_cleaned_test_functions.jsonl/63417 | {
"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,
3453,
6132,
8378,
4907,
325,
6132,
368,
341,
286,
1077,
69789,
4035,
310,
54343,
486,
325,
278,
7,
79239,
86895,
486,
69168,
17,
20,
21,
38,
9985,
11,
609,
953,
35462,
6578,
6600,
11,
609,
295... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_update_new_leader_schedule_epoch() {
let (vote_tracker, bank, _, _) = setup();
// Check outdated slots are purged with new root
let leader_schedule_epoch = bank.get_leader_schedule_epoch(bank.slot());
let next_leader_schedule_epoch = leader_schedule_epoch + 1;
... | rust_cleaned_test_functions.jsonl/32274 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 794
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
5921,
79991,
34530,
20682,
368,
341,
286,
1077,
320,
29358,
50264,
11,
6073,
11,
8358,
27439,
284,
6505,
1428,
286,
442,
4248,
40526,
15711,
525,
3999,
3556,
448,
501,
3704,
198,
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_to_str_unicode() {
Python::with_gil(|py| {
let s = "哈哈🐈";
let obj: PyObject = PyString::new(py, s).into();
let py_string = <PyString as PyTryFrom>::try_from(obj.as_ref(py)).unwrap();
assert_eq!(s, py_string.to_str().unwrap());
})
... | rust_cleaned_test_functions.jsonl/118018 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 180
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
2895,
54662,
368,
341,
286,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
341,
310,
1077,
274,
284,
330,
100323,
146833,
876,
310,
1077,
2839,
25,
15891,
284,
5355,
703,
486,
931,
46827,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_stakes() {
let validators = vec![0, 0, 0, 0];
// init 4 validators stakes
assert!(select_winner(&validators, 0).is_none());
assert!(select_winner(&validators, 2).is_none());
assert!(select_winner(&validators, 5).is_none());
} | rust_cleaned_test_functions.jsonl/129482 | {
"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,
15124,
1261,
2050,
368,
341,
286,
1077,
38588,
284,
7486,
20703,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
935,
286,
442,
2930,
220,
19,
38588,
44425,
271,
286,
2060,
10297,
1742,
92588,
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... | 1 |
#[test]
fn test_collisions_query() {
// Query shouldn't affect things when rankless.
assert!(rankless_route_collisions(&["/hello?<foo>", "/hello"]));
assert!(rankless_route_collisions(&["/<a>?foo=bar", "/hello?foo=bar&cat=fat"]));
assert!(rankless_route_collisions(&["/<a>?foo=bar... | rust_cleaned_test_functions.jsonl/25740 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 360
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43597,
6805,
5738,
368,
341,
286,
442,
11361,
13133,
944,
7802,
2513,
979,
7077,
1717,
624,
286,
2060,
10297,
13129,
1717,
28109,
43597,
6805,
2099,
1183,
14,
14990,
75414,
7975,
21156,
3521,
14990,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_canonicalize_rootfs() {
let rootfs_name = "rootfs";
let bundle = tempfile::tempdir().expect("failed to create tmp test bundle dir");
let rootfs_absolute_path = bundle.path().join(rootfs_name);
assert!(
rootfs_absolute_path.is_absolute(),
"r... | rust_cleaned_test_functions.jsonl/63324 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 854
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27421,
22391,
551,
12993,
3848,
368,
341,
286,
1077,
3704,
3848,
1269,
284,
330,
2888,
3848,
876,
286,
1077,
12894,
284,
54819,
486,
3888,
3741,
1005,
17119,
445,
16091,
311,
1855,
4174,
1273,
128... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_zero_terminated_failure() {
new_ucmd!()
.arg("-z")
.arg("-c")
.arg("zero-terminated.txt")
.fails()
.stdout_is("sort: zero-terminated.txt:2: disorder: ../../fixtures/du\n");
} | rust_cleaned_test_functions.jsonl/82930 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 132
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
19359,
62,
68659,
43618,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
858,
13645,
89,
1138,
286,
659,
858,
13645,
66,
1138,
286,
659,
858,
445,
14154,
12,
68659,
3909,
1138,
286,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mmds() {
let mut mmds = Mmds::new().unwrap();
assert_eq!(
mmds.check_data_store_initialized().unwrap_err().to_string(),
"The MMDS data store is not initialized.".to_string(),
);
let mut mmds_json = "{\"meta-data\":{\"iam\":\"dummy\"},\"us... | rust_cleaned_test_functions.jsonl/40962 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 428
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
2277,
82,
368,
341,
286,
1077,
5206,
296,
2277,
82,
284,
386,
2277,
82,
486,
931,
1005,
15454,
1428,
286,
2060,
10714,
33673,
310,
296,
2277,
82,
9093,
1769,
14809,
62421,
1005,
15454,
9266... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vcx_issuer_revoke_credential() {
init!("true");
settings::set_config_value(settings::CONFIG_INSTITUTION_DID, DEFAULT_DID);
let handle = issuer_credential::from_string(&issuer_credential_state_accepted()).unwrap();
// send the credential
let cb = return_ty... | rust_cleaned_test_functions.jsonl/66780 | {
"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,
2273,
25844,
62,
66817,
1288,
7621,
666,
30320,
368,
341,
286,
2930,
17223,
1866,
797,
286,
5003,
486,
746,
5332,
3142,
23369,
486,
24652,
2158,
25765,
28617,
1557,
915,
11,
11955,
1557,
915,
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_ptrace() {
require_capability!("test_ptrace", CAP_SYS_PTRACE);
let err = ptrace::attach(getpid()).unwrap_err();
assert!(err == Errno::EPERM || err == Errno::EINVAL ||
err == Errno::ENOSYS);
} | rust_cleaned_test_functions.jsonl/33733 | {
"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,
4348,
578,
368,
341,
9401,
262,
1373,
89686,
17223,
1944,
4348,
578,
497,
26101,
26783,
20657,
5576,
317,
262,
1077,
1848,
284,
10087,
578,
486,
16330,
5433,
10412,
6011,
15454,
9266,
543,
262,
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... | 3 |
#[test]
fn test_inits_config_from_env_variables() {
setup();
env::set_var("DB_HOST", "localhost");
env::set_var("DB_PORT", "5432");
let config = Config::init().unwrap();
assert_eq!(config.db_host, "localhost");
assert_eq!(config.db_port, 5432u16);
} | rust_cleaned_test_functions.jsonl/66851 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 123
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
1199,
5332,
5673,
15879,
28182,
368,
341,
262,
6505,
1428,
262,
6105,
486,
746,
4612,
445,
3506,
17213,
497,
330,
8301,
797,
262,
6105,
486,
746,
4612,
445,
3506,
12377,
497,
330,
20,
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_flattening() {
use crate::point;
let c1 = QuadraticBezierSegment {
from: point(0.0, 0.0),
ctrl: point(5.0, 0.0),
to: point(5.0, 5.0),
};
let c2 = QuadraticBezierSegment {
from: point(0.0, 0.0),
ctrl: point(50.0, 0.0),
to: point(50... | rust_cleaned_test_functions.jsonl/35187 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 856
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5081,
1587,
6019,
368,
341,
262,
990,
17717,
486,
2768,
401,
262,
1077,
272,
16,
284,
63948,
774,
95050,
21086,
341,
286,
504,
25,
1459,
7,
15,
13,
15,
11,
220,
15,
13,
15,
1326,
286,
23743,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_initial_position() {
let player_bar = Bar::new(
Position::new(0, 0),
Dimensions::new(5, 1),
Dimensions::new(10, 10),
);
assert_eq!(player_bar.position.x(), 0);
assert_eq!(player_bar.position.y(), 8);
} | rust_cleaned_test_functions.jsonl/40728 | {
"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,
15809,
9661,
368,
341,
286,
1077,
2781,
14388,
284,
4716,
486,
931,
1006,
310,
12380,
486,
931,
7,
15,
11,
220,
15,
1326,
310,
32023,
486,
931,
7,
20,
11,
220,
16,
1326,
310,
32023,
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_parse_timestamp_errors() {
run_test_parse_timestamp_errors(
"2001-01",
"invalid input syntax for timestamp: YEAR, MONTH, DAY are all required: \"2001-01\"",
);
run_test_parse_timestamp_errors(
"2001",
"invalid input syntax for timestamp: YEAR, MONTH, D... | rust_cleaned_test_functions.jsonl/55839 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 719
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
23073,
20196,
368,
341,
262,
1598,
4452,
21039,
23073,
20196,
1006,
286,
330,
17,
15,
15,
16,
12,
15,
16,
756,
286,
330,
11808,
1946,
19482,
369,
11441,
25,
50905,
11,
57980,
11,
37688,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_syscall_sol_pubkey() {
let pubkey = Pubkey::from_str("MoqiU1vryuCGQSxFKA1SZ316JdLEFFhoAu6cKUNk7dN").unwrap();
let addr = &pubkey.as_ref()[0] as *const _ as u64;
let compute_meter: Rc<RefCell<dyn ComputeMeter>> =
Rc::new(RefCell::new(MockComputeMeter { remaini... | rust_cleaned_test_functions.jsonl/35330 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1242
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20344,
6659,
53668,
34014,
792,
368,
341,
286,
1077,
95116,
284,
22611,
792,
486,
1499,
2895,
445,
25612,
40187,
52,
16,
85,
884,
84,
8798,
70810,
9770,
26444,
16,
61228,
18,
16,
21,
41,
67,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_encode_decode() {
let content = String::from("ahah, this is hello world!");
let encoded = Arc4::new(b"hello").trans_str(&content.clone());
let decoded = Arc4::new(b"hello").trans_vec(&encoded);
let result = String::from_utf8_lossy(&decoded);
assert!(result... | rust_cleaned_test_functions.jsonl/103706 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 144
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
15227,
368,
341,
286,
1077,
2213,
284,
923,
486,
1499,
445,
1466,
1466,
11,
419,
374,
23811,
1879,
11142,
286,
1077,
20498,
284,
19689,
19,
486,
931,
1883,
1,
14990,
1827,
1458,
2895,
209... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_select() {
let ddl = "
CREATE TABLE clickhouse_test_select (
id Int32,
code String,
date Date,
datetime DateTime
) Engine=Memory";
let block = Block::new()
.column("id", vec![1, 2, 3, 4])
.colu... | rust_cleaned_test_functions.jsonl/30930 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1679
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13051,
368,
341,
262,
1077,
55780,
284,
6228,
286,
30776,
14363,
4205,
7675,
4452,
13051,
2399,
310,
877,
981,
1333,
18,
17,
345,
310,
2038,
257,
923,
345,
310,
2400,
257,
2631,
345,
310,
8874,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_lddw2() {
test_interpreter_and_jit_asm!(
"
lddw r0, 0x0000000080000000
exit",
[],
(),
{ |_vm, res: Result| { res.unwrap() == 0x80000000 } },
2
);
} | rust_cleaned_test_functions.jsonl/58992 | {
"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,
50573,
29406,
17,
368,
341,
262,
1273,
15318,
28637,
8378,
5374,
275,
67529,
33673,
286,
6228,
286,
326,
631,
86,
435,
15,
11,
220,
15,
87,
15,
15,
15,
15,
15,
15,
15,
15,
23,
15,
15,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_closed_loop_with_clean() {
let mut outer = Loop3D::new();
outer.push(Point3D::new(-2., -2., 0.)).unwrap();
outer.push(Point3D::new(0., -2., 0.)).unwrap(); // colinear point
outer.push(Point3D::new(6., -2., 0.)).unwrap();
outer.push(Point3D::new(6., 6.,... | rust_cleaned_test_functions.jsonl/69091 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1071
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
44697,
17198,
6615,
19573,
368,
341,
286,
1077,
5206,
15955,
284,
21359,
18,
35,
486,
931,
543,
286,
15955,
2552,
32737,
18,
35,
486,
931,
4080,
17,
2572,
481,
17,
2572,
220,
15,
13,
457... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_format_patch() {
let patch = format_patch(0, "hello\nworld\n");
expect![[r##"
r#"
hello
world
"#"##]]
.assert_eq(&patch);
let patch = format_patch(4, "single line");
expect![[r##"r#"single line"#"##]... | rust_cleaned_test_functions.jsonl/78996 | {
"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,
8955,
39643,
368,
341,
286,
1077,
10900,
284,
3561,
39643,
7,
15,
11,
330,
14990,
1699,
14615,
1699,
797,
286,
1720,
0,
15505,
81,
565,
698,
310,
435,
2,
698,
394,
23811,
198,
394,
1879,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_iter_rev() {
let size = 10000;
// Forwards
let mut map: BTreeMap<_, _> = (0..size).map(|i| (i, i)).collect();
fn test<T>(size: usize, mut iter: T)
where T: Iterator<Item = (usize, usize)>
{
for i in 0..size {
assert_eq!(iter.size_hint(), (size - ... | rust_cleaned_test_functions.jsonl/49378 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 345
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11723,
38082,
368,
341,
262,
1077,
1379,
284,
220,
16,
15,
15,
15,
15,
401,
262,
442,
1752,
4014,
198,
262,
1077,
5206,
2415,
25,
425,
6533,
2227,
27,
6878,
716,
29,
284,
320,
15,
496,
2141,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_is_utf8_bidi_edge_cases() {
assert!(!is_utf8_bidi(b"\xD5\xBF\x61"));
assert!(!is_utf8_bidi(b"\xD6\x80\x61"));
assert!(!is_utf8_bidi(b"abc"));
assert!(is_utf8_bidi(b"\xD5\xBF\xC2"));
assert!(is_utf8_bidi(b"\xD6\x80\xC2"));
assert!(is_utf8_bidi(b"ab\... | rust_cleaned_test_functions.jsonl/27328 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 221
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
39453,
23,
880,
12278,
17932,
41427,
368,
341,
286,
2060,
0,
3471,
285,
39453,
23,
880,
12278,
1883,
11934,
15764,
20,
3462,
19883,
3462,
21,
16,
4010,
286,
2060,
0,
3471,
285,
39453,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_config_initialize_no_panic() {
let from_pubkey = Pubkey::new_unique();
let config_pubkey = Pubkey::new_unique();
let (_, _config_account) = create_config_account(vec![]);
let instructions =
config_instruction::create_account::<MyConfig>(&from_pubkey, &... | rust_cleaned_test_functions.jsonl/74382 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 250
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5332,
40889,
6536,
620,
31270,
368,
341,
286,
1077,
504,
34014,
792,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
2193,
34014,
792,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
39464,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_line() {
let in_buf = MemReader::new(b"a\nb\nc".to_vec());
let mut reader = BufferedReader::with_capacity(2, in_buf);
assert_eq!(reader.read_line(), Ok("a\n".to_string()));
assert_eq!(reader.read_line(), Ok("b\n".to_string()));
assert_eq!(reader.read_... | rust_cleaned_test_functions.jsonl/52991 | {
"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,
6443,
6528,
368,
341,
286,
1077,
304,
10363,
284,
13550,
5062,
486,
931,
1883,
56693,
1699,
65,
59,
1016,
3263,
983,
13251,
1423,
286,
1077,
5206,
6604,
284,
25568,
486,
4197,
35603,
7,
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_write_time_32_second() {
let expected = vec![
"+----------+",
"| f |",
"+----------+",
"| 00:18:31 |",
"| |",
"+----------+",
];
check_datetime!(i32, DataType::Time32(TimeUnit::Second)... | rust_cleaned_test_functions.jsonl/39720 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 202
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
3009,
62,
18,
17,
29644,
368,
341,
286,
1077,
3601,
284,
7486,
90515,
310,
6630,
15340,
10,
756,
310,
25203,
282,
286,
760,
756,
310,
6630,
15340,
10,
756,
310,
25203,
220,
15,
15,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_addr() {
let mut core = tokio_core::reactor::Core::new().unwrap();
let handle = core.handle();
let cfg = Config::new()
.add_service(&"_http._tcp.localhost".parse().unwrap(),
["127.0.0.1:80".parse::<SocketAddr>().unwrap()][..].into())
.done();
le... | rust_cleaned_test_functions.jsonl/30205 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 252
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7387,
368,
341,
262,
1077,
5206,
6200,
284,
9628,
815,
15467,
486,
2934,
269,
486,
5386,
486,
931,
1005,
15454,
543,
262,
1077,
3705,
284,
6200,
10132,
1428,
262,
1077,
13286,
284,
5532,
486,
93... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unprintable_fields() {
let event = Annotated::new(Event {
environment: Annotated::new(String::from(
"�9�~YY���)�����9�~YY���)�����9�~YY���)�����9�~YY���)�����",
)),
..Default::default()
});
assert!(has_unprintable_fi... | rust_cleaned_test_functions.jsonl/82042 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 586
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
1350,
480,
12132,
368,
341,
286,
1077,
1538,
284,
1527,
87029,
486,
931,
30469,
341,
310,
4573,
25,
1527,
87029,
486,
931,
2242,
486,
1499,
1006,
394,
330,
5691,
24,
5691,
93,
10060,
57332... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nan_comparison() {
fold("NaN < NaN", "false");
fold("NaN >= NaN", "false");
fold("NaN == NaN", "false");
fold("NaN === NaN", "false");
fold("NaN < null", "false");
fold("null >= NaN", "false");
fold("NaN == null", "false");
fold("null != NaN", "true");
fold("... | rust_cleaned_test_functions.jsonl/122162 | {
"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,
73936,
90797,
368,
341,
262,
11555,
445,
22831,
366,
32178,
497,
330,
3849,
797,
262,
11555,
445,
22831,
2604,
32178,
497,
330,
3849,
797,
262,
11555,
445,
22831,
621,
32178,
497,
330,
3849,
797,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_or_string_comparison_and_two_string_comparisons() {
assert_expression!(
r#" "DEF" >= "ABC" AND "DEF" < "GHI" OR "XYZ" = "XYZ" "#,
Expression::BinaryExpression(
Operator::Or,
Box::new(
Expr... | rust_cleaned_test_functions.jsonl/102661 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1425
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8734,
3904,
90797,
8378,
23241,
3904,
2965,
1732,
19379,
368,
341,
310,
2060,
28068,
33673,
394,
435,
55543,
330,
13649,
1,
2604,
330,
25411,
1,
3567,
330,
13649,
1,
366,
330,
38,
23913,
1,
2726... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_broadcast_resolved_ts() {
let cfg = CdcConfig {
min_ts_interval: ReadableDuration(Duration::from_secs(60)),
..Default::default()
};
let mut suite = mock_endpoint(&cfg, None);
// region 3 to conn b.
let mut conn_rxs = vec![... | rust_cleaned_test_functions.jsonl/29100 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2152
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74923,
4918,
8731,
25023,
368,
341,
286,
1077,
13286,
284,
356,
7628,
2648,
341,
310,
1308,
25023,
20541,
25,
4457,
480,
12945,
64114,
486,
1499,
68718,
7,
21,
15,
6965,
310,
5241,
3675,
486,
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... | 4 |
#[test]
fn test_bin() {
for reps in 0..=4 {
let mut bin = Vec::with_capacity(256);
for i in 0..=255u8 {
for _ in 0..reps {
bin.push(i);
}
}
let encoded = encode(&bin);
eprintln!("encoded as {... | rust_cleaned_test_functions.jsonl/121961 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 272
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21816,
368,
341,
286,
369,
40411,
304,
220,
15,
496,
28,
19,
341,
310,
1077,
5206,
9544,
284,
11312,
486,
4197,
35603,
7,
17,
20,
21,
317,
310,
369,
600,
304,
220,
15,
496,
28,
17,
20,
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... | 4 |
#[test]
fn test_read_batch_adjust_after_buffering_page() {
// This test covers scenario when buffering new page results in setting number
// Note: values are chosen to reproduce the issue.
let primitive_type = get_test_int32_type();
let desc = ... | rust_cleaned_test_functions.jsonl/55257 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 585
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
14534,
44153,
19844,
7776,
287,
6129,
368,
341,
286,
442,
1096,
1273,
14521,
15048,
979,
87139,
501,
2150,
3059,
304,
6243,
1372,
8945,
16885,
286,
442,
7036,
25,
2750,
525,
11882,
311,
2280... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_embed_field_count_limit() {
let mut embed = base_embed();
for _ in 0..26 {
embed.fields.push(EmbedField {
inline: true,
name: "a".to_owned(),
value: "a".to_owned(),
});
}
assert!(matches!(
... | rust_cleaned_test_functions.jsonl/4829 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 250
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24007,
5013,
3180,
14763,
368,
341,
286,
1077,
5206,
11579,
284,
2331,
24007,
1428,
286,
369,
716,
304,
220,
15,
496,
17,
21,
341,
310,
11579,
12920,
2552,
7,
25486,
1877,
341,
394,
7381,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_gossip_node() {
//check that a gossip nodes always show up as spies
let (node, _, _) = ClusterInfo::spy_node(&Pubkey::new_rand());
assert!(ClusterInfo::is_spy_node(&node));
let (node, _, _) =
ClusterInfo::gossip_node(&Pubkey::new_rand(), &"1.1.1.1:1111... | rust_cleaned_test_functions.jsonl/12808 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 185
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
41473,
5084,
368,
341,
286,
442,
2028,
429,
264,
57487,
7798,
2677,
1473,
705,
438,
68898,
198,
286,
1077,
320,
3509,
11,
8358,
27439,
284,
35380,
1731,
486,
28191,
5084,
2099,
29162,
792,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_uint_div_no_panic() {
assert_eq!(Uint256::from(6u8) / Uint256::from(2u8), Uint256::from(3u8));
} | rust_cleaned_test_functions.jsonl/118522 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 65
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15807,
16237,
6536,
620,
31270,
368,
341,
262,
2060,
10714,
10297,
21570,
17,
20,
21,
486,
1499,
7,
21,
84,
23,
8,
608,
27883,
17,
20,
21,
486,
1499,
7,
17,
84,
23,
701,
27883,
17,
20,
21,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_unique_attribute() {
let v = to_value(vec![
Foo { a: 1, b: 2 },
Foo { a: 3, b: 3 },
Foo { a: 1, b: 3 },
Foo { a: 0, b: 4 },
])
.unwrap();
let mut args = HashMap::new();
args.insert("attribute".to_string(), to... | rust_cleaned_test_functions.jsonl/62059 | {
"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,
21218,
16791,
368,
341,
286,
1077,
348,
284,
311,
3142,
25592,
90515,
310,
33428,
314,
264,
25,
220,
16,
11,
293,
25,
220,
17,
1153,
310,
33428,
314,
264,
25,
220,
18,
11,
293,
25,
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_deserialize_map_as_raw_bytes() -> Result<()> {
#[derive(Debug, PartialEq, Deserialize)]
struct S(ByteBuf);
let input = "d4:spamd1:a1:bee";
let s: S = from_slice(input.as_bytes())?;
let expected = S(ByteBuf::from(input.as_bytes().to_vec()));
assert... | rust_cleaned_test_functions.jsonl/120783 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 182
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
9050,
5376,
11898,
16067,
12524,
368,
1464,
5714,
71698,
341,
286,
11506,
27098,
42618,
11,
55039,
11,
48440,
5563,
286,
2036,
328,
55823,
15064,
626,
286,
1077,
1946,
284,
330,
67,
19,
25,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_splitn_char_iterator() {
let data = "\nMäry häd ä little lämb\nLittle lämb\n";
let split: Vec<&str> = data.splitn(3, ' ').collect();
assert_eq!(split, vec!["\nMäry", "häd", "ä", "little lämb\nLittle lämb\n"]);
let split: Vec<&str> = data.splitn(3, |c: char| c ==... | rust_cleaned_test_functions.jsonl/46121 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 383
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
77,
9232,
13491,
368,
341,
286,
1077,
821,
284,
2917,
77,
44,
2305,
884,
305,
30875,
12709,
2632,
30005,
3096,
1699,
38103,
30005,
3096,
1699,
3302,
286,
1077,
6718,
25,
11312,
52244,
495,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_example1() {
let pattern = regexp!(
Token::numeric(),
Token::punctuation('-'),
Token::numeric(),
Token::punctuation('-'),
Token::numeric()
);
let expr = expr!(Atom::SubStr {
index: 0,
left: Position::Pos(Token::not_numeric().into(), pattern.clone(), 1),
rig... | rust_cleaned_test_functions.jsonl/14496 | {
"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,
39304,
16,
368,
341,
220,
1077,
5383,
284,
41877,
33673,
262,
9660,
486,
19600,
3148,
262,
9660,
486,
79,
72299,
14654,
3299,
262,
9660,
486,
19600,
3148,
262,
9660,
486,
79,
72299,
14654,
3299,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_merge_isolated_store_with_no_target_peer() {
let mut cluster = new_node_cluster(0, 4);
configure_for_merge(&mut cluster);
ignore_merge_target_integrity(&mut cluster);
cluster.cfg.raft_store.right_derive_when_split = true;
let pd_client = Arc::clone(&cluster.pd_client);
pd... | rust_cleaned_test_functions.jsonl/95197 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 827
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
6892,
80519,
14809,
6615,
6536,
11123,
45159,
368,
341,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
220,
19,
317,
262,
14411,
5478,
20888,
2099,
6984,
10652,
317,
262,
10034,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_read_btf_type_volatile() {
let endianness = Endianness::default();
let data: &[u8] = &[
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x24, 0x00, 0x00, 0x00,
];
match unsafe { BtfType::read(data, endianness) } {
Ok(BtfType::Volatile(_)) =... | rust_cleaned_test_functions.jsonl/98494 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 250
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
880,
8935,
1819,
2273,
25517,
368,
341,
286,
1077,
835,
72,
82033,
284,
3972,
72,
82033,
486,
2258,
543,
286,
1077,
821,
25,
44590,
84,
23,
60,
284,
609,
9640,
310,
220,
15,
87,
15,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_parse_statuscodes() {
let actual = parse_statuscodes("200,204,301").unwrap();
let expected: HashSet<StatusCode> = [
StatusCode::OK,
StatusCode::NO_CONTENT,
StatusCode::MOVED_PERMANENTLY,
]
.iter()
.cloned()
.coll... | rust_cleaned_test_functions.jsonl/116423 | {
"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,
4773,
25814,
368,
341,
286,
1077,
5042,
284,
4715,
4773,
25814,
445,
17,
15,
15,
11,
17,
15,
19,
11,
18,
15,
16,
1827,
15454,
543,
286,
1077,
3601,
25,
18931,
27,
15872,
29,
284,
2278... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_comp_mul() {
assert_eq!(Vector2::new(1i, 2i).comp_mul(), 2i);
assert_eq!(Vector3::new(1i, 2i, 3i).comp_mul(), 6i);
assert_eq!(Vector4::new(1i, 2i, 3i, 4i).comp_mul(), 24i);
assert_eq!(Vector2::new(3.0f64, 4.0f64).comp_mul(), 12.0f64);
assert_eq!(Vector3::new(4.0f64, 5.0f64, ... | rust_cleaned_test_functions.jsonl/5666 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 245
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18177,
24944,
368,
341,
262,
2060,
10714,
10297,
3781,
17,
486,
931,
7,
16,
72,
11,
220,
17,
72,
568,
5689,
24944,
1507,
220,
17,
72,
317,
262,
2060,
10714,
10297,
3781,
18,
486,
931,
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 |
#[test]
fn test_function_application() {
let tests = vec![
("let identity = fn(x) { x; }; identity(5);", 5),
("let identity = fn(x) { return x; }; identity(5);", 5),
("let double = fn(x) { x * 2; }; double(5);", 10),
("let add = fn(x, y) { x + y; }; add(5, 5);", 10),
... | rust_cleaned_test_functions.jsonl/84234 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 288
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9174,
38721,
368,
341,
262,
1077,
7032,
284,
7486,
90515,
286,
3489,
1149,
9569,
284,
5168,
2075,
8,
314,
856,
26,
20066,
9569,
7,
20,
1215,
497,
220,
20,
1326,
286,
3489,
1149,
9569,
284,
516... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 headers = Headers::new();
headers.set(ContentLength(10));
assert_eq!(headers.len(), 1);
headers.set(ContentType(Mime(Text, Plain, vec![])));
assert_eq!(headers.len(), 2);
headers.set(ContentLength(20));
assert_eq!(h... | rust_cleaned_test_functions.jsonl/18247 | {
"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,
6043,
368,
341,
286,
1077,
5206,
7102,
284,
21426,
486,
931,
543,
286,
7102,
980,
79352,
4373,
7,
16,
15,
1106,
286,
2060,
10714,
10297,
7713,
19406,
1507,
220,
16,
317,
286,
7102,
980,
7,
295... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_serialize_info_seldepth() {
let attributes: Vec<UciInfoAttribute> = vec![
UciInfoAttribute::Depth(22),
UciInfoAttribute::SelDepth(17)
];
let m = UciMessage::Info(attributes);
assert_eq!(m.serialize(), "info depth 22 seldepth 17");
} | rust_cleaned_test_functions.jsonl/19056 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 152
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
3109,
34153,
17561,
368,
341,
286,
1077,
8201,
25,
11312,
36397,
5855,
1731,
3907,
29,
284,
7486,
90515,
310,
547,
5855,
1731,
3907,
486,
19776,
7,
17,
17,
1326,
310,
547,
5855,
1731,
390... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vpadding() {
// Generated by hand
let cmd = ChanCmd::VPADDING;
assert_eq!(Into::<u8>::into(cmd), 128_u8);
vbody(cmd, "", &msg::VPadding::new(0).into());
vbody(cmd, "00000000000000000000", &msg::VPadding::new(10).into());
} | rust_cleaned_test_functions.jsonl/6042 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 117
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
9571,
368,
341,
262,
442,
30488,
553,
1424,
198,
262,
1077,
5439,
284,
41302,
15613,
486,
13378,
52478,
280,
262,
2060,
10714,
10297,
26591,
27638,
84,
23,
6831,
18122,
14160,
701,
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_zero_times_mat_equals_zero() {
test_cases().iter().for_each(|test| {
let zero_times_a_mat = Matrix2x2::zero() * test.a_mat;
let zero_times_b_mat = Matrix2x2::zero() * test.b_mat;
assert_eq!(zero_times_a_mat, Matrix2x2::zero());
assert_eq!(... | rust_cleaned_test_functions.jsonl/128958 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 196
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19359,
22353,
16610,
61664,
19359,
368,
341,
286,
1273,
41427,
1005,
2015,
1005,
1958,
32046,
22428,
1944,
91,
341,
310,
1077,
7168,
22353,
4306,
16610,
284,
11631,
17,
87,
17,
486,
14154,
368,
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... | 1 |
#[test]
fn test_option() {
with_graph(|graph| {
let results: (Option<i64>, Option<i64>) = graph.query("RETURN 42, null").unwrap();
assert_eq!(results.0, Some(42));
assert_eq!(results.1, None);
});
} | rust_cleaned_test_functions.jsonl/73405 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9672,
368,
341,
262,
448,
14738,
22428,
4439,
91,
341,
286,
1077,
3059,
25,
320,
5341,
21897,
21,
19,
8066,
6959,
21897,
21,
19,
9231,
284,
4771,
4786,
445,
51533,
220,
19,
17,
11,
845,
1827,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_conde_1() {
let query = proto_vulcan_query!(|q| {
conde {
member(q, [1, 2, 3]),
member(q, [4, 5, 6]),
member(q, [7, 8, 9]),
}
});
let mut iter = query.run();
assert_eq!(iter.next().unwrap().q,... | rust_cleaned_test_functions.jsonl/32312 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 418
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3382,
450,
62,
16,
368,
341,
286,
1077,
3239,
284,
18433,
2273,
360,
4814,
5738,
10297,
91,
80,
91,
341,
310,
390,
450,
341,
394,
4462,
10583,
11,
508,
16,
11,
220,
17,
11,
220,
18,
17036,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_each_mut() {
use crate::UnavailableMutError::*;
let mut map = HashMap::new();
map.insert("foo".to_owned(), 0);
map.insert("bar".to_owned(), 10);
map.insert("baz".to_owned(), 20);
map.insert("qux".to_owned(), 30);
let xs = map.get_each... | rust_cleaned_test_functions.jsonl/106366 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 460
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
32046,
29523,
368,
341,
286,
990,
17717,
486,
92928,
51440,
1454,
79304,
286,
1077,
5206,
2415,
284,
10528,
486,
931,
543,
286,
2415,
7030,
445,
7975,
3263,
983,
51973,
1507,
220,
15,
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_convert_to_big_decimal() {
let decimal = Decimal::new(-24601, -3);
let big_decimal: BigDecimal = decimal.try_into().unwrap();
let double = big_decimal.to_f64().unwrap();
assert_eq!(-24.601, double);
// Any form of negative zero will fail to be converted.
... | rust_cleaned_test_functions.jsonl/41980 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 357
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
2346,
36386,
74429,
368,
341,
286,
1077,
12122,
284,
26728,
486,
931,
4080,
17,
19,
21,
15,
16,
11,
481,
18,
317,
286,
1077,
2409,
74429,
25,
20618,
284,
12122,
48779,
45514,
1005,
15454,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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()
{
let z = crate::cmatrix::COMPLEX_ZERO;
let o = crate::cmatrix::COMPLEX_ONE;
let x = crate::cmatrix::COMPLEX_HSQRT2;
let i = crate::cmatrix::COMPLEX_I;
let mut state = array![
[o, z, x, x],
[z, o, x, -x]
];
... | rust_cleaned_test_functions.jsonl/7273 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 356
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36551,
741,
262,
341,
286,
1077,
1147,
284,
17717,
486,
6226,
2555,
486,
8696,
42136,
39370,
280,
286,
1077,
297,
284,
17717,
486,
6226,
2555,
486,
8696,
42136,
34727,
280,
286,
1077,
856,
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_extract_fields() {
let log = "id=firewall time=\"2021-04-08 11:57:48\" pri=6 fw=10.0.0.9 vpn=ive ivs=Default Network user=usettest1 realm=\"\" roles=\"\" proto=auth src=82.213.178.130 dst= dstname= type=vpn op= arg=\"\" result= sent= rcvd= agent=\"\" duration= msg=\"AUT22673: Logout from... | rust_cleaned_test_functions.jsonl/100541 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 357
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
12132,
368,
341,
286,
1077,
1487,
284,
330,
307,
28,
10796,
16431,
882,
4070,
17,
15,
17,
16,
12,
15,
19,
12,
15,
23,
220,
16,
16,
25,
20,
22,
25,
19,
23,
2105,
12493,
28,
21,
338... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_transaction_log_collector_get_logs_for_address() {
let address = Pubkey::new_unique();
let mut mentioned_address_map = HashMap::new();
mentioned_address_map.insert(address, vec![0]);
let transaction_log_collector = TransactionLogCollector {
mentioned_a... | rust_cleaned_test_functions.jsonl/29007 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 247
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28884,
5224,
10211,
27669,
3062,
42899,
5478,
6744,
368,
341,
286,
1077,
2621,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
5206,
9733,
6744,
5376,
284,
10528,
486,
931,
543,
286,
9733,
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_deserialize() {
let field0 = usize::MAX;
let field1 = format!("FOO_{}", usize::MIN);
let str = format!(r#"{{"field0":{},"field1":"{}"}}"#, field0, field1);
let data = serde_json::from_str::<ArcSwap<Foo>>(&str).unwrap();
assert_eq!(data.load().field0, fiel... | rust_cleaned_test_functions.jsonl/122519 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 435
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
9050,
368,
341,
286,
1077,
2070,
15,
284,
22301,
486,
10586,
280,
286,
1077,
2070,
16,
284,
3561,
17223,
3788,
46,
62,
42351,
22301,
486,
16413,
626,
286,
1077,
607,
284,
3561,
10297,
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_list_repo() -> Result<()> {
let repo = Repo::new(String::from("azmy"));
let lists = repo.list()?;
let mut found: Option<&Flist> = None;
for flist in lists.iter() {
if flist.name == "test.flist" {
found = Some(flist);
br... | rust_cleaned_test_functions.jsonl/47566 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 281
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2019,
37784,
368,
1464,
5714,
71698,
341,
286,
1077,
15867,
284,
71509,
486,
931,
2242,
486,
1499,
445,
1370,
2408,
4010,
286,
1077,
11469,
284,
15867,
6420,
368,
69493,
286,
1077,
5206,
1730,
25,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_needed_labels() {
let insts = parse_and_lex::<Rv32>("bne x0, x0, l1\nl1: jal ra, end\nend: nop");
assert_eq!(insts.len(), 3);
assert_eq!(
insts[0].get_needed_label().unwrap().target,
"l1".to_string()
);
assert_eq!(
insts... | rust_cleaned_test_functions.jsonl/91959 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 234
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57426,
14547,
368,
341,
286,
1077,
1761,
82,
284,
4715,
8378,
74547,
27638,
49,
85,
18,
17,
13211,
65,
811,
856,
15,
11,
856,
15,
11,
326,
16,
1699,
75,
16,
25,
75974,
15122,
11,
835,
1699,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.