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_checked_sub() {
for elm in sum_triples.iter() {
let (aVec, bVec, cVec) = *elm;
let a = BigUint::from_slice(aVec);
let b = BigUint::from_slice(bVec);
let c = BigUint::from_slice(cVec);
assert!(c.checked_sub(&a).unwrap() == b);
... | rust_cleaned_test_functions.jsonl/96904 | {
"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,
56456,
5228,
368,
341,
286,
369,
42205,
304,
2629,
3547,
37458,
19471,
368,
341,
310,
1077,
320,
64,
10050,
11,
293,
10050,
11,
272,
10050,
8,
284,
353,
23162,
280,
310,
1077,
264,
284,
6164,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_png() {
let info = Infer::new();
assert_eq!(infer::Type {
mime: String::from("image/png"),
ext: String::from("png"),
},
info.get(&fs::read("testdata/sample.png").unwrap()).unwrap());
} | rust_cleaned_test_functions.jsonl/110130 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 114
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
61746,
368,
341,
262,
1077,
3546,
284,
62658,
486,
931,
1428,
262,
2060,
10714,
10297,
89559,
486,
929,
314,
715,
286,
45270,
25,
923,
486,
1499,
445,
1805,
35960,
3975,
715,
286,
1303,
25,
923,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_naive_date_time() {
let db = checked_memory_handle();
let date = NaiveDate::from_ymd(2016, 2, 23);
let time = NaiveTime::from_hms(23, 56, 4);
let dt = NaiveDateTime::new(date, time);
db.execute("INSERT INTO foo (t) VALUES (?)", &[&dt])
.unwrap... | rust_cleaned_test_functions.jsonl/15051 | {
"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,
58631,
533,
4164,
3009,
368,
341,
286,
1077,
2927,
284,
10067,
19195,
10630,
543,
286,
1077,
2400,
284,
12812,
533,
1916,
486,
1499,
62,
1600,
67,
7,
17,
15,
16,
21,
11,
220,
17,
11,
220,
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_parse_multi_import() {
let code = String::from("
import std::{
printi,
println
};
");
let mut lexer = Token::lexer(code.as_str());
let parser = Parser::new(code.clone());
let decl_res = parser.parse_import_decl(&mut lexer);
assert... | rust_cleaned_test_functions.jsonl/43194 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 283
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
25133,
18434,
368,
341,
262,
1077,
2038,
284,
923,
486,
1499,
70576,
286,
1159,
1460,
74843,
310,
1173,
72,
345,
310,
13751,
198,
286,
2605,
262,
39887,
262,
1077,
5206,
53259,
284,
9660,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_default_tuple_variant() {
assert_de_tokens(
&DefaultTupleVariant::Tuple(1, 2, 3),
&[
Token::TupleVariant {
name: "DefaultTupleVariant",
variant: "Tuple",
len: 3,
},
Token::I32(1),
... | rust_cleaned_test_functions.jsonl/59133 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 459
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9993,
21773,
46112,
368,
341,
262,
2060,
2259,
28838,
1006,
286,
609,
3675,
28681,
20746,
486,
28681,
7,
16,
11,
220,
17,
11,
220,
18,
1326,
286,
609,
9640,
310,
9660,
486,
28681,
20746,
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_syndromes() {
let w = encode(0b1111111100000000)>>1;
assert_eq!(syndromes(w).degree(), None);
assert_eq!(syndromes(w ^ 1<<60).degree().unwrap(), 21);
} | rust_cleaned_test_functions.jsonl/13864 | {
"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,
58530,
303,
441,
288,
368,
341,
286,
1077,
289,
284,
16164,
7,
15,
65,
16,
16,
16,
16,
16,
16,
16,
16,
15,
15,
15,
15,
15,
15,
15,
15,
54229,
16,
401,
286,
2060,
10714,
10297,
22860,
303... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_join_multiple_columns() {
let (mut df_a, mut df_b) = get_dfs();
// First do a hack with concatenated string dummy column
let mut s = df_a
.column("a")
.unwrap()
.cast(&DataType::Utf8)
.unwrap()
.utf8()
... | rust_cleaned_test_functions.jsonl/10282 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1224
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31017,
45233,
22590,
368,
341,
286,
1077,
320,
6984,
6764,
4306,
11,
5206,
6764,
880,
8,
284,
633,
814,
3848,
1428,
286,
442,
5512,
653,
264,
17086,
448,
97534,
914,
17292,
3250,
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... | 1 |
#[test]
fn test_parse_crate_name_newstyle() {
assert_eq!(
parse_crate_name("<failure::error::Error as core::convert::From<F>>::from"),
Some("failure".into())
);
} | rust_cleaned_test_functions.jsonl/52697 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 110
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
666,
7698,
1269,
5921,
3528,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
666,
7698,
1269,
9639,
28939,
486,
841,
486,
1454,
438,
6200,
486,
14166,
486,
3830,
30499,
77595,
1499,
4461,
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 |
#[test]
fn test_split_single_elem() {
let to_test = vec![1];
let expected = [[1, 0, 0, 0, 0, 0, 0, 0]];
assert_eq!(split(to_test), expected);
} | rust_cleaned_test_functions.jsonl/54016 | {
"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,
17052,
19487,
28179,
368,
341,
286,
1077,
311,
4452,
284,
7486,
20703,
16,
935,
286,
1077,
3601,
284,
4318,
16,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_bench_tps_bank_client() {
let (genesis_config, id) = create_genesis_config(10_000);
let bank = Bank::new(&genesis_config);
let client = Arc::new(BankClient::new(bank));
let mut config = Config::default();
config.id = id;
config.tx_count = 10;
... | rust_cleaned_test_functions.jsonl/93759 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 304
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
19762,
528,
1690,
35733,
8179,
368,
341,
286,
1077,
320,
77894,
5332,
11,
877,
8,
284,
1855,
16322,
13774,
5332,
7,
16,
15,
62,
15,
15,
15,
317,
286,
1077,
6073,
284,
8547,
486,
931,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_template() {
let source = "<h1>{{title}} 你好</h1> {{{content}}}
{{#if date}}<p>good</p>{{else}}<p>bad</p>{{/if}}<img>{{foo bar}}中文你好
{{#unless true}}kitkat{{^}}lollipop{{/unless}}";
let t = Template::compile(source.to_string()).ok().unwrap();
assert_eq!(t.elements.len(), 10);
... | rust_cleaned_test_functions.jsonl/12000 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 952
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
8693,
368,
341,
262,
1077,
2530,
284,
4055,
71,
16,
11764,
2102,
3417,
220,
108386,
522,
71,
16,
29,
47908,
1796,
3417,
532,
2979,
2,
333,
2400,
3417,
27,
79,
29,
18536,
522,
79,
11764,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_from_to_raw_string() {
let alloc = bumpalo::Bump::new();
assert_eq!("Foo", class::from_raw_string(&alloc, "Foo").to_raw_string());
} | rust_cleaned_test_functions.jsonl/55619 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 83
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
2346,
16067,
3904,
368,
341,
286,
1077,
5574,
284,
27575,
12529,
486,
33,
1510,
486,
931,
543,
286,
2060,
10714,
17223,
40923,
497,
536,
486,
1499,
16067,
3904,
2099,
4742,
11,
330,
40923,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_pass_manager_builder() {
let pass_manager_builder = PassManagerBuilder::create();
pass_manager_builder.set_optimization_level(Aggressive);
pass_manager_builder.set_size_level(2);
pass_manager_builder.set_inliner_with_threshold(42);
pass_manager_builder.set_disable_unit_at_a_... | rust_cleaned_test_functions.jsonl/42668 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 789
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15464,
12144,
28532,
368,
341,
262,
1077,
1494,
12144,
28532,
284,
9970,
2043,
3297,
486,
3182,
1428,
262,
1494,
12144,
28532,
980,
15032,
65964,
8274,
4346,
70,
46719,
317,
262,
1494,
12144,
28532,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_delete_all_documents_empty_index() {
let schema_builder = schema::Schema::builder();
let index = Index::create_in_ram(schema_builder.build());
let mut index_writer = index.writer_with_num_threads(4, 12_000_000).unwrap();
let clear = index_writer.delete_all_documen... | rust_cleaned_test_functions.jsonl/21509 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 186
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11353,
5705,
75927,
15124,
3560,
368,
341,
286,
1077,
10802,
28532,
284,
10802,
486,
8632,
486,
17850,
543,
286,
1077,
1922,
284,
8008,
486,
3182,
1243,
62124,
42735,
28532,
13239,
1423,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_connect_timeout() {
let mut s = socket();
s.local_seq_no = LOCAL_SEQ;
s.connect(REMOTE_END, LOCAL_END.port).unwrap();
s.set_timeout(Some(Duration::from_millis(100)));
recv!(s, time 150, Ok(TcpRepr {
control: TcpControl::Syn,
seq_... | rust_cleaned_test_functions.jsonl/91906 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 520
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15720,
20537,
368,
341,
286,
1077,
5206,
274,
284,
7575,
543,
286,
274,
11033,
14486,
6536,
284,
42501,
50045,
280,
286,
274,
10800,
43202,
37528,
10898,
11,
42501,
10898,
14598,
568,
15454,
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_basic_profile() {
let s = vec!["profile1".to_string(), "profile2".to_string()];
let f = Filter::new(2, s, Duration::new(0, 0));
set_filter(f);
profiling_function1();
} | rust_cleaned_test_functions.jsonl/59787 | {
"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,
34729,
13789,
368,
341,
286,
1077,
274,
284,
7486,
0,
1183,
5365,
16,
3263,
983,
3904,
1507,
330,
5365,
17,
3263,
983,
3904,
33800,
286,
1077,
282,
284,
12339,
486,
931,
7,
17,
11,
274,
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_pcipath_to_sysfs() {
let testdir = tempdir().expect("failed to create tmpdir");
let rootbuspath = testdir.path().to_str().unwrap();
let path2 = pci::Path::from_str("02").unwrap();
let path23 = pci::Path::from_str("02/03").unwrap();
let path234 = pci::Path... | rust_cleaned_test_functions.jsonl/53140 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1147
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35612,
573,
587,
2346,
20344,
3848,
368,
341,
286,
1077,
1273,
3741,
284,
2730,
3741,
1005,
17119,
445,
16091,
311,
1855,
4174,
3741,
797,
286,
1077,
3704,
10338,
2343,
284,
1273,
3741,
3875,
1005... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_interval_mul_div() {
// Normal
assert_eq!(
IntervalDT::try_from_dhms(1, 2, 3, 4, 5)
.unwrap()
.mul_f64(5.0)
.unwrap(),
IntervalDT::try_from_dhms(5, 10, 15, 20, 25).unwrap()
);
assert_eq!(
... | rust_cleaned_test_functions.jsonl/51039 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3115
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20541,
24944,
16237,
368,
341,
286,
442,
18437,
198,
286,
2060,
10714,
33673,
310,
40584,
10599,
486,
1539,
5673,
814,
71,
1011,
7,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unicode_encode_error() {
let gil = Python::acquire_gil();
let py = gil.python();
let take_str = wrap_pyfunction!(take_str)(py).unwrap();
py_expect_exception!(
py,
take_str,
"take_str('\\ud800')",
PyUnicodeEncodeError,
"'utf-8' codec can't ... | rust_cleaned_test_functions.jsonl/129655 | {
"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,
54662,
11224,
4096,
368,
341,
262,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
262,
1077,
4510,
284,
342,
321,
43193,
1428,
262,
1077,
1896,
2895,
284,
15061,
40291,
1688,
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_to_str_surrogate() {
Python::with_gil(|py| {
let obj: PyObject = py.eval(r#"'\ud800'"#, None, None).unwrap().into();
let py_string = <PyString as PyTryFrom>::try_from(obj.as_ref(py)).unwrap();
assert!(py_string.to_str().is_err());
})
} | rust_cleaned_test_functions.jsonl/118017 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 163
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
2895,
49946,
48373,
368,
341,
286,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
341,
310,
1077,
2839,
25,
15891,
284,
4510,
31710,
2601,
55543,
15777,
661,
23,
15,
15,
14913,
60778,
2240,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_all_moves_multiple_moves() {
let moves_representation = vec!["R10", "U50", "L20", "D100", "R10", "U50"];
let expected_moves = vec![
Move {
start: START_POINT,
end: Point { x: 10, y: 0 },
move_type: MoveType::Horizont... | rust_cleaned_test_functions.jsonl/44989 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 782
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
5705,
45390,
45233,
45390,
368,
341,
286,
1077,
10797,
94263,
284,
7486,
0,
1183,
49,
16,
15,
497,
330,
52,
20,
15,
497,
330,
43,
17,
15,
497,
330,
35,
16,
15,
15,
497,
330,
49,
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_proportional_instructions_consumption_to_data_size() {
with_test_replica_logger(|log| {
let subnet_type = SubnetType::Application;
let dst: u32 = 0;
let mut payload: Vec<u8> = dst.to_le_bytes().to_vec();
payload.extend(random_payload());
... | rust_cleaned_test_functions.jsonl/72784 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1198
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2540,
403,
3914,
82427,
69870,
560,
2346,
1769,
2368,
368,
341,
286,
448,
4452,
25533,
15317,
27413,
22428,
839,
91,
341,
310,
1077,
51457,
1819,
284,
3719,
4711,
929,
486,
4988,
280,
310,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stream_agg() {
// prepare data and store
let tid = 1;
let idx_id = 1;
let col_infos = vec![
new_col_info(2, FieldTypeTp::VarChar),
new_col_info(3, FieldTypeTp::NewDecimal),
];
// init aggregation meta
let mut aggrega... | rust_cleaned_test_functions.jsonl/109520 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3777
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12673,
83534,
368,
341,
286,
442,
10549,
821,
323,
3553,
198,
286,
1077,
13112,
284,
220,
16,
280,
286,
1077,
7187,
842,
284,
220,
16,
280,
286,
1077,
1375,
47779,
284,
7486,
90515,
310,
501,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_disband_request() {
let mut transport = InprocTransport::default();
let mut orchestrator_transport = transport.clone();
let mut other_listener = transport
.listen("inproc://otherplace:8000")
.expect("Unable to get listener");
let _test_lis... | rust_cleaned_test_functions.jsonl/47894 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2452
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9932,
7053,
7893,
368,
341,
286,
1077,
5206,
7557,
284,
758,
15782,
27560,
486,
2258,
543,
286,
1077,
5206,
65128,
850,
46398,
284,
7557,
15997,
1428,
286,
1077,
5206,
1008,
46493,
284,
7557,
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... | 3 |
#[test]
fn test_merge_single_segment_with_deletes_below_threshold() {
let mut test_merge_policy = test_merge_policy();
test_merge_policy.set_del_docs_ratio_before_merge(0.25f32);
let test_input = vec![create_random_segment_meta(40_000).with_delete_meta(10_000, 1)];
let merge_cand... | rust_cleaned_test_functions.jsonl/57301 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 194
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
19487,
28061,
6615,
2259,
13881,
82750,
21858,
368,
341,
286,
1077,
5206,
1273,
20888,
22773,
284,
1273,
20888,
22773,
543,
286,
1273,
20888,
22773,
980,
18029,
49692,
19917,
23708,
20888,
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_unit_bigendian() {
let mut storage = vec![0; 1024];
type Field1 = PrimitiveField<(), BigEndian, 5>;
type Field2 = PrimitiveField<(), BigEndian, 20>;
Field1::write(&mut storage, ());
Field2::write(&mut storage, ());
assert_eq!((), Field1::read(&s... | rust_cleaned_test_functions.jsonl/35741 | {
"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,
14832,
36386,
408,
1103,
368,
341,
286,
1077,
5206,
5819,
284,
7486,
20703,
15,
26,
220,
16,
15,
17,
19,
4821,
286,
943,
8601,
16,
284,
51460,
1877,
68843,
6164,
43231,
11,
220,
20,
10133,
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_eval_override() -> Result<(), Box<EvalAltResult>> {
let engine = Engine::new();
assert_eq!(
engine.eval::<String>(
r#"
fn eval(x) { x } // reflect the script back
eval("40 + 2")
"#
)?,
"40 + 2"
);
Ok(()... | rust_cleaned_test_functions.jsonl/114783 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 177
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
48576,
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,
17055,
310,
435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_pool_max_idle_per_host() {
future::lazy(|| {
let pool = pool_max_idle_no_timer(2);
let key = (Arc::new("foo".to_string()), Ver::Http1);
pool.pooled(c(key.clone()), Uniq(41));
pool.pooled(c(key.clone()), Uniq(5));
pool.pooled(c(... | rust_cleaned_test_functions.jsonl/35808 | {
"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,
15709,
6345,
47810,
5678,
12848,
368,
341,
286,
3853,
486,
49013,
79453,
341,
310,
1077,
7314,
284,
7314,
6345,
47810,
6536,
16255,
7,
17,
317,
310,
1077,
1376,
284,
320,
36809,
486,
931,
445,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_inline_constant_alias() {
test(
"var XXX = new Foo(); q(XXX); var YYY = XXX; bar(YYY)",
"var XXX = new Foo(); q(XXX); var YYY = XXX; bar(YYY)",
);
} | rust_cleaned_test_functions.jsonl/27657 | {
"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,
41871,
34967,
35947,
368,
341,
262,
1273,
1006,
286,
330,
947,
19975,
284,
501,
33428,
2129,
2804,
7,
30100,
1215,
762,
809,
10060,
284,
19975,
26,
3619,
7,
52309,
15752,
286,
330,
947,
19975,
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 |
#[test]
fn test_invalid_msb_index() {
let range = BitRange {
msb_index: 32,
lsb_index: 2,
};
range.check();
} | rust_cleaned_test_functions.jsonl/4111 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 101
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
717,
16892,
3560,
368,
341,
286,
1077,
2088,
284,
6495,
6046,
341,
310,
9829,
65,
3560,
25,
220,
18,
17,
345,
310,
326,
16892,
3560,
25,
220,
17,
345,
286,
2605,
286,
2088,
9093,
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 |
#[test]
fn test_version() {
let runc_id = format!("{}", Uuid::new_v4());
let runc_path = env::temp_dir().join(&runc_id).join("runc.amd64");
let runc_root =
PathBuf::from(env::var_os("XDG_RUNTIME_DIR").expect("expected temporary path"))
.join("rust-runc")
... | rust_cleaned_test_functions.jsonl/24478 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 540
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9438,
368,
341,
286,
1077,
435,
1347,
842,
284,
3561,
79878,
547,
2423,
486,
931,
2273,
19,
1423,
286,
1077,
435,
1347,
2638,
284,
6105,
486,
3888,
4334,
1005,
5987,
2099,
81,
1347,
842,
568,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_teban_try_from() {
let input_and_expected:Vec<(&'static str,Result<Teban, TypeConvertError<String>>)> = vec![
("b", Ok(Teban::Sente)),
("w", Ok(Teban::Gote)),
("a", Err(TypeConvertError::SyntaxError(String::from(
"It is an illegal character string as a character string representin... | rust_cleaned_test_functions.jsonl/46532 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 193
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
3065,
276,
53283,
5673,
368,
972,
10217,
1946,
8378,
32190,
25,
10050,
27,
2099,
6,
1978,
607,
11,
2077,
3125,
3065,
276,
11,
3990,
12012,
1454,
3464,
2452,
16018,
284,
7486,
20703,
319,
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... | 2 |
#[test]
fn test_fold_left_child_op() {
fold("x * Infinity * 2", "x * Infinity");
fold_same("x - Infinity - 2"); // want "x-Infinity"
fold_same("x - 1 + Infinity");
fold_same("x - 2 + 1");
fold_same("x - 2 + 3");
fold_same("1 + x - 2 + 1");
fold_same("1 + x - 2 + 3");
fold_same("1... | rust_cleaned_test_functions.jsonl/122215 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 408
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
61187,
9579,
17268,
10287,
368,
341,
262,
11555,
445,
87,
353,
39889,
353,
220,
17,
497,
330,
87,
353,
39889,
797,
262,
11555,
33574,
445,
87,
481,
39889,
481,
220,
17,
5038,
442,
1366,
330,
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_sem_multi_resource() {
// Parent and child both get in the critical section at the same
let s = Arc::new(Semaphore::new(2));
let s2 = s.clone();
let (tx1, rx1) = channel();
let (tx2, rx2) = channel();
let _t = Thread::spawn(move|| {
... | rust_cleaned_test_functions.jsonl/13027 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 280
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30442,
25133,
17962,
368,
341,
286,
442,
17022,
323,
1682,
2176,
633,
304,
279,
9023,
3772,
518,
279,
1852,
8945,
286,
1077,
274,
284,
19689,
486,
931,
3759,
336,
25545,
486,
931,
7,
17,
1106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_get_file_list() {
let _ = env_logger::try_init();
let files = get_file_list(env::current_dir().unwrap());
assert!(files.is_ok());
assert!(files.unwrap().len() > 0);
let files = get_file_list(env::current_dir().unwrap().join("Cargo.toml")).unwrap();
... | rust_cleaned_test_functions.jsonl/1677 | {
"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,
3062,
2458,
2019,
368,
341,
286,
1077,
716,
284,
6105,
27413,
486,
1539,
6137,
1428,
286,
1077,
3542,
284,
633,
2458,
2019,
16978,
486,
3231,
4334,
1005,
15454,
1423,
286,
2060,
10297,
7198,
2079,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fib() {
pub fn fib(n: i32) -> i32 {
if n == 0 {
return 0;
}
if n == 1 {
return 1;
}
let mut n_1: u64 = 1;
let mut n_2: u64 = 0;
for _ in 2..(n+1) {
let tmp_... | rust_cleaned_test_functions.jsonl/32901 | {
"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,
761,
579,
368,
341,
286,
6675,
5168,
15801,
1445,
25,
600,
18,
17,
8,
1464,
600,
18,
17,
341,
310,
421,
308,
621,
220,
15,
341,
394,
470,
220,
15,
280,
310,
456,
310,
421,
308,
621,
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... | 4 |
#[test]
fn test_simple() {
let mut bit = BIT::new(10);
bit.add(2, 1);
bit.add(3, 3);
bit.add(5, 10);
bit.add(0, -4);
bit.add(9, -5);
assert_eq!(5, bit.get(0, 10));
assert_eq!(4, bit.get(2, 4));
assert_eq!(1, bit.get(2, 3));
assert_e... | rust_cleaned_test_functions.jsonl/87923 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 430
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
368,
341,
286,
1077,
5206,
2699,
284,
24247,
486,
931,
7,
16,
15,
317,
286,
2699,
1364,
7,
17,
11,
220,
16,
317,
286,
2699,
1364,
7,
18,
11,
220,
18,
317,
286,
2699,
1364,
7,
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_from_raw_extended() {
let a = HeaderValue::from_static(
"attachment; filename*=UTF-8''%c2%a3%20and%20%e2%82%ac%20rates",
);
let a: ContentDisposition = ContentDisposition::from_raw(&a).unwrap();
let b = ContentDisposition {
disposition: Dis... | rust_cleaned_test_functions.jsonl/129582 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 825
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
16067,
61678,
368,
341,
286,
1077,
264,
284,
12104,
1130,
486,
1499,
25360,
1006,
310,
330,
21981,
26,
3899,
40008,
8561,
12,
23,
4605,
4,
66,
17,
4,
64,
18,
4,
17,
15,
437,
4,
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... | 1 |
#[test]
fn test_retry_fail_clamp_backoff() {
let mut states = vec![];
let res = Retry::default()
.initial_backoff(Duration::from_millis(1))
.clamp_backoff(Duration::from_millis(1))
.max_tries(4)
.retry(|state| {
states.push(state);
... | rust_cleaned_test_functions.jsonl/114705 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 681
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62745,
22121,
6794,
1121,
3895,
1847,
368,
341,
286,
1077,
5206,
5302,
284,
7486,
0,
15078,
286,
1077,
592,
284,
78870,
486,
2258,
741,
310,
659,
9426,
3895,
1847,
64114,
486,
1499,
717,
56212,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_70() {
assert_eq!(Solution::climb_stairs(3), 3);
assert_eq!(Solution::climb_stairs(4), 5);
assert_eq!(Solution::climb_stairs(5), 8);
} | rust_cleaned_test_functions.jsonl/103793 | {
"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,
62,
22,
15,
368,
972,
286,
2060,
10714,
10297,
36842,
486,
564,
20828,
1261,
4720,
7,
18,
701,
220,
18,
736,
286,
2060,
10714,
10297,
36842,
486,
564,
20828,
1261,
4720,
7,
19,
701,
220,
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 |
#[test]
fn test_add_session_empty_transient() {
let mut broker = BrokerBuilder::default().with_authorizer(AllowAll).build();
let id = "id1".to_string();
let client_id = ClientId::from(id.clone());
let connect = transient_connect(id);
let handle = connection_handle();
... | rust_cleaned_test_functions.jsonl/105409 | {
"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,
2891,
12316,
15124,
97758,
368,
341,
286,
1077,
5206,
22316,
284,
52701,
3297,
486,
2258,
1005,
4197,
22938,
3135,
7,
18605,
2403,
568,
5834,
1428,
286,
1077,
877,
284,
330,
307,
16,
3263,
983,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_part1() {
assert_eq!(part1("R8,U5,L5,D3\nU7,R6,D4,L4"), 6);
assert_eq!(part1("R75,D30,R83,U83,L12,D49,R71,U7,L72\nU62,R66,U55,R34,D71,R55,D58,R83"), 159);
assert_eq!(part1("R98,U47,R26,D63,R33,U87,L62,D20,R33,U53,R51\nU98,R91,D20,R16,D67,R40,U7,R15,U6,R7"), 135);
} | rust_cleaned_test_functions.jsonl/10047 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 218
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10495,
16,
368,
341,
286,
2060,
10714,
10297,
4480,
16,
445,
49,
23,
50481,
20,
30114,
20,
27266,
18,
1699,
52,
22,
23508,
21,
27266,
19,
30114,
19,
3975,
220,
21,
317,
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_canonicalize_idents_different_protocols() {
let ident1 = ident(&url("https://github.com/PistonDevelopers/piston")).unwrap();
let ident2 = ident(&url("git://github.com/PistonDevelopers/piston")).unwrap();
assert_eq!(ident1, ident2);
} | rust_cleaned_test_functions.jsonl/21285 | {
"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,
27421,
22391,
551,
842,
805,
82741,
22357,
22018,
368,
341,
286,
1077,
3524,
16,
284,
3524,
2099,
1085,
445,
2428,
1110,
5204,
905,
16341,
58819,
20444,
388,
4322,
58819,
15197,
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,
1... | 1 |
#[test]
fn test_validate_membership_proofs_invalid_range_in_tx() {
let (mut tx, ledger) = create_test_tx();
let highest_indices = tx.get_membership_proof_highest_indices();
let root_proofs: Vec<TxOutMembershipProof> = adapt_hack(
&ledger
.get_tx_out_proof_of_... | rust_cleaned_test_functions.jsonl/78550 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 414
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
84635,
2540,
36081,
31433,
9698,
1243,
17805,
368,
341,
286,
1077,
320,
6984,
9854,
11,
46933,
8,
284,
1855,
4452,
17805,
1428,
286,
1077,
8426,
18333,
284,
9854,
670,
84635,
86757,
1523,
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_serialise_roundtrip_world() {
let mut world = WorldSave::new(
Background::new(Colour::new(1.0, 1.0, 1.0), Colour::new(0.5, 0.0, 0.0)),
vec![
Sphere::build(
Vector::new(0.0, 0.0, -1.0),
0.5,
... | rust_cleaned_test_functions.jsonl/65487 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1158
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25602,
1064,
29896,
32981,
31792,
368,
341,
286,
1077,
5206,
1879,
284,
4337,
8784,
486,
931,
1006,
310,
24800,
486,
931,
3025,
337,
413,
486,
931,
7,
16,
13,
15,
11,
220,
16,
13,
15,
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_del_slice() {
Python::with_gil(|py| {
let v: Vec<i32> = vec![1, 1, 2, 3, 5, 8];
let ob = v.to_object(py);
let seq = ob.cast_as::<PySequence>(py).unwrap();
seq.del_slice(1, 4).unwrap();
assert_eq!([1, 5, 8], seq.extract::<[i32; 3... | rust_cleaned_test_functions.jsonl/70319 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 267
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18029,
26488,
368,
341,
286,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
341,
310,
1077,
348,
25,
11312,
21897,
18,
17,
29,
284,
7486,
20703,
16,
11,
220,
16,
11,
220,
17,
11,
220,
18,
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_block_doc_comment_3() {
let comment = "/**\n let a: *i32;\n *a = 5;\n*/";
let stripped = strip_doc_comment_decoration(comment);
assert_eq!(stripped, " let a: *i32;\n *a = 5;");
} | rust_cleaned_test_functions.jsonl/23090 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 115
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7113,
18869,
17638,
62,
18,
368,
341,
286,
1077,
3980,
284,
3521,
334,
59,
77,
1077,
264,
25,
353,
72,
18,
17,
17882,
77,
353,
64,
284,
220,
20,
17882,
77,
1812,
876,
286,
1077,
36679,
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_setters() {
macro_rules! t(
(s: $path:expr, $set:ident, $with:ident, $arg:expr) => (
{
let path = $path;
let arg = $arg;
let mut p1 = Path::new(path);
p1.$set(arg);
... | rust_cleaned_test_functions.jsonl/7691 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1054
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
5045,
368,
341,
286,
18072,
21407,
0,
259,
1006,
310,
320,
82,
25,
400,
2343,
96011,
11,
400,
746,
25,
1713,
11,
400,
4197,
25,
1713,
11,
400,
858,
96011,
8,
589,
2399,
394,
341,
503,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_queue() {
let q = Queue::new();
let elem = 5;
q.push(elem);
let res = q.pop();
assert_eq!(res.unwrap(), elem);
} | rust_cleaned_test_functions.jsonl/92006 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 103
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10841,
368,
341,
286,
1077,
2804,
284,
18745,
486,
931,
543,
286,
1077,
11750,
284,
220,
20,
280,
286,
2804,
2552,
28880,
317,
286,
1077,
592,
284,
2804,
8288,
543,
286,
2060,
10714,
10297,
416,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_from_angle_y_rotation_should_not_rotate_y_axis() {
let rotation = Rotation3::from_angle_y(Degrees(70_f64));
let vector = Vector3::unit_y();
let expected = vector;
let result = rotation.rotate_vector(&vector);
assert_eq!(result, expected);
} | rust_cleaned_test_functions.jsonl/70482 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 138
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
21727,
4178,
44813,
43378,
7913,
60834,
4178,
23567,
368,
341,
286,
1077,
12695,
284,
47528,
18,
486,
1499,
21727,
4178,
5432,
791,
7858,
7,
22,
15,
761,
21,
19,
1106,
286,
1077,
4621,
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_none_as_empty_string() {
#[serde_as]
#[derive(Debug, Serialize, Deserialize, PartialEq)]
struct S(#[serde_as(as = "NoneAsEmptyString")] Option<String>);
is_equal(S(None), expect![[r#""""#]]);
is_equal(S(Some("Hello".to_string())), expect![[r#""Hello""#]]);
} | rust_cleaned_test_functions.jsonl/45731 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 138
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31488,
11898,
15124,
3904,
368,
341,
262,
11506,
47024,
11898,
921,
262,
11506,
27098,
42618,
11,
39900,
11,
48440,
11,
55039,
5563,
262,
2036,
328,
7,
13353,
47024,
11898,
36951,
284,
330,
4064,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_client_state_with_renewing_returns_renewing() {
let mut msg = new_test_request();
msg.options.remove(0);
msg.options.remove(1);
msg.ciaddr = Ipv4Addr::new(1, 2, 3, 4);
let got = get_client_state(&msg);
assert_eq!(got, ClientState::Renewing);
... | rust_cleaned_test_functions.jsonl/61732 | {
"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,
3062,
8179,
4387,
6615,
1288,
931,
287,
58900,
1288,
931,
287,
368,
341,
286,
1077,
5206,
3750,
284,
501,
4452,
7893,
543,
286,
3750,
10912,
4850,
7,
15,
317,
286,
3750,
10912,
4850,
7,
16,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_perspective_serde() {
let test_persp = Camera::perspective(1.7, std::f32::consts::FRAC_PI_3, 0.1);
println!(
"{}",
to_string_pretty(&test_persp, Default::default()).unwrap()
);
let de = from_str(&to_string_pretty(&test_persp, Default::defa... | rust_cleaned_test_functions.jsonl/57065 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 194
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
85091,
75861,
450,
368,
341,
286,
1077,
1273,
620,
388,
79,
284,
14332,
486,
31290,
9085,
7,
16,
13,
22,
11,
1460,
486,
69,
18,
17,
486,
95773,
486,
10504,
1706,
20212,
62,
18,
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_count_multiple_occurrences() {
check_word_count(
"one fish two fish red fish blue fish",
vec![("one", 1),
("fish", 4),
("two", 1),
("red", 1),
("blue", 1)]);
} | rust_cleaned_test_functions.jsonl/109969 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 142
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3180,
45233,
57291,
33246,
368,
341,
262,
1779,
13533,
3180,
1006,
286,
330,
603,
7640,
1378,
7640,
2518,
7640,
6303,
7640,
756,
286,
7486,
20703,
445,
603,
497,
220,
16,
1326,
1797,
3489,
18170,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_permissions_without_allow() {
for permission in &util::PERMISSION_VARIANTS {
let (_, err) = util::run_and_collect_output(
false,
&format!("run permission_test.ts {0}Required", permission),
None,
None,
false,
);
assert!(err.contains(util::PERMISSION_DEN... | rust_cleaned_test_functions.jsonl/5591 | {
"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,
44767,
39904,
55731,
368,
341,
220,
369,
7882,
304,
609,
1314,
486,
9654,
25245,
2334,
16028,
37125,
341,
262,
1077,
39464,
1848,
8,
284,
4094,
486,
6108,
8378,
68140,
7645,
1006,
414,
895,
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... | 2 |
#[test]
fn test_pod_mut_method() {
let cxx = indoc! {"
uint32_t Bob::get_bob() {
return a;
}
"};
let hdr = indoc! {"
#include <cstdint>
struct Bob {
public:
uint32_t a;
uint32_t b;
uint32_t get_bob();
};
... | rust_cleaned_test_functions.jsonl/9758 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 299
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
85337,
29523,
9032,
368,
341,
262,
1077,
272,
4146,
284,
1257,
509,
0,
314,
698,
286,
2622,
18,
17,
528,
14261,
486,
455,
880,
674,
368,
341,
310,
470,
264,
280,
286,
456,
262,
330,
2440,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_zmq_service() {
let ctx = zmq::Context::new();
let socket = ctx.socket(zmq::ROUTER).expect("Failed to create context");
socket
.bind("tcp://127.0.0.1:*")
.expect("Failed to bind socket");
let addr = socket.get_last_endpoint().unwrap().unwra... | rust_cleaned_test_functions.jsonl/58896 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3020
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6415,
27674,
12267,
368,
341,
286,
1077,
5635,
284,
90740,
486,
1972,
486,
931,
543,
286,
1077,
7575,
284,
5635,
25926,
13174,
27674,
486,
85600,
640,
568,
17119,
445,
9408,
311,
1855,
2266,
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... | 2 |
#[test]
fn test_remove_locked_account() {
let location = TempLocation::new();
request_stream_test(
location.to_persistent_lifetime(),
create_clean_pre_auth_manager(),
None,
Arc::new(Inspector::new()),
|proxy| async move {
... | rust_cleaned_test_functions.jsonl/105848 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 264
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
60271,
13500,
368,
341,
286,
1077,
3728,
284,
19944,
4707,
486,
931,
543,
286,
1681,
12673,
4452,
1006,
310,
3728,
2389,
620,
13931,
98827,
3148,
310,
1855,
19573,
10442,
14014,
12144,
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... | 4 |
#[test]
fn test_lookup_annonymous_ip() {
use super::geoip2::AnonymousIp;
let _ = env_logger::try_init();
let filename = "test-data/test-data/GeoIP2-Anonymous-IP-Test.mmdb";
let reader = Reader::open_readfile(filename).unwrap();
let ip: IpAddr = FromStr::from_str("81.2.69.123").unwrap();
... | rust_cleaned_test_functions.jsonl/42014 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 284
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27464,
51870,
9757,
10385,
368,
341,
262,
990,
2256,
486,
13052,
573,
17,
486,
32684,
23378,
280,
262,
1077,
716,
284,
6105,
27413,
486,
1539,
6137,
1428,
262,
1077,
3899,
284,
330,
1944,
13945,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_node_instance_crds_lable() {
fn make_crds_value(node: NodeInstance) -> CrdsValue {
CrdsValue::new_unsigned(CrdsData::NodeInstance(node))
}
let mut rng = rand::thread_rng();
let now = timestamp();
let pubkey = Pubkey::new_unique();
let n... | rust_cleaned_test_functions.jsonl/14897 | {
"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,
5084,
11904,
32331,
5356,
907,
480,
368,
341,
286,
5168,
1281,
32331,
5356,
3142,
6958,
25,
6018,
2523,
8,
1464,
4553,
5356,
1130,
341,
310,
4553,
5356,
1130,
486,
931,
67830,
3025,
81,
5356,
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_parse_unknown_standard_opcode_no_args() {
let input = [OPCODE_BASE, 1, 2, 3];
let input = EndianSlice::new(&input, LittleEndian);
let mut standard_opcode_lengths = Vec::new();
let mut header = make_test_header(input);
standard_opcode_lengths.extend(header.... | rust_cleaned_test_functions.jsonl/3353 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 386
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
57507,
48688,
71319,
6536,
8384,
368,
341,
286,
1077,
1946,
284,
508,
3067,
14866,
11762,
11,
220,
16,
11,
220,
17,
11,
220,
18,
935,
286,
1077,
1946,
284,
3972,
1103,
33236,
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_npn_server_advertise_multiple() {
let listener = TcpListener::bind("127.0.0.1:0").unwrap();
let localhost = listener.local_addr().unwrap();
let listener_ctx = {
let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
ctx.set_verify(SSL_VERIFY_PEER);
... | rust_cleaned_test_functions.jsonl/35527 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 717
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
19958,
12015,
10027,
67787,
45233,
368,
341,
262,
1077,
11446,
284,
64876,
2743,
486,
7666,
445,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
15,
1827,
15454,
543,
262,
1077,
47422,
284,
1144... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_server_down_peers_with_hibernate_regions() {
let mut cluster = new_server_cluster(0, 5);
// by design. So here use a short check interval to trigger region heartbeat
// more frequently.
cluster.cfg.raft_store.peer_stale_state_check_interval = ReadableDuration::millis(500);
... | rust_cleaned_test_functions.jsonl/50369 | {
"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,
12015,
13998,
36367,
388,
6615,
1523,
18818,
58035,
368,
341,
262,
1077,
5206,
10652,
284,
501,
12015,
28441,
7,
15,
11,
220,
20,
317,
1066,
262,
442,
553,
2884,
13,
2055,
1588,
990,
264,
2805,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_grains() {
assert_query!("1g to gr", 100000000 / 6479891, gr);
assert_query!("1gr to g", 6479891 / 100000000, g);
assert_query!("(1lb / 7000) to gr", 1, gr);
} | rust_cleaned_test_functions.jsonl/36182 | {
"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,
15682,
1735,
368,
341,
262,
2060,
5738,
17223,
16,
70,
311,
1081,
497,
220,
16,
15,
15,
15,
15,
15,
15,
15,
15,
608,
220,
21,
19,
22,
24,
23,
24,
16,
11,
1081,
317,
262,
2060,
5738,
1722... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_open_failure_no_new() -> utils::TestReturn {
let mut cmd = Command::cargo_bin("diary")?;
let (dir_str, config_path) = utils::create_temp_dir_and_path()?;
cmd.args(["--config", config_path.to_str().unwrap(), "init", &dir_str]);
cmd.assert().success();
let mut cmd = Command:... | rust_cleaned_test_functions.jsonl/42766 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 223
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11311,
43618,
6536,
5921,
368,
1464,
12439,
486,
2271,
5598,
341,
262,
1077,
5206,
5439,
284,
7348,
486,
66715,
21816,
445,
8579,
658,
899,
69493,
262,
1077,
320,
3741,
2895,
11,
2193,
2638,
8,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_rand_n_from_m() -> anyhow::Result<()> {
// - Randomly choose n elts from total elts.
// - Assert that the count of the result.
// - Assert every elt is different.
for total in 1..10 {
for n in 0..total {
let got = rand_n_from_m(total, n)?;
assert_... | rust_cleaned_test_functions.jsonl/66514 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 334
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33864,
1089,
5673,
717,
368,
1464,
88964,
486,
2077,
71698,
341,
262,
442,
481,
10612,
398,
5157,
308,
655,
2576,
504,
2790,
655,
2576,
624,
262,
442,
481,
5319,
429,
279,
1760,
315,
279,
1102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_date_check() {
let gil = Python::acquire_gil();
let py = gil.python();
let (obj, sub_obj, sub_sub_obj) = _get_subclasses(&py, "date", "2018, 1, 1").unwrap();
assert_check_exact!(PyDate_Check, obj);
assert_check_only!(PyDate_Check, sub_obj);
assert_check_only!(PyDate_Chec... | rust_cleaned_test_functions.jsonl/113011 | {
"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,
4164,
7200,
368,
341,
262,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
262,
1077,
4510,
284,
342,
321,
43193,
543,
262,
1077,
320,
2295,
11,
1186,
7328,
11,
1186,
5228,
7328,
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_mint_cycles_nns_canister() {
with_test_replica_logger(|log| {
let tmpdir = tempfile::Builder::new().prefix("test").tempdir().unwrap();
let metrics_registry = MetricsRegistry::new();
let cycles_account_manager = Arc::new(
CyclesAccountManagerBuilder::new()
... | rust_cleaned_test_functions.jsonl/57860 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 610
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
396,
68970,
1089,
4412,
27421,
1571,
368,
341,
262,
448,
4452,
25533,
15317,
27413,
22428,
839,
91,
341,
286,
1077,
4174,
3741,
284,
54819,
486,
3297,
486,
931,
1005,
11849,
445,
1944,
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_invalid() {
// Invalid words
assert!(to_entropy("this is not a love song this is not a love song").is_err());
assert!(to_entropy("abandon abandon badword abandon abandon abandon abandon abandon abandon abandon abandon abandon").is_err());
// Invalid length
assert!(to_entropy("abandon a... | rust_cleaned_test_functions.jsonl/9450 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 290
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
368,
341,
197,
197,
322,
13882,
4244,
198,
197,
6948,
10297,
983,
50374,
445,
574,
374,
537,
264,
2948,
5492,
419,
374,
537,
264,
2948,
5492,
1827,
285,
9266,
1423,
197,
6948,
10297,
983,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_deg_rad() {
let deg = Deg(180.);
let rad = Angle(PI);
assert_eq!(rad, deg.clone().into());
assert_eq!(deg, rad.clone().into());
} | rust_cleaned_test_functions.jsonl/18313 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 97
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46057,
39764,
368,
341,
286,
1077,
5254,
284,
57237,
7,
16,
23,
15,
58957,
286,
1077,
8862,
284,
36237,
7,
1893,
317,
286,
2060,
10714,
10297,
13281,
11,
5254,
15997,
1005,
18122,
1423,
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 |
#[test]
fn test_get_merkle_proof_of_membership_errors() {
let (tx_out_store, env) = init_tx_out_store();
{
// Populate the tx_out_store.
let mut rw_transaction = env.begin_rw_txn().unwrap();
for tx_out in &get_tx_outs(27) {
tx_out_store.push(tx... | rust_cleaned_test_functions.jsonl/88935 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 423
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
717,
16754,
273,
86757,
3575,
84635,
20196,
368,
341,
286,
1077,
320,
3998,
6068,
14809,
11,
6105,
8,
284,
2930,
17805,
6068,
14809,
543,
286,
341,
310,
442,
70938,
279,
9854,
6068,
14809,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_dim_extended_user_defined() {
let input = r#"
TYPE Card
Value AS INTEGER
END TYPE
DIM A AS Card
"#;
assert_eq!(
linter_ok(input),
vec![TopLevelToken::Statement(Statement::Dim(
DimNameBuilder::new()
.bare_name("A")
... | rust_cleaned_test_functions.jsonl/122471 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 264
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10791,
61678,
3317,
52870,
368,
341,
262,
1077,
1946,
284,
435,
2,
698,
262,
12454,
6795,
198,
286,
5162,
5752,
30381,
198,
262,
11176,
12454,
198,
262,
50859,
362,
5752,
6795,
198,
262,
5869,
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_alignment() {
let c = ParagraphProperty::new();
let b = c.align(AlignmentType::Right).build();
assert_eq!(
str::from_utf8(&b).unwrap(),
r#"<w:pPr><w:rPr /><w:jc w:val="right" /></w:pPr>"#
);
} | rust_cleaned_test_functions.jsonl/67553 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 153
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51006,
368,
341,
286,
1077,
272,
284,
49351,
3052,
486,
931,
543,
286,
1077,
293,
284,
272,
65400,
7,
7033,
929,
486,
5979,
568,
5834,
543,
286,
2060,
10714,
33673,
310,
607,
486,
1499,
39453,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_full_node() {
let mut env = SynchronizerEnv::new(2);
env.start_next_synchronizer(
SynchronizerEnv::default_handler(),
RoleType::Validator,
None,
);
env.start_next_synchronizer(SynchronizerEnv::default_handler(), RoleType::FullNode, None);
env.commit(0,... | rust_cleaned_test_functions.jsonl/31496 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 238
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16372,
5084,
368,
341,
262,
1077,
5206,
6105,
284,
328,
14113,
3135,
14359,
486,
931,
7,
17,
317,
262,
6105,
4962,
11257,
643,
14113,
3135,
1006,
286,
328,
14113,
3135,
14359,
486,
2258,
10183,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_signature_subscribe() {
let GenesisConfigInfo {
genesis_config,
mint_keypair: alice,
..
} = create_genesis_config(10_000);
let bob = Keypair::new();
let bob_pubkey = bob.pubkey();
let bank = Bank::new(&genesis_config);
... | rust_cleaned_test_functions.jsonl/16576 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 866
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39859,
88935,
368,
341,
286,
1077,
40788,
2648,
1731,
341,
310,
59366,
5332,
345,
310,
28337,
3097,
12670,
25,
70433,
345,
310,
54538,
286,
335,
284,
1855,
16322,
13774,
5332,
7,
16,
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... | 1 |
#[test]
fn test_accounts_account_not_found() {
let accounts = Accounts::new(Vec::new());
let mut error_counters = ErrorCounters::default();
let ancestors = vec![(0, 0)].into_iter().collect();
let accounts_index = accounts.accounts_db.accounts_index.read().unwrap();
let s... | rust_cleaned_test_functions.jsonl/50619 | {
"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,
55665,
13500,
7913,
21480,
368,
341,
286,
1077,
9618,
284,
40655,
486,
931,
49923,
486,
931,
1423,
286,
1077,
5206,
1465,
85632,
284,
4600,
2507,
388,
486,
2258,
543,
286,
1077,
37518,
284,
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,
1... | 1 |
#[test]
fn test_metadata_ext() {
let tmpdir = tmpdir();
let a = check!(tmpdir.create("a"));
let b = check!(tmpdir.create("b"));
let tmpdir_metadata = check!(tmpdir.dir_metadata());
let a_metadata = check!(a.metadata());
let b_metadata = check!(b.metadata());
// The directory and fil... | rust_cleaned_test_functions.jsonl/85204 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 380
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22220,
9927,
368,
341,
262,
1077,
4174,
3741,
284,
4174,
3741,
543,
262,
1077,
264,
284,
1779,
10297,
5173,
3741,
2520,
445,
64,
4010,
262,
1077,
293,
284,
1779,
10297,
5173,
3741,
2520,
445,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_leave_construct() {
let mut bytes = vec![0xa5; 8];
let mut packet = Packet::new_unchecked(&mut bytes);
packet.set_msg_type(Message::LeaveGroup);
packet.set_max_resp_code(0);
packet.set_group_address(Ipv4Address::from_bytes(&[224, 0, 6, 150]));
pack... | rust_cleaned_test_functions.jsonl/112386 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 198
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62666,
64803,
368,
341,
286,
1077,
5206,
5820,
284,
7486,
20703,
15,
9591,
20,
26,
220,
23,
935,
286,
1077,
5206,
10151,
284,
28889,
486,
931,
4907,
7549,
2099,
6984,
5820,
317,
286,
10151,
980,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_switch() {
let input = vec![
vec!["123".to_string(), "321".to_string()],
vec!["124".to_string(), "421".to_string()],
vec!["125".to_string(), "521".to_string()],
];
let result = vec![
Some("case 123: return 321;".to_string()),
Some("case 124: return 421;".to_str... | rust_cleaned_test_functions.jsonl/92582 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 193
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
27652,
368,
341,
220,
1077,
1946,
284,
7486,
90515,
262,
7486,
0,
1183,
16,
17,
18,
3263,
983,
3904,
1507,
330,
18,
17,
16,
3263,
983,
3904,
73845,
262,
7486,
0,
1183,
16,
17,
19,
326... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_infer_schema_0_rows() -> Result<()> {
let csv = r#"a,b,c,d
1,a,1.0,true
1,a,1.0,false
"#;
let file = Cursor::new(csv);
let df = CsvReader::new(file).infer_schema(Some(0)).finish()?;
assert_eq!(
df.dtypes(),
&[
DataType::Utf8... | rust_cleaned_test_functions.jsonl/57588 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 301
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
802,
25371,
62,
15,
10949,
368,
1464,
5714,
71698,
341,
286,
1077,
13147,
284,
435,
55543,
64,
8402,
10109,
11991,
198,
16,
15012,
11,
16,
13,
15,
21347,
198,
16,
15012,
11,
16,
13,
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_item_set_payload() {
let mut item = Item::new(ItemType::Event);
let payload = Bytes::from(&br#"{"event_id":"3adcb99a1be84a5d8057f2eb9a0161ce"}"#[..]);
item.set_payload(ContentType::Json, payload.clone());
// Payload
assert_eq!(item.payload(), payload);
... | rust_cleaned_test_functions.jsonl/103603 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 232
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5634,
2602,
32813,
368,
341,
286,
1077,
5206,
1509,
284,
5739,
486,
931,
29771,
929,
486,
1556,
626,
286,
1077,
7729,
284,
30024,
486,
1499,
2099,
1323,
55543,
4913,
3087,
842,
3252,
18,
329,
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... | 1 |
#[test]
fn test_translate_slice() {
// u8
let mut data = vec![1u8, 2, 3, 4, 5];
let addr = data.as_ptr() as *const _ as u64;
let regions = vec![MemoryRegion {
addr_host: addr,
addr_vm: 100,
len: data.len() as u64,
}];
let transl... | rust_cleaned_test_functions.jsonl/42300 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 519
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66381,
26488,
368,
341,
286,
442,
575,
23,
198,
286,
1077,
5206,
821,
284,
7486,
20703,
16,
84,
23,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
286,
1077,
10789,
284,
821,
535... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cardinal() -> Result<()> {
let (x,y) = read_csv_xy("tests/data/leds4000.csv")? ;
let d = CubicSplineFit::new(x.clone(), y.clone());
let tc = d.cardinal_spline(10.0)?;
println!("knots {:?}", tc.t);
println!("number of knots: {}", tc.t.len());
tc.plot("fit.png", (1600,80... | rust_cleaned_test_functions.jsonl/93159 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 161
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16888,
977,
368,
1464,
5714,
71698,
1476,
262,
1077,
320,
87,
7358,
8,
284,
220,
1349,
14020,
40920,
445,
23841,
13167,
14,
832,
82,
19,
15,
15,
15,
11219,
899,
30,
9470,
262,
1077,
294,
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... | 4 |
#[test]
fn test_encrypt_data() {
let k = hex::decode("ddc543ef8e4629a603d39dd0307a51bb1e7adb9cb259f6b085c91d0842a18679")
.unwrap();
let plaintext = hex::decode("edc089a518219ec1cee184e89d2d37af").unwrap();
assert_eq!(plaintext.len(), 16);
let nonce = hex::decode("2d5e... | rust_cleaned_test_functions.jsonl/89676 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 346
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66593,
1769,
368,
341,
286,
1077,
595,
284,
12371,
486,
18196,
445,
631,
66,
20,
19,
18,
823,
23,
68,
19,
21,
17,
24,
64,
21,
15,
18,
67,
18,
24,
631,
15,
18,
15,
22,
64,
20,
16,
6066,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mean() {
let f = |x: Gamma| x.mean().unwrap();
let test = [
((1.0, 0.1), 10.0),
((1.0, 1.0), 1.0),
((10.0, 10.0), 1.0),
((10.0, 1.0), 10.0),
((10.0, INF), 0.0),
];
for &(arg, res) in test.iter() {
... | rust_cleaned_test_functions.jsonl/39871 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 241
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16933,
368,
341,
286,
1077,
282,
284,
760,
87,
25,
57682,
91,
856,
18711,
1005,
15454,
543,
286,
1077,
1273,
284,
2278,
310,
1781,
16,
13,
15,
11,
220,
15,
13,
16,
701,
220,
16,
15,
13,
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_median() {
assert_eq!(0., median(vec![]));
assert_eq!(0., median(vec![0.]));
assert_eq!(5., median(vec![5.]));
assert_eq!(12.5, median(vec![15., 10.]));
assert_eq!(5.5, median(vec![5., 7., 6., 9., 8., 10., 3., 1., 4., 2.]));
assert_eq!(
... | rust_cleaned_test_functions.jsonl/41523 | {
"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,
83003,
368,
341,
286,
2060,
10714,
10297,
15,
2572,
22553,
25592,
0,
1294,
1106,
286,
2060,
10714,
10297,
15,
2572,
22553,
25592,
20703,
15,
13,
14382,
286,
2060,
10714,
10297,
20,
2572,
22553,
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_intraday_quote_400_failed() {
let it = crawler::IntradayBuilder::default().build();
assert_err!(it.quote("").call(), Err(FugleError::General(_)));
} | rust_cleaned_test_functions.jsonl/49442 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 73
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
47026,
352,
45236,
62,
19,
15,
15,
35060,
368,
341,
262,
1077,
432,
284,
73094,
486,
641,
47026,
352,
3297,
486,
2258,
1005,
5834,
543,
262,
2060,
9266,
10297,
275,
61565,
80821,
6659,
150... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_fold_bitwise_op() {
fold("x = 1 & 1", "x = 1");
fold("x = 1 & 2", "x = 0");
fold("x = 3 & 1", "x = 1");
fold("x = 3 & 3", "x = 3");
fold("x = 1 | 1", "x = 1");
fold("x = 1 | 2", "x = 3");
fold("x = 3 | 1", "x = 3");
fold("x = 3 | 3", "x = 3");
fold("x = 1 ^ ... | rust_cleaned_test_functions.jsonl/122172 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 536
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
61187,
13996,
4482,
10287,
368,
341,
262,
11555,
445,
87,
284,
220,
16,
609,
220,
16,
497,
330,
87,
284,
220,
16,
797,
262,
11555,
445,
87,
284,
220,
16,
609,
220,
17,
497,
330,
87,
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_logistic_grad() {
let x = array![
[0.0],
[1.0],
[2.0],
[3.0],
[4.0],
[5.0],
[6.0],
[7.0],
[8.0],
[9.0]
];
let y = array![0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1... | rust_cleaned_test_functions.jsonl/96713 | {
"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,
5224,
4532,
18352,
368,
341,
286,
1077,
856,
284,
1334,
90515,
310,
508,
15,
13,
15,
1259,
310,
508,
16,
13,
15,
1259,
310,
508,
17,
13,
15,
1259,
310,
508,
18,
13,
15,
1259,
310,
508,
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... | 2 |
#[test]
fn test_full_route() {
let rocket = rocket::ignite()
.mount("/1", routes![post1])
.mount("/2", routes![post2]);
let client = Client::debug(rocket).unwrap();
let a = RawStr::new("A%20A");
let name = RawStr::new("Bob%20McDonald");
let path = "this/path/here";
let ... | rust_cleaned_test_functions.jsonl/46561 | {
"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,
16372,
28109,
368,
341,
262,
1077,
24306,
284,
24306,
486,
95408,
741,
286,
659,
16557,
4283,
16,
497,
11291,
20703,
2203,
16,
2546,
286,
659,
16557,
4283,
17,
497,
11291,
20703,
2203,
17,
10149,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sub_4() {
let z = c(1f64, 2f64);
assert_eq!(z - 1.0, c(0.0, 2.0));
} | rust_cleaned_test_functions.jsonl/80105 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 64
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
62,
19,
368,
341,
262,
1077,
1147,
284,
272,
7,
16,
69,
21,
19,
11,
220,
17,
69,
21,
19,
317,
262,
2060,
10714,
10297,
89,
481,
220,
16,
13,
15,
11,
272,
7,
15,
13,
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 |
#[test]
fn test_food_from_line() {
assert_eq!(
Food::from_line("mxmxvkd kfcds sqjhc nhms (contains dairy, fish)"),
Food::new(
hashset!(
"mxmxvkd".to_string(),
"kfcds".to_string(),
"sqjhc".to_string(),
... | rust_cleaned_test_functions.jsonl/44790 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 308
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58580,
5673,
6528,
368,
341,
286,
2060,
10714,
33673,
310,
12098,
486,
1499,
6528,
445,
18085,
18085,
85,
37744,
85580,
4385,
82,
18031,
73,
38052,
20303,
1011,
320,
13372,
33379,
11,
7640,
8,
446... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_declaration3() {
use ast::TypeSpecifier::{Float, Int};
use parser::declaration;
let env = &mut Env::new();
assert_eq!(
declaration("struct { int a, b; float c; } S;", env).unwrap(),
Declaration {
specifiers: vec![StructType {
kind: St... | rust_cleaned_test_functions.jsonl/107550 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2070
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77926,
18,
368,
341,
262,
990,
11763,
486,
929,
87297,
22964,
5442,
11,
1333,
2440,
262,
990,
6729,
486,
80383,
401,
262,
1077,
6105,
284,
609,
6984,
37039,
486,
931,
1428,
262,
2060,
10714,
336... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_can_parse_getconf_response() {
for (i, o) in [
(
b"250 SOCKSPORT=1234\r\n" as &[u8],
Some({
let mut res: HashMap<String, Vec<Option<String>>> = HashMap::new();
res.insert("SOCKSPORT".to_string(), vec![
... | rust_cleaned_test_functions.jsonl/58479 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1613
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27421,
21039,
3062,
6135,
9655,
368,
341,
286,
369,
320,
72,
11,
297,
8,
304,
2278,
310,
2399,
394,
293,
1,
17,
20,
15,
34551,
54800,
28,
16,
17,
18,
19,
12016,
1699,
1,
438,
44590,
84,
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... | 3 |
#[test]
fn test_split_off() {
let mut vec = vec![1, 2, 3, 4, 5, 6];
let vec2 = vec.split_off(4);
assert_eq!(vec, [1, 2, 3, 4]);
assert_eq!(vec2, [5, 6]);
} | rust_cleaned_test_functions.jsonl/24437 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 97
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
13651,
368,
341,
262,
1077,
5206,
7486,
284,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
935,
262,
1077,
7486,
17,
284,
7486,
5289,
13651,
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... | 1 |
#[test]
fn test_operation_extension_docs() {
let slack = TEST_CASES.iter().find(|x| x.1 == "slack.json").unwrap();
let api: OpenAPI =
serde_json::from_str(slack.2).expect(&format!("Could not deserialize file {}", slack.1));
let operation_extensions = api
.paths
.paths
... | rust_cleaned_test_functions.jsonl/122532 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 325
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32565,
31035,
49692,
368,
341,
262,
1077,
45619,
284,
13602,
28540,
50,
19471,
1005,
3903,
22428,
87,
91,
856,
13,
16,
621,
330,
88548,
4323,
1827,
15454,
543,
262,
1077,
6330,
25,
5264,
7082,
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_try_from_alogithm_id() {
assert_eq!(
ObjectType::try_from(TPM2_ALG_NULL).unwrap(),
ObjectType::Null
);
assert_eq!(ObjectType::try_from(TPM2_ALG_RSA).unwrap(), ObjectType::Rsa);
assert_eq!(ObjectType::try_from(TPM2_ALG_ECC).unwrap(), ObjectT... | rust_cleaned_test_functions.jsonl/41494 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 398
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
5673,
8418,
538,
410,
76,
842,
368,
341,
286,
2060,
10714,
33673,
310,
78886,
486,
1539,
5673,
4140,
8795,
17,
8912,
38,
18119,
568,
15454,
3148,
310,
78886,
486,
3280,
198,
286,
1439,
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_example_case_cursor_before_tick() {
check_assist(
introduce_named_lifetime,
r#"impl Cursor<<|>'_> {"#,
r#"impl<'a> Cursor<'a> {"#,
);
} | rust_cleaned_test_functions.jsonl/109551 | {
"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,
39304,
19096,
28601,
23708,
43612,
368,
341,
286,
1779,
12083,
380,
1006,
310,
19131,
71834,
98827,
345,
310,
435,
55543,
6383,
28067,
2442,
91,
5592,
98377,
5212,
2,
345,
310,
435,
55543,
6383,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_balance_tree() {
let mut tree = BabyTransactionTree::new(3);
let leaf = BabyTransactionLeaf::default();
tree.insert(3, leaf);
let root = tree.root_hash();
let path = tree.merkle_path(0);
} | rust_cleaned_test_functions.jsonl/89798 | {
"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,
29396,
11663,
368,
341,
286,
1077,
5206,
4916,
284,
20617,
8070,
6533,
486,
931,
7,
18,
317,
286,
1077,
15933,
284,
20617,
8070,
31461,
486,
2258,
543,
286,
4916,
7030,
7,
18,
11,
15933,
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_comments_not_preserved_by_default() {
expect_mapping!("hello ; there" => Token::word("hello"),
Token::new_line());
expect_mapping!(";why hello" => Token::new_line());
} | rust_cleaned_test_functions.jsonl/39347 | {
"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,
30359,
7913,
32116,
2771,
3710,
9993,
368,
341,
286,
1720,
26930,
17223,
14990,
2587,
1052,
1,
589,
9660,
486,
1158,
445,
14990,
4461,
14265,
9660,
486,
931,
6528,
5231,
286,
1720,
26930,
17223,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.