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_basics() {
let code = quote! { struct Foo { bar: String } };
assert_eq!(
dos2unix(rustfmt(code).unwrap().as_str()),
"struct Foo {\n bar: String,\n}\n"
);
} | rust_cleaned_test_functions.jsonl/94066 | {
"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,
880,
67981,
368,
341,
286,
1077,
2038,
284,
12641,
0,
314,
2036,
33428,
314,
3619,
25,
923,
335,
2605,
286,
2060,
10714,
33673,
310,
8750,
17,
56646,
2601,
590,
12501,
15842,
568,
15454,
1005,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_last_index() {
let realm = Realm::create();
let mut engine = Executor::new(realm);
let init = r#"
var regex = /[0-9]+(\.[0-9]+)?/g;
"#;
forward(&mut engine, init);
assert_eq!(forward(&mut engine, "regex.lastIndex"), "0");
assert_eq... | rust_cleaned_test_functions.jsonl/32580 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 276
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12195,
3560,
368,
341,
286,
1077,
21889,
284,
41106,
486,
3182,
543,
286,
1077,
5206,
4712,
284,
56032,
486,
931,
5801,
7673,
317,
286,
1077,
2930,
284,
435,
2,
698,
286,
762,
20180,
284,
95329,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_network_create_delete_with_fields() {
let os = set_up();
let network = os
.new_network()
.with_admin_state_up(false)
.with_name("rust-openstack-integration-new")
.with_mtu(1400)
.with_description("New network for testing")
.create()
... | rust_cleaned_test_functions.jsonl/84687 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 891
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20966,
8657,
11353,
6615,
12132,
368,
341,
262,
1077,
2643,
284,
738,
8237,
1428,
262,
1077,
3922,
284,
2643,
198,
286,
659,
931,
20966,
741,
286,
659,
4197,
12207,
4387,
8237,
3576,
340,
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_move_wind_array() {
let keys = ["foo", "bar", "zen"];
let values = ["1", "2", "3"];
let hash_map = wind(keys.iter(), values.iter());
println!(">> {:?}", hash_map);
} | rust_cleaned_test_functions.jsonl/57079 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17134,
87438,
3858,
368,
341,
286,
1077,
6894,
284,
4383,
7975,
497,
330,
2257,
497,
330,
5679,
6332,
286,
1077,
2750,
284,
4383,
16,
497,
330,
17,
497,
330,
18,
6332,
286,
1077,
5175,
5376,
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 |
#[test]
fn test_decode_option_malformed() {
check_err::<OptionData>("{ \"opt\": [] }",
ExpectedError("Number".to_string(), "[]".to_string()));
check_err::<OptionData>("{ \"opt\": false }",
ExpectedError("Number".to_string(), "false"... | rust_cleaned_test_functions.jsonl/22700 | {
"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,
15227,
9672,
717,
278,
10155,
368,
341,
286,
1779,
9266,
27638,
5341,
1043,
13211,
90,
7245,
2912,
11693,
3056,
335,
756,
1383,
31021,
1454,
445,
2833,
3263,
983,
3904,
1507,
330,
1294,
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_nesting_count() {
let pkg = compile(
r#"
f = () => {
// 1
return () => {
// 2
return () => {
// 3
1 + 1
// 4
return 1
}
}
}
g = () => {
// 5
return 2
}
f()()()
g()
"#,
... | rust_cleaned_test_functions.jsonl/3343 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 298
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
59855,
3180,
368,
341,
310,
1077,
24793,
284,
19192,
1006,
394,
435,
2,
698,
69,
284,
1719,
589,
341,
262,
442,
220,
16,
198,
262,
470,
1719,
589,
341,
286,
442,
220,
17,
198,
286,
470... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_find_cheap_or_harry_potter() -> Result<()> {
let append = SqlBuilder::select_from("books")
.field("title")
.field("price")
.and_where("price < 100")
.order_asc("title")
.query()?;
let sql = SqlBuilder::select_from("book... | rust_cleaned_test_functions.jsonl/12595 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 628
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
62,
61690,
8734,
1523,
11433,
57952,
465,
368,
1464,
5714,
71698,
341,
286,
1077,
8737,
284,
7224,
3297,
486,
1742,
5673,
445,
12110,
1138,
310,
659,
2566,
445,
2102,
1138,
310,
659,
2566,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bin_to_dec(){
assert_eq!(bin_to_dec(&[1,0,1]), 5);
assert_eq!(bin_to_dec(&[0,0,0]), 0);
assert_eq!(bin_to_dec(&[5,0,0]), 0);
assert_eq!(bin_to_dec(&[0,0,0]), 0);
} | rust_cleaned_test_functions.jsonl/40589 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 137
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21816,
2346,
13783,
3032,
286,
2060,
10714,
10297,
6863,
2346,
13783,
2099,
58,
16,
11,
15,
11,
16,
9719,
220,
20,
317,
286,
2060,
10714,
10297,
6863,
2346,
13783,
2099,
58,
15,
11,
15,
11,
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_vector_1() {
// corresponding to tests/auth.c from NaCl
/* "Test Case 2" from RFC 4231 */
let key = Key([74, 101, 102, 101, 0, 0, 0, 0
, 0, 0, 0, 0, 0, 0, 0, 0
, 0, 0, 0, 0, 0, 0, 0, 0
, 0, 0, 0, 0, 0, 0, 0, 0]);
let c = [0x77... | rust_cleaned_test_functions.jsonl/69392 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 580
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12247,
62,
16,
368,
341,
262,
442,
12159,
311,
7032,
17369,
520,
504,
12812,
5066,
198,
262,
1391,
330,
2271,
11538,
220,
17,
1,
504,
39233,
220,
19,
17,
18,
16,
735,
262,
1077,
1376,
284,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ldabsb() {
test_interpreter_and_jit_asm!(
"
ldabsb 0x3
exit",
[
0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff,
],
(),
{ |_vm, res: Result| { res.unwrap() == 0x33... | rust_cleaned_test_functions.jsonl/58969 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 231
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
50573,
3435,
65,
368,
341,
262,
1273,
15318,
28637,
8378,
5374,
275,
67529,
33673,
286,
6228,
286,
26129,
3435,
65,
220,
15,
87,
18,
198,
286,
4869,
756,
286,
2278,
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... | 1 |
#[test]
fn test_start_update_during_timer_starts_update() {
let mut pool = LocalPool::new();
let spawner = pool.spawner();
let (timer, mut timers) = timer::BlockingTimer::new();
let policy_engine = MockPolicyEngine {
check_schedule: UpdateCheckSchedule {
... | rust_cleaned_test_functions.jsonl/126423 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1129
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4906,
8882,
814,
1677,
16255,
86552,
8882,
368,
341,
286,
1077,
5206,
7314,
284,
8774,
10551,
486,
931,
543,
286,
1077,
978,
67193,
284,
7314,
8572,
67193,
1428,
286,
1077,
320,
19278,
11,
5206,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_remove_dev_deps_with_devs() {
for flag in &[
"--example",
"--examples",
"--test",
"--tests",
"--bench",
"--benches",
"--all-targets",
][..]
{
let output = cargo_hack()
.args(&["hack", "check", "--remove-dev-d... | rust_cleaned_test_functions.jsonl/25302 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 534
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
10433,
76489,
6615,
10433,
82,
368,
341,
262,
369,
5181,
304,
609,
9640,
286,
14482,
8687,
756,
286,
14482,
51668,
756,
286,
14482,
1944,
756,
286,
14482,
23841,
756,
286,
14482,
27024,
756... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_block_device_rescan() {
let mut vmm = create_vmm_object(InstanceState::Uninitialized);
vmm.default_kernel_config(None);
let root_file = NamedTempFile::new().unwrap();
let scratch_file = NamedTempFile::new().unwrap();
let scratch_id = "not_root".to_string(... | rust_cleaned_test_functions.jsonl/28151 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2097
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7113,
9204,
4918,
4814,
368,
341,
286,
1077,
5206,
348,
3821,
284,
1855,
2273,
3821,
5314,
7,
8846,
486,
1806,
36161,
317,
286,
348,
3821,
8764,
26876,
5332,
26717,
626,
286,
1077,
3704,
2458,
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_equal() {
let val = CrdsValue::new_unsigned(CrdsData::ContactInfo(ContactInfo::default()));
let v1 = VersionedCrdsValue::new(1, val.clone());
let v2 = VersionedCrdsValue::new(1, val);
assert_eq!(v1, v2);
assert!(!(v1 != v2));
assert!(!overrides(&v1... | rust_cleaned_test_functions.jsonl/17145 | {
"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,
11478,
368,
341,
286,
1077,
1044,
284,
4553,
5356,
1130,
486,
931,
67830,
3025,
81,
5356,
1043,
486,
8732,
1731,
99102,
1731,
486,
2258,
7392,
286,
1077,
348,
16,
284,
6079,
291,
16001,
5356,
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_words() {
assert_eq!(
Words::new(
"The quick (\"brown\") fox can't jump 32.3 feet, right?",
|s: &&str| s.chars().any(is_alphanumeric),
).collect::<Vec<&str>>(),
&["The", "quick", "brown", "fox", "can't", "jump", "32.3", ... | rust_cleaned_test_functions.jsonl/5168 | {
"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,
18981,
368,
341,
286,
2060,
10714,
33673,
310,
27630,
486,
931,
1006,
394,
330,
785,
3974,
320,
2105,
64461,
62705,
38835,
646,
944,
7784,
220,
18,
17,
13,
18,
7541,
11,
1290,
35718,
394,
760,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_valid_redshift_describe_cluster_security_groups() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-describe-cluster-security-groups.xml",
);
let mock = MockRequestDispatcher::with_status(200... | rust_cleaned_test_functions.jsonl/12111 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 260
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
8337,
26058,
13418,
15768,
3114,
28441,
48726,
21148,
368,
341,
286,
1077,
7860,
9655,
284,
14563,
2582,
5062,
486,
878,
9655,
1006,
310,
330,
1944,
35569,
79372,
14,
1891,
756,
310,
330,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_octopus_flash_simulator_new() {
let input: Vec<String> = TEST_SMALL_DATA.iter().map(|s| s.to_string()).collect();
let expected_map: HashMap<Point2d<i32>, Octopus> = vec![
(Point2d::new(0, 0), Octopus { energy_level: 1 }),
(Point2d::new(1, 0), Octopus... | rust_cleaned_test_functions.jsonl/85575 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1109
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70135,
45870,
30225,
18314,
10511,
5921,
368,
972,
286,
1077,
1946,
25,
11312,
3464,
29,
284,
13602,
56207,
7896,
19471,
1005,
2186,
22428,
82,
91,
274,
2389,
3904,
6011,
17384,
7317,
286,
1077,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fn_signature_for_impl() {
let (desc, param) = get_signature(
r#"struct F; impl F { pub fn new() { F{}} }
fn bar() {let _ : F = F::new(<|>);}"#,
);
assert_eq!(desc.name, "new".to_string());
assert_eq!(desc.params, Vec::<String>::new());
assert_eq!(desc.ret_type, None)... | rust_cleaned_test_functions.jsonl/75854 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 165
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15246,
39859,
5478,
21007,
368,
341,
262,
1077,
320,
8614,
11,
1685,
8,
284,
633,
39859,
1006,
286,
435,
55543,
1235,
434,
26,
11605,
434,
314,
6675,
5168,
501,
368,
314,
434,
90,
3417,
456,
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_membership_change_configuration_remove_voter() -> Result<()> {
check_membership_change_configuration((vec![1, 2], vec![]), (vec![1], vec![]))
} | rust_cleaned_test_functions.jsonl/91378 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 77
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84635,
15947,
35726,
18193,
2273,
25392,
368,
1464,
5714,
71698,
341,
286,
1779,
84635,
15947,
35726,
1188,
4083,
20703,
16,
11,
220,
17,
1125,
7486,
0,
1294,
701,
320,
4083,
20703,
16,
1125,
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 |
#[test]
fn test_combine_child_keys_index() {
let kids = Children::Count(Cell::new(3));
assert_eq!(vec!["foo.bar[0]".to_string(), "foo.bar[1]".to_string(), "foo.bar[2]".to_string()],
kids.combine_child_keys("foo.bar".to_string()));
} | rust_cleaned_test_functions.jsonl/86194 | {
"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,
72374,
17268,
12631,
3560,
368,
341,
262,
1077,
6837,
284,
15044,
486,
2507,
82530,
486,
931,
7,
18,
1106,
262,
2060,
10714,
10297,
4083,
0,
1183,
7975,
22001,
58,
15,
60,
3263,
983,
3904,
1507,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_send_message() {
init!("true");
let msg = CString::new("MESSAGE").unwrap().into_raw();
let send_msg_options = CString::new(json!({"msg_type":"type", "msg_title": "title", "ref_msg_id":null}).to_string()).unwrap().into_raw();
let connection_handle = ::connection::... | rust_cleaned_test_functions.jsonl/25730 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 303
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13565,
6462,
368,
341,
286,
2930,
17223,
1866,
3071,
286,
1077,
3750,
284,
56956,
486,
931,
445,
50498,
1827,
15454,
1005,
18122,
16067,
543,
286,
1077,
3624,
6483,
8743,
284,
56956,
486,
931,
930... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_request() {
use helix::*;
let req = CheckAutoModStatusRequest::builder()
.broadcaster_id("198704263".to_string())
.build();
// From twitch docs
let data = br#"
{
"data": [
{
"msg_id": "123",
"is_permitted": true
},
{
"msg_id... | rust_cleaned_test_functions.jsonl/1873 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 343
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7893,
368,
341,
262,
990,
11338,
941,
56162,
262,
1077,
4232,
284,
4248,
13253,
4459,
2522,
1900,
486,
17850,
741,
286,
659,
65,
8546,
32020,
842,
445,
16,
24,
23,
22,
15,
19,
17,
21,
18,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_check_lock() {
let path = Builder::new()
.prefix("_test_storage_mvcc_reader_check_lock")
.tempdir()
.unwrap();
let path = path.path().to_str().unwrap();
let region = make_region(1, vec![], vec![]);
let db = open_db(path, true);
... | rust_cleaned_test_functions.jsonl/83621 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1145
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
9818,
368,
341,
286,
1077,
1815,
284,
20626,
486,
931,
741,
310,
659,
11849,
16975,
1944,
23310,
73187,
638,
22306,
7200,
9818,
1138,
310,
659,
3888,
3741,
741,
310,
659,
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 |
#[test]
fn test_keyusage_flags() {
let ku = KeyUsage { flags: 98 };
assert!(!ku.digital_signature());
assert!(ku.non_repudiation());
assert!(!ku.key_encipherment());
assert!(!ku.data_encipherment());
assert!(!ku.key_agreement());
assert!(ku.key_cert_sign());
assert!(ku.crl_sign()... | rust_cleaned_test_functions.jsonl/53332 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 173
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3097,
17698,
14130,
368,
341,
262,
1077,
36600,
284,
5309,
14783,
314,
8042,
25,
220,
24,
23,
2605,
262,
2060,
0,
3471,
12133,
87446,
39859,
1423,
262,
2060,
10297,
12133,
49883,
25533,
661,
7101,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_buffer_sizes() {
let buffer_sizes = ["0", "50K", "50k", "1M", "100M"];
for buffer_size in &buffer_sizes {
TestScenario::new(util_name!())
.ucmd_keepenv()
.arg("-n")
.arg("-S")
.arg(buffer_size)
.arg("ext_sort.txt")
... | rust_cleaned_test_functions.jsonl/20449 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 559
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7776,
32159,
368,
341,
262,
1077,
4147,
32159,
284,
4383,
15,
497,
330,
20,
15,
42,
497,
330,
20,
15,
74,
497,
330,
16,
44,
497,
330,
16,
15,
15,
44,
6332,
262,
369,
4147,
2368,
304,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_h1_service_error() {
let mut srv = TestServer::new(|| {
HttpService::build()
.h1(|_| Err::<Response, Error>(error::ErrorBadRequest("error")))
});
let response = srv.block_on(srv.get("/").send()).unwrap();
assert_eq!(response.status(), http::StatusCode::BAD_RE... | rust_cleaned_test_functions.jsonl/102563 | {
"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,
1523,
16,
12267,
4096,
368,
341,
262,
1077,
5206,
43578,
284,
3393,
5475,
486,
931,
79453,
341,
286,
4823,
1860,
486,
5834,
741,
310,
659,
71,
16,
22428,
35395,
15495,
27638,
2582,
11,
4600,
223... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bip39() {
let tests = tests();
for t in tests.iter() {
assert_eq!(
to_hex(to_seed(t.mnemonic, "TREZOR").unwrap().to_vec()),
t.seed.to_string()
);
assert_eq!(
to_entropy(t.mnemonic).unwrap().to_vec(),
from_hex(t.entropy.to_string()).unwrap()
);
assert_eq!(
f... | rust_cleaned_test_functions.jsonl/9448 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 216
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
573,
18,
24,
368,
341,
197,
10217,
7032,
284,
7032,
543,
197,
2023,
259,
304,
7032,
19471,
368,
341,
298,
6948,
10714,
33673,
571,
31709,
32655,
12186,
33809,
1155,
744,
70775,
11,
330,
51,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_leaf_in_tree() {
let tests = [(0u32, 2u32), (1, 2), (4, 5), (9, 10)];
for test in tests.iter() {
leaf_in_tree(test.0.into(), test.1.into()).unwrap();
}
} | rust_cleaned_test_functions.jsonl/98698 | {
"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,
38909,
1243,
11663,
368,
341,
262,
1077,
7032,
284,
17826,
15,
84,
18,
17,
11,
220,
17,
84,
18,
17,
701,
320,
16,
11,
220,
17,
701,
320,
19,
11,
220,
20,
701,
320,
24,
11,
220,
16,
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_field_regex_empty() {
let mut cmd = assert_cmd::Command::cargo_bin(env!("CARGO_PKG_NAME")).unwrap();
cmd.args(&["-f", "3-5", "-D", "[ \\t]+", "--", "awk", "{print \"@@@\"}"])
.write_stdin(" 2\t 3 4 \t \n")
.assert()
.stdout(" 2\t @@@ @@@ \t ... | rust_cleaned_test_functions.jsonl/7930 | {
"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,
5013,
41832,
15124,
368,
341,
286,
1077,
5206,
5439,
284,
2060,
11684,
486,
4062,
486,
66715,
21816,
16978,
17223,
34,
7581,
46,
94126,
4708,
15197,
15454,
543,
286,
5439,
16365,
2099,
1183,
12,
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_rpc_client() {
solana_logger::setup();
let alice = Keypair::new();
let test_validator =
TestValidator::with_no_fees(alice.pubkey(), None, SocketAddrSpace::Unspecified);
let bob_pubkey = solana_sdk::pubkey::new_rand();
let client = RpcClient::new(test_validator.rpc_... | rust_cleaned_test_functions.jsonl/10197 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 656
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60799,
8179,
368,
341,
262,
2048,
3362,
27413,
486,
15188,
1428,
262,
1077,
70433,
284,
6569,
1082,
1310,
486,
931,
543,
262,
1077,
1273,
64959,
4035,
286,
3393,
14256,
486,
4197,
6536,
761,
5516,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_row_len() {
let table = Table::find_first(TABLE_TD).unwrap();
assert_eq!(vec![2], table.iter().map(|r| r.len()).collect::<Vec<_>>());
let table = Table::find_first(TABLE_COMPLEX).unwrap();
assert_eq!(
vec![2, 3, 0, 4],
table.iter().map(|r|... | rust_cleaned_test_functions.jsonl/47591 | {
"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,
8530,
6043,
368,
341,
286,
1077,
1965,
284,
6633,
486,
3903,
12978,
83006,
95862,
568,
15454,
543,
286,
2060,
10714,
10297,
4083,
20703,
17,
1125,
1965,
19471,
1005,
2186,
22428,
81,
91,
435,
1940... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_transparent_function() {
let hdr = indoc! {"
#include <string>
#include <cstdint>
inline uint32_t take_string(std::string a) { return a.size(); }
"};
let rs = quote! {
assert_eq!(ffi::take_string("hello"), 5);
};
run_test("", hdr, rs, &[... | rust_cleaned_test_functions.jsonl/9894 | {
"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,
3904,
7965,
3765,
9174,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
286,
671,
997,
366,
917,
397,
286,
671,
997,
366,
96975,
397,
286,
7381,
2622,
18,
17,
528,
1896,
3904,
5194,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_datetime_date_and_time() {
let tz = FixedOffset::east(5*60*60);
let d = tz.ymd(2014, 5, 6).and_hms(7, 8, 9);
assert_eq!(d.time(), NaiveTime::from_hms(7, 8, 9));
assert_eq!(d.date(), tz.ymd(2014, 5, 6));
assert_eq!(d.date().naive_local(), NaiveDate::from_ym... | rust_cleaned_test_functions.jsonl/17717 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 584
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28943,
4164,
8378,
3009,
368,
341,
286,
1077,
42528,
284,
20149,
6446,
486,
60501,
7,
20,
9,
21,
15,
9,
21,
15,
317,
286,
1077,
294,
284,
42528,
13,
1600,
67,
7,
17,
15,
16,
19,
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_pad_size() {
assert_eq!(pad_size("123", 1), "123");
assert_eq!(pad_size("123", 3), "123");
assert_eq!(pad_size("123", 5), "N123N");
assert_eq!(pad_size("123", 7), "NN123NN");
assert_eq!(pad_size("1234", 2), "1234");
assert_eq!(pad_size("1234", 4),... | rust_cleaned_test_functions.jsonl/35943 | {
"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,
30290,
2368,
368,
341,
286,
2060,
10714,
10297,
13242,
2368,
445,
16,
17,
18,
497,
220,
16,
701,
330,
16,
17,
18,
797,
286,
2060,
10714,
10297,
13242,
2368,
445,
16,
17,
18,
497,
220,
18,
70... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_string_into_repetition() {
assert_eq!(
Repetition::Required
.to_string()
.parse::<Repetition>()
.unwrap(),
Repetition::Required
);
assert_eq!(
Repetition::Optional
.to_string()
.parse::<Repetition>()
.unwrap(),
Repetition::Optional
);
assert_eq!... | rust_cleaned_test_functions.jsonl/126070 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 210
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
3904,
45514,
1288,
55767,
368,
341,
197,
6948,
10714,
33673,
298,
197,
693,
55767,
486,
8164,
198,
571,
197,
2389,
3904,
741,
571,
197,
4632,
27638,
693,
55767,
18949,
571,
197,
55395,
3148,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sub_matrix() {
assert_eq!(A - B,
Matrix3::new(-1.0f64, -1.0f64, -1.0f64,
-1.0f64, -1.0f64, -1.0f64,
-1.0f64, -1.0f64, -1.0f64));
} | rust_cleaned_test_functions.jsonl/30150 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 192
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
10193,
368,
341,
286,
2060,
10714,
10297,
32,
481,
425,
345,
4293,
11631,
18,
486,
931,
4080,
16,
13,
15,
69,
21,
19,
11,
481,
16,
13,
15,
69,
21,
19,
11,
481,
16,
13,
15,
69,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_builder() {
use std::collections::HashMap;
use std::hash::BuildHasherDefault;
let mut map = HashMap::<u32, u64, BuildHasherDefault<AHasher>>::default();
map.insert(1, 3);
} | rust_cleaned_test_functions.jsonl/26618 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 106
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28532,
368,
341,
286,
990,
1460,
486,
51137,
486,
18497,
280,
286,
990,
1460,
486,
8296,
486,
11066,
6370,
261,
3675,
401,
286,
1077,
5206,
2415,
284,
10528,
27638,
84,
18,
17,
11,
575,
21,
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_get_txn_commit_record_of_pessimistic_txn() {
let path = tempfile::Builder::new()
.prefix("_test_storage_mvcc_reader_get_txn_commit_record_of_pessimistic_txn")
.tempdir()
.unwrap();
let path = path.path().to_str().unwrap();
let region = ... | rust_cleaned_test_functions.jsonl/125629 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 769
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
92299,
36346,
14192,
3575,
620,
66733,
4532,
92299,
368,
341,
286,
1077,
1815,
284,
54819,
486,
3297,
486,
931,
741,
310,
659,
11849,
16975,
1944,
23310,
73187,
638,
22306,
3062,
92299,
36346,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_projection_push_down_optimizer_group_by() -> anyhow::Result<()> {
use pretty_assertions::assert_eq;
use crate::optimizers::*;
use crate::sql::*;
let ctx = crate::tests::try_create_context()?;
let plan = PlanParser::create(ctx.clone())
.build... | rust_cleaned_test_functions.jsonl/35085 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 452
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
72738,
14218,
13998,
68168,
6288,
3710,
368,
1464,
88964,
486,
2077,
71698,
341,
286,
990,
5020,
16553,
908,
486,
2207,
10714,
401,
286,
990,
17717,
486,
19133,
12230,
56162,
286,
990,
17717,
486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_std_rng_seeded() {
let s = task_rng().gen_iter::<uint>().take(256).collect::<Vec<uint>>();
let mut ra: StdRng = SeedableRng::from_seed(s.as_slice());
let mut rb: StdRng = SeedableRng::from_seed(s.as_slice());
assert!(order::equals(ra.gen_ascii_chars().take(100),
... | rust_cleaned_test_functions.jsonl/23767 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 208
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15656,
66849,
3453,
29935,
368,
341,
286,
1077,
274,
284,
3383,
66849,
1005,
4370,
11723,
27638,
2496,
10483,
22769,
7,
17,
20,
21,
568,
17384,
27638,
10050,
16434,
37038,
286,
1077,
5206,
15122,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_skip_whitespace_forward() {
let code: Vec<char> = " text".to_string().chars().collect();
assert_eq!(next_non_whitespace(&code, 0), 5);
let code: Vec<char> = "text".to_string().chars().collect();
assert_eq!(next_non_whitespace(&code, 0), 0);
let code:... | rust_cleaned_test_functions.jsonl/126882 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 314
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44830,
86175,
32121,
368,
341,
286,
1077,
2038,
25,
11312,
21919,
29,
284,
330,
257,
1467,
3263,
983,
3904,
1005,
19255,
1005,
17384,
543,
286,
2060,
10714,
10297,
3600,
21637,
86175,
2099,
1851,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_xdbl() {
let dbl_xp = xdbl(paxz(), a24plus(), c24());
let x = affine_x(dbl_xp);
let dbl_p = dbl((a(), b()), paxy());
assert_eq!(x, dbl_p.0)
} | rust_cleaned_test_functions.jsonl/11565 | {
"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,
3212,
72602,
368,
341,
262,
1077,
88995,
3212,
79,
284,
856,
72602,
1295,
706,
89,
1507,
264,
17,
19,
7138,
1507,
272,
17,
19,
1423,
262,
1077,
856,
284,
68809,
3212,
1500,
2024,
3212,
79,
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_get_element_attributes_command_decode_all_attributes() {
let b = GetElementAttributesCommand::decode(&[
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // NOW_PLAYING identifier
0x00, // 0 attributes for all
])
.expect("unable to decode");
... | rust_cleaned_test_functions.jsonl/93004 | {
"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,
7894,
18240,
10811,
15227,
5705,
18240,
368,
341,
286,
1077,
293,
284,
2126,
1691,
10516,
4062,
486,
18196,
2099,
9640,
310,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
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_randomized_key() {
let mut rnd = rand::thread_rng();
for mut test in new_test_suits().drain(..) {
for _ in 0..1000 {
let key = random_key(rnd.gen_range(1, 10));
let value = random_value(rnd.gen_range(1, 5));
test.add(&ke... | rust_cleaned_test_functions.jsonl/22551 | {
"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,
22644,
1506,
3097,
368,
341,
286,
1077,
5206,
37193,
284,
10382,
486,
4528,
66849,
543,
286,
369,
5206,
1273,
304,
501,
4452,
643,
11797,
1005,
3612,
466,
56422,
8,
341,
310,
369,
716,
304,
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... | 3 |
#[test]
fn test_add_edge() {
let mut g = MatrixGraph::new();
let a = g.add_node('a');
let b = g.add_node('b');
let c = g.add_node('c');
g.add_edge(a, b, ());
g.add_edge(b, c, ());
assert_eq!(g.node_count(), 3);
assert_eq!(g.edge_count(), 2);
} | rust_cleaned_test_functions.jsonl/81958 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 178
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
17932,
368,
341,
286,
1077,
5206,
342,
284,
11631,
11212,
486,
931,
543,
286,
1077,
264,
284,
342,
1364,
5084,
492,
64,
1157,
286,
1077,
293,
284,
342,
1364,
5084,
492,
65,
1157,
286,
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_pin_rc() {
unsafe {
let pointer_ops = DefaultPointerOps::<Pin<Rc<_>>>::new();
let p = Pin::new(Rc::new(1));
let a: *const i32 = &*p;
let r = pointer_ops.into_raw(p);
assert_eq!(a, r);
let p2: Pin<Rc<i32>> = pointer_o... | rust_cleaned_test_functions.jsonl/82640 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 255
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26296,
30299,
368,
341,
286,
19860,
341,
310,
1077,
7445,
21959,
284,
7899,
9084,
38904,
27638,
19861,
23370,
66,
32399,
2452,
6831,
931,
543,
310,
1077,
281,
284,
17471,
486,
931,
2785,
66,
486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_indirect_yoffset_am_2() {
let mut cpu = setup(0x00, true, 0x31, Some(0x25));
*cpu.regset_mut().y_index_mut() = 0x10;
cpu.writ_byte(0x0025, 0x01);
cpu.writ_byte(0x0026, 0xA7);
cpu.writ_byte(0xA711, 0x34);
let result = indirect_y_am(&mut cpu);
... | rust_cleaned_test_functions.jsonl/26587 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 340
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9122,
1226,
4178,
3176,
22880,
62,
17,
368,
341,
286,
1077,
5206,
17319,
284,
6505,
7,
15,
87,
15,
15,
11,
830,
11,
220,
15,
87,
18,
16,
11,
4329,
7,
15,
87,
17,
20,
1106,
286,
353,
1647... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_flac_decoding() {
// Test on flac
let file = std::fs::File::open("tests/sounds/Test1.flac").unwrap();
let decoder = Decoder::new(BufReader::new(file)).unwrap();
let info = decoder.info();
assert_eq!("FLAC", format!("{}", info.format()));
assert_e... | rust_cleaned_test_functions.jsonl/12253 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 231
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5081,
580,
13783,
3700,
368,
341,
286,
442,
3393,
389,
1320,
580,
198,
286,
1077,
1034,
284,
1460,
486,
3848,
486,
1703,
486,
2508,
445,
23841,
2687,
3095,
80527,
16,
8103,
580,
1827,
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_shrink_next_slots() {
let accounts = AccountsDB::new_single();
let mut current_slot = 7;
assert_eq!(
vec![None, None, None],
(0..3)
.map(|_| accounts.next_shrink_slot())
.collect::<Vec<_>>()
);
acc... | rust_cleaned_test_functions.jsonl/86976 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 534
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3712,
34365,
11257,
54161,
368,
341,
286,
1077,
9618,
284,
40655,
3506,
486,
931,
19487,
1428,
286,
1077,
5206,
1482,
27563,
284,
220,
22,
401,
286,
2060,
10714,
33673,
310,
7486,
20703,
4064,
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... | 2 |
#[test]
fn test_unexpected_char() {
let scanner = Scanner::new();
let source = "?%".to_owned();
assert_eq!(
Err(Error::UnexpectedCharacterError { line: 1, c: '?' }),
scanner.scan_tokens(source)
);
} | rust_cleaned_test_functions.jsonl/92096 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 135
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
7325,
9232,
368,
341,
286,
1077,
20775,
284,
17170,
486,
931,
543,
286,
1077,
2530,
284,
27244,
4,
3263,
983,
51973,
543,
286,
2060,
10714,
33673,
310,
15495,
37396,
486,
29430,
12404,
1454,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let mut p = EdgeProperties::default();
p.update("highway", "secondary");
assert_eq!(CAR_SECONDARY, p.car_forward);
p.update("highway", "primary_link");
assert_eq!(CAR_PRIMARY, p.car_forward);
p.update("highway", "motorway");
assert_eq!(CAR_MOTORWAY, p.car... | rust_cleaned_test_functions.jsonl/67639 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 989
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
368,
341,
262,
1077,
5206,
281,
284,
10349,
7903,
486,
2258,
543,
262,
281,
5317,
445,
11892,
3117,
497,
330,
18699,
797,
262,
2060,
10714,
10297,
36390,
56224,
8642,
11,
281,
26890,
32121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_alloc_free() {
// large alloc
{
let heap = AlignedMemory::new(100, HOST_ALIGN);
let memory_mapping = MemoryMapping::new::<UserError>(
vec![MemoryRegion::new_from_slice(
heap.as_slice(),
MM... | rust_cleaned_test_functions.jsonl/16355 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2720
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20344,
6659,
53668,
14802,
8905,
368,
341,
286,
442,
3460,
5574,
198,
286,
341,
310,
1077,
17364,
284,
1674,
1542,
10642,
486,
931,
7,
16,
15,
15,
11,
44578,
36688,
317,
310,
1077,
4938,
26930,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_return_foreign_class_arc() {
let gen_code = parse_code(
"test_work_with_rc",
r#"
foreigner_class!(class Boo {
self_type Boo;
constructor create_boo() -> Arc<Mutex<Boo>>;
method Boo::test(&self, _: bool) -> f32;
method Boo::set_a(&mut self, _: i32);
});
foreign... | rust_cleaned_test_functions.jsonl/71619 | {
"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,
12511,
78983,
4790,
62914,
368,
341,
262,
1077,
4081,
4136,
284,
4715,
4136,
1006,
286,
330,
1944,
11498,
6615,
30299,
756,
286,
435,
2,
698,
28443,
261,
4790,
10297,
1040,
73684,
341,
262,
656,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bytes_be() {
fn check(s: &str, result: &str) {
let b = BigUint::parse_bytes(result.as_bytes(), 10).unwrap();
assert_eq!(b.to_bytes_be(), s.as_bytes());
}
check("A", "65");
check("AA", "16705");
check("AB", "16706");
check... | rust_cleaned_test_functions.jsonl/90111 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 337
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
12524,
21263,
368,
341,
286,
5168,
1779,
1141,
25,
609,
495,
11,
1102,
25,
609,
495,
8,
341,
310,
1077,
293,
284,
6164,
21570,
486,
6400,
12524,
4456,
5357,
12524,
1507,
220,
16,
15,
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_as() {
use glam::DMat4;
assert_eq!(
DMat4::from_cols_array_2d(&[
[1.0, 2.0, 3.0, 4.0],
[5.0, 6.0, 7.0, 8.0],
[9.0, 10.0, 11.0, 12.0],
[13.0, 14.0, 15.0, 16.0]
]),
Mat4::from_cols_a... | rust_cleaned_test_functions.jsonl/29520 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 805
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11898,
368,
341,
286,
990,
41012,
486,
8395,
266,
19,
280,
286,
2060,
10714,
33673,
310,
422,
11575,
19,
486,
1499,
25347,
3858,
62,
17,
67,
2099,
9640,
394,
508,
16,
13,
15,
11,
220,
17,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bounded() {
let schema = Schema::new(vec![Field::new("int", DataType::UInt32, false)]);
let data = vec![
vec!["0"],
vec!["1"],
vec!["2"],
vec!["3"],
vec!["4"],
vec!["5"],
vec!["6"],
];
... | rust_cleaned_test_functions.jsonl/16424 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 728
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
13082,
368,
341,
286,
1077,
10802,
284,
12539,
486,
931,
25592,
20703,
1877,
486,
931,
445,
396,
497,
33172,
486,
18777,
18,
17,
11,
895,
41958,
286,
1077,
821,
284,
7486,
90515,
310,
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_hex_deserialize_owned() {
assert_eq!(
Hex(0),
serde_json::from_reader(Cursor::new("\"0\"")).unwrap()
);
assert_eq!(
Hex(42),
serde_json::from_reader(Cursor::new("\"42\"")).unwrap()
);
assert_eq!(
... | rust_cleaned_test_functions.jsonl/53237 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 322
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32655,
15768,
9050,
51973,
368,
341,
286,
2060,
10714,
33673,
310,
27228,
7,
15,
1326,
310,
61570,
9455,
486,
1499,
22306,
3025,
3823,
486,
931,
38915,
15,
2105,
15197,
15454,
741,
286,
1439,
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_gaussian_blur_f32_rejects_zero_sigma() {
let image = gray_image!(
1, 2, 3;
4, 5, 6;
7, 8, 9
);
let _ = gaussian_blur_f32(&image, 0.0);
} | rust_cleaned_test_functions.jsonl/35613 | {
"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,
1889,
46972,
13141,
324,
761,
18,
17,
1288,
583,
82,
19359,
49005,
368,
341,
286,
1077,
2168,
284,
17545,
4954,
33673,
310,
220,
16,
11,
220,
17,
11,
220,
18,
280,
310,
220,
19,
11,
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,
1... | 1 |
#[test]
fn test_map_insert_fallible() {
let mut a = SgMap::<_, _, 3>::new();
assert!(a.try_insert(1, "1A").is_ok());
assert!(a.try_insert(2, "2").is_ok());
assert_eq!(a.try_insert(3, "3"), Ok(None));
assert_eq!(a.try_insert(1, "1B"), Ok(Some("1A")));
assert_eq!(a.try_insert(4, "4"), Er... | rust_cleaned_test_functions.jsonl/18652 | {
"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,
5376,
17678,
761,
541,
1238,
368,
341,
262,
1077,
5206,
264,
284,
328,
70,
2227,
27638,
6878,
8358,
220,
18,
6831,
931,
1428,
262,
2060,
10297,
64,
48779,
17678,
7,
16,
11,
330,
16,
32,
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_raw() {
let hw1 = RefCell::new(CpuHardware::new());
let hw2 = RefCell::new(CpuHardware::new());
let nullptr = ptr::null::<u8>();
unsafe {
let buf1 = Buffer::raw(&hw1, 1);
assert!(ptr::eq(buf1.hardware, &hw1));
assert_eq!(buf1.si... | rust_cleaned_test_functions.jsonl/78617 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 518
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16067,
368,
341,
286,
1077,
31256,
16,
284,
8550,
3599,
486,
931,
3025,
5584,
66862,
486,
931,
1423,
286,
1077,
31256,
17,
284,
8550,
3599,
486,
931,
3025,
5584,
66862,
486,
931,
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_netsvc_target_has_no_ssh() {
use std::iter::FromIterator;
let target = Target::new_with_netsvc_addrs(
Some("foo"),
BTreeSet::from_iter(
vec!["[fe80::1%1]:0".parse::<SocketAddr>().unwrap().into()].into_iter(),
),
);
... | rust_cleaned_test_functions.jsonl/115227 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 556
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
1415,
7362,
11123,
21778,
6536,
82805,
368,
341,
286,
990,
1460,
486,
2015,
486,
3830,
11951,
280,
286,
1077,
2169,
284,
13483,
486,
931,
6615,
1089,
1415,
7362,
2891,
5428,
1006,
310,
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... | 1 |
#[test]
fn test_riddle_solve() {
let mut riddle = Riddle::new(
"title".to_string(),
"text".to_string(),
"hint".to_string(),
"answer".to_string(),
1,
);
riddle.solve();
assert!(riddle.is_solved());
} | rust_cleaned_test_functions.jsonl/34252 | {
"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,
1710,
3310,
86246,
368,
341,
286,
1077,
5206,
435,
3310,
284,
431,
3310,
486,
931,
1006,
310,
330,
2102,
3263,
983,
3904,
3148,
310,
330,
1318,
3263,
983,
3904,
3148,
310,
330,
46125,
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_enum() {
#[derive(Serialize)]
enum E {
Unit,
Newtype(bool),
Tuple(bool, bool),
Struct { t: bool, f: bool },
}
test_json(E::Unit);
test_json(E::Newtype(true));
test_json(E::Tuple(true, false));
... | rust_cleaned_test_functions.jsonl/91597 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 210
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31054,
368,
341,
286,
11506,
27098,
3759,
9050,
5563,
286,
7618,
468,
341,
310,
7954,
345,
310,
1532,
1313,
9764,
1326,
310,
24622,
9764,
11,
1807,
1326,
310,
16139,
314,
259,
25,
1807,
11,
282,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_gl() { unsafe {
gl::Clear(gl::COLOR_BUFFER_BIT);
let _: libc::c_uint = gl::CreateProgram();
gl::CompileShader(5);
gl::GetActiveUniformBlockiv(0, 0, gl::UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER,
std::ptr::null_mut());
let _: *mut libc::c_void = gl::MapBuffer(0, 0)... | rust_cleaned_test_functions.jsonl/103571 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 154
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34569,
368,
314,
19860,
341,
262,
2770,
486,
14008,
30376,
486,
30943,
14394,
11189,
317,
262,
1077,
58536,
42142,
486,
66,
15807,
284,
2770,
486,
4021,
10690,
543,
262,
2770,
486,
46126,
13486,
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_reverse() {
let in_values: Vec<u8> = vec![2, 20];
let mut dna_string = DnaString::new();
let rev_dna_string = dna_string.reverse();
assert_eq!(dna_string, rev_dna_string);
dna_string.push_bytes(&in_values, 8);
// Contents should be 00010100 000000... | rust_cleaned_test_functions.jsonl/95215 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 240
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43277,
368,
341,
286,
1077,
304,
9146,
25,
11312,
34837,
23,
29,
284,
7486,
20703,
17,
11,
220,
17,
15,
935,
286,
1077,
5206,
75334,
3904,
284,
422,
3376,
703,
486,
931,
543,
286,
1077,
5772,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dispatcher() {
let mut dispatcher = MethodDispatcher::new();
register_dummy_method(&mut dispatcher);
let mkvs = Tree::make()
.with_root_type(RootType::State)
.new(Box::new(NoopReadSyncer));
let consensus_state = ConsensusState::new(mkvs);
... | rust_cleaned_test_functions.jsonl/18338 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 968
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
92189,
368,
341,
286,
1077,
5206,
38799,
284,
6730,
21839,
486,
931,
543,
286,
4161,
60321,
9032,
2099,
6984,
38799,
626,
286,
1077,
23789,
11562,
284,
8942,
486,
6927,
741,
310,
659,
4197,
12993,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_default_namespace_reset() {
let mut r = Reader::from_str("<a xmlns=\"www1\"><b xmlns=\"\"></b></a>");
r.trim_text(true);
let mut buf = Vec::new();
let mut ns_buf = Vec::new();
if let Ok((Some(a), Start(_))) = r.read_namespaced_event(&mut buf, &mut ns_buf) {
assert_eq... | rust_cleaned_test_functions.jsonl/42094 | {
"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,
9993,
41571,
18983,
368,
341,
262,
1077,
5206,
435,
284,
25166,
486,
1499,
2895,
9639,
64,
24967,
4070,
2136,
16,
34681,
65,
24967,
4070,
40497,
65,
1472,
64,
15084,
262,
435,
16419,
4326,
3715,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_arch_sparc_detail() {
use arch::sparc::SparcOperand::*;
use arch::sparc::SparcReg::*;
use arch::sparc::*;
use capstone_sys::sparc_op_mem;
test_arch_mode_endian_insns_detail(
&mut Capstone::new()
.sparc()
.mode(sparc::ArchMode::Default)
... | rust_cleaned_test_functions.jsonl/127439 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3623
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34330,
643,
1732,
66,
14480,
368,
341,
262,
990,
5325,
486,
77884,
66,
486,
50,
1732,
66,
29940,
56162,
262,
990,
5325,
486,
77884,
66,
486,
50,
1732,
66,
3477,
56162,
262,
990,
5325,
486,
778... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rfc2822() {
use super::NOT_ENOUGH;
use super::*;
use crate::offset::FixedOffset;
use crate::DateTime;
let testdates = [
("Tue, 20 Jan 2015 17:35:20 -0800", Ok("Tue, 20 Jan 2015 17:35:20 -0800")), // normal case
("Fri, 2 Jan 2015 17:35:20 -0800", Ok("Fri... | rust_cleaned_test_functions.jsonl/5317 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
8316,
17,
23,
17,
17,
368,
341,
262,
990,
2256,
486,
14065,
6300,
83733,
280,
262,
990,
2256,
56162,
262,
990,
17717,
486,
3176,
486,
13520,
6446,
280,
262,
990,
17717,
486,
7689,
401,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_output_ser_deser() {
let keychain = ExtKeychain::from_random_seed(false).unwrap();
let key_id = ExtKeychain::derive_key_id(1, 1, 0, 0, 0);
let commit = keychain.commit(5, &key_id).unwrap();
let proof = proof::create(&keychain, 5, &key_id, commit, None).unwrap();
let out = Output {
featur... | rust_cleaned_test_functions.jsonl/114585 | {
"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,
7645,
75861,
15768,
261,
368,
341,
10217,
1376,
8819,
284,
9447,
1592,
8819,
486,
1499,
22644,
33809,
3576,
568,
15454,
543,
10217,
1376,
842,
284,
9447,
1592,
8819,
486,
27098,
3097,
842,
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_as_mut_ptr() {
let arr = [0xff; 3];
let mut vec = LocalVec::<_, 8>::from_array(arr);
let ptr = vec.as_mut_ptr();
assert_eq!(ptr, &mut vec[0] as *mut i32);
} | rust_cleaned_test_functions.jsonl/126350 | {
"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,
11898,
29523,
4348,
368,
341,
286,
1077,
2890,
284,
508,
15,
9020,
26,
220,
18,
935,
286,
1077,
5206,
7486,
284,
8774,
10050,
27638,
6878,
220,
23,
6831,
1499,
3858,
10939,
317,
286,
1077,
10087... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_execution_phase() {
let num_nodes = 1;
let channel_size = 30;
let mut runtime = consensus_runtime();
let (mut execution_phase_tx, execution_phase_rx) =
channel::new_test::<ExecutionChannelType>(channel_size);
let (commit_phase_tx, mut commit_phase_rx) =
chan... | rust_cleaned_test_functions.jsonl/22879 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 875
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60948,
37593,
368,
341,
262,
1077,
1629,
14896,
284,
220,
16,
280,
262,
1077,
5496,
2368,
284,
220,
18,
15,
280,
262,
1077,
5206,
15592,
284,
23869,
33232,
1428,
262,
1077,
320,
6984,
11320,
375... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_case_5() {
let ikm = decode("0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c").unwrap();
let salt = decode("").unwrap();
let info = decode("").unwrap();
let expected_prk = decode(
"5346b376bf3aa9f84f8f6ed5b1c4f489172e244dac303d12f68ecc766ea600aa88495e... | rust_cleaned_test_functions.jsonl/10124 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 494
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19096,
62,
20,
368,
341,
286,
1077,
13361,
76,
284,
16895,
445,
15,
66,
15,
66,
15,
66,
15,
66,
15,
66,
15,
66,
15,
66,
15,
66,
15,
66,
15,
66,
15,
66,
15,
66,
15,
66,
15,
66,
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_impl_annotation() {
let mut opt = Opt::default();
opt.cxx_impl_annotations = Some("ANNOTATION".to_owned());
let source = BRIDGE0.parse().unwrap();
let generated = generate_header_and_cc(source, &opt).unwrap();
let output = str::from_utf8(&generated.implementation).unwrap();
... | rust_cleaned_test_functions.jsonl/119059 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21007,
61237,
368,
341,
262,
1077,
5206,
3387,
284,
16554,
486,
2258,
543,
262,
3387,
520,
4146,
21007,
78896,
284,
4329,
445,
46875,
3495,
3263,
983,
51973,
1423,
262,
1077,
2530,
284,
18803,
541... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_entry_context() {
let tbl: Vec<&[ProposalContext]> = vec![
&[ProposalContext::SPLIT],
&[ProposalContext::SYNC_LOG],
&[ProposalContext::PREPARE_MERGE],
&[ProposalContext::SPLIT, ProposalContext::SYNC_LOG],
&[ProposalContext::PREP... | rust_cleaned_test_functions.jsonl/6234 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 402
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9078,
8467,
368,
341,
286,
1077,
21173,
25,
11312,
52244,
58,
98637,
1972,
25669,
284,
7486,
90515,
310,
44590,
98637,
1972,
486,
50,
51597,
1259,
310,
44590,
98637,
1972,
486,
47176,
8419,
1259,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_frag_parse() {
let value = frag_parse!("%s", "%s__test").expect("failed to parse");
assert_eq!(value, "test");
let value = frag_parse!("%d", "%d__42").expect("parse error");
assert_eq!(value, 42_i64);
let frag_str = "%s__test";
... | rust_cleaned_test_functions.jsonl/133371 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 909
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
80817,
21039,
368,
341,
41693,
14808,
41693,
14808,
262,
1077,
897,
284,
8343,
21039,
0,
4430,
82,
497,
5962,
82,
563,
1944,
1827,
17119,
445,
16091,
311,
4715,
797,
262,
2060,
10714,
10297,
957,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_happy() {
let res = arrow_test_data();
assert!(PathBuf::from(res).is_dir());
let res = parquet_test_data();
assert!(PathBuf::from(res).is_dir());
} | rust_cleaned_test_functions.jsonl/17900 | {
"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,
1523,
11144,
368,
341,
286,
1077,
592,
284,
17921,
4452,
1769,
543,
286,
2060,
10297,
1820,
15064,
486,
1499,
4590,
568,
285,
4334,
5231,
286,
1077,
592,
284,
1346,
23300,
4452,
1769,
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 |
#[test]
fn test_append() {
let test_bytes_1: &[Option<Bytes>] =
&[None, None, Some("我好菜啊".as_bytes().to_vec()), None];
let test_bytes_2: &[Option<Bytes>] = &[
None,
Some("我菜爆了".as_bytes().to_vec()),
Some("我失败了".as_bytes().to_vec()),
Non... | rust_cleaned_test_functions.jsonl/105139 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 720
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26041,
368,
341,
286,
1077,
1273,
12524,
62,
16,
25,
44590,
5341,
27,
7078,
53529,
4035,
310,
44590,
4064,
11,
2240,
11,
4329,
445,
35946,
52801,
99800,
103924,
3263,
300,
12524,
1005,
983,
13251,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_doc_unsorted_multifacet() {
let mut schema_builder = Schema::builder();
let facet_field = schema_builder.add_facet_field("facets", INDEXED);
let schema = schema_builder.build();
let index = Index::create_in_ram(schema);
let mut index_writer = index.writer_... | rust_cleaned_test_functions.jsonl/10753 | {
"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,
18869,
4907,
28298,
26290,
333,
67223,
368,
341,
286,
1077,
5206,
10802,
28532,
284,
12539,
486,
17850,
543,
286,
1077,
44507,
5013,
284,
10802,
28532,
1364,
41589,
295,
5013,
445,
22185,
1415,
497,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_words_by_word() {
let data = [0x1995u16, 0x1202u16, 0x1130u16];
let buf = pack_words_by_word(&data);
let ret = unpack_words_by_word(buf.as_slice());
assert_eq!(ret.as_slice(), data)
} | rust_cleaned_test_functions.jsonl/62513 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 126
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18981,
3710,
13533,
368,
341,
286,
1077,
821,
284,
508,
15,
87,
16,
24,
24,
20,
84,
16,
21,
11,
220,
15,
87,
16,
17,
15,
17,
84,
16,
21,
11,
220,
15,
87,
16,
16,
18,
15,
84,
16,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_timeshift_record_purge_expired_records() {
let mut recorder = TimeshiftRecorder {
index: 0,
name: "record".to_string(),
config: create_config(),
service: create_epg_service(),
records: indexmap::indexmap!{
1u32.i... | rust_cleaned_test_functions.jsonl/60083 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2271
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22353,
47833,
14192,
620,
39823,
80221,
31279,
368,
341,
286,
1077,
5206,
48835,
284,
8523,
47833,
47023,
341,
310,
1922,
25,
220,
15,
345,
310,
829,
25,
330,
8548,
3263,
983,
3904,
3148,
310,
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_list_complex_accessors() {
let list = make_list(vec![Field::Group(make_row(vec![
("x".to_string(), Field::Null),
("Y".to_string(), Field::Int(2)),
]))]);
assert_eq!(2, list.get_group(0).unwrap().len());
let list = make_list(vec![Field::ListInternal(make_list(vec![
... | rust_cleaned_test_functions.jsonl/43815 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 340
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2019,
41522,
12759,
1087,
368,
341,
262,
1077,
1140,
284,
1281,
2019,
25592,
20703,
1877,
486,
2808,
36944,
8530,
25592,
90515,
414,
3489,
87,
3263,
983,
3904,
1507,
8601,
486,
3280,
1326,
414,
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_with_multiple_files() {
new_ucmd!()
.arg("with-spaces.txt")
.arg("with-tab.txt")
.succeeds()
.stdout_contains(" return")
.stdout_contains(" ");
} | rust_cleaned_test_functions.jsonl/121790 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 126
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6615,
45233,
10931,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
858,
445,
4197,
22238,
2434,
3909,
1138,
286,
659,
858,
445,
4197,
27411,
3909,
1138,
286,
659,
82,
29264,
82,
741,
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 |
#[test]
fn test_behavior_withdrawal_then_redelegate_with_less_than_minimum_stake_delegation() {
let feature_set = FeatureSet::all_enabled();
let minimum_delegation = crate::get_minimum_delegation(&feature_set);
let rent = Rent::default();
let rent_exempt_reserve = rent.minimum_ba... | rust_cleaned_test_functions.jsonl/31654 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3452
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74540,
6615,
7633,
278,
68367,
1288,
28227,
6615,
50747,
51613,
84855,
1261,
726,
2259,
87566,
368,
341,
286,
1077,
4565,
2602,
284,
19998,
1649,
486,
541,
18220,
543,
286,
1077,
8028,
2259,
87566,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_array() {
assert_eq!(<Vec<&str>>::static_variant_type().as_str(), "as");
assert_eq!(
<Vec<(&str, u8, u32)>>::static_variant_type().as_str(),
"a(syu)"
);
let a = ["foo", "bar", "baz"].to_variant();
assert_eq!(a.normal_form(), a);
... | rust_cleaned_test_functions.jsonl/30218 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 254
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
368,
341,
286,
2060,
10714,
10297,
27,
10050,
52244,
495,
77595,
1978,
46112,
1819,
1005,
300,
2895,
1507,
330,
300,
797,
286,
2060,
10714,
33673,
310,
366,
10050,
27,
2099,
495,
11,
575,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lazy_query_6() -> Result<()> {
let df = df! {
"uid" => [0, 0, 0, 1, 1, 1],
"day" => [1, 2, 4, 1, 2, 3],
"cumcases" => [10, 12, 15, 25, 30, 41]
}
.unwrap();
let out = df
.lazy()
.groupby(vec![col("uid")])
// a double aggregation exp... | rust_cleaned_test_functions.jsonl/22364 | {
"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,
49646,
5738,
62,
21,
368,
1464,
5714,
71698,
341,
262,
1077,
6764,
284,
6764,
0,
341,
286,
330,
2423,
1,
589,
508,
15,
11,
220,
15,
11,
220,
15,
11,
220,
16,
11,
220,
16,
11,
220,
16,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_inc() {
let mut r = Register::new();
let mut b = MockBus::new();
b.memory[0x80] = 0x02;
inc(0x80, &mut r, &mut b);
assert_eq!(b.memory[0x80], 0x03)
} | rust_cleaned_test_functions.jsonl/14212 | {
"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,
31285,
368,
341,
262,
1077,
5206,
435,
284,
8451,
486,
931,
543,
262,
1077,
5206,
293,
284,
14563,
15073,
486,
931,
543,
262,
293,
36611,
58,
15,
87,
23,
15,
60,
284,
220,
15,
87,
15,
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_empty_list_array() {
// Construct an empty value array
let value_data = ArrayData::builder(DataType::Int32)
.len(0)
.add_buffer(Buffer::from([]))
.build()
.unwrap();
// Construct an empty offset buffer
let value_off... | rust_cleaned_test_functions.jsonl/98891 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 397
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
2019,
3858,
368,
341,
286,
442,
18678,
458,
4287,
897,
1334,
198,
286,
1077,
897,
1769,
284,
2910,
1043,
486,
17850,
63941,
486,
1072,
18,
17,
340,
310,
659,
2892,
7,
15,
340,
310,
659,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_octal() {
assert_eq!(radix_calc::expr("0o0"), Ok(0o0));
assert_eq!(radix_calc::expr("0o1"), Ok(0o1));
assert_eq!(radix_calc::expr("0o755"), Ok(0o755));
assert_eq!(radix_calc::expr("0o755_755"), Ok(0o755_755));
// negative test cases
assert!(radix_calc::expr("0o789").is_e... | rust_cleaned_test_functions.jsonl/60547 | {
"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,
70135,
278,
368,
341,
262,
2060,
10714,
10297,
13281,
941,
38241,
486,
9413,
445,
15,
78,
15,
3975,
7622,
7,
15,
78,
15,
1106,
262,
2060,
10714,
10297,
13281,
941,
38241,
486,
9413,
445,
15,
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_collapse() {
let items = vec![
Path::new("a/file1.txt"),
Path::new("b/file2.txt"),
];
let mut tree =
FileTreeItems::new(&items, &BTreeSet::new()).unwrap();
assert!(tree.tree_items[1].info().is_visible());
tree.collapse(0, false);
assert!(!tree.tree_items[1].info().is_v... | rust_cleaned_test_functions.jsonl/129791 | {
"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,
666,
10786,
368,
341,
197,
10217,
3589,
284,
7486,
90515,
298,
69640,
486,
931,
445,
64,
23903,
16,
3909,
3975,
715,
298,
69640,
486,
931,
445,
65,
23903,
17,
3909,
3975,
715,
197,
197,
4821,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_raft_engine_dir() {
let content = r#"
[raft-engine]
enable = true
"#;
let mut cfg: TiKvConfig = toml::from_str(content).unwrap();
cfg.validate().unwrap();
assert_eq!(
cfg.raft_engine.config.dir,
config::canon... | rust_cleaned_test_functions.jsonl/2165 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 212
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
2944,
24823,
4334,
368,
341,
286,
1077,
2213,
284,
435,
2,
698,
310,
508,
2944,
49625,
921,
310,
7283,
284,
830,
198,
286,
5869,
280,
286,
1077,
5206,
13286,
25,
22325,
42,
85,
2648,
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_build_statistics_inconsistent_types() {
// Test requesting a Utf8 column when the stats return some other type
// Request a record batch with of s1_min as a timestamp
let required_columns = RequiredStatColumns::from(vec![(
"s3".into(),
StatisticsT... | rust_cleaned_test_functions.jsonl/97674 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 471
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20801,
49569,
1243,
78399,
9763,
368,
341,
286,
442,
3393,
34692,
264,
43432,
23,
3250,
979,
279,
10472,
470,
1045,
1008,
943,
271,
286,
442,
6145,
264,
3255,
7162,
448,
315,
274,
16,
7260,
438,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tight_infinite_loop_conditional() {
test_interpreter_and_jit_asm!(
"
jsge r0, r0, -1
exit",
[],
(),
{
|_vm, res: Result| {
matches!(res.unwrap_err(),
EbpfError::ExceededMaxInstructions(pc, initial... | rust_cleaned_test_functions.jsonl/59057 | {
"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,
528,
491,
1243,
25722,
17198,
24433,
3005,
368,
341,
262,
1273,
15318,
28637,
8378,
5374,
275,
67529,
33673,
286,
6228,
286,
6994,
709,
435,
15,
11,
435,
15,
11,
481,
16,
198,
286,
4869,
756,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_cname_lookup() {
let resp_query = Query::query(Name::from_str("www.example.com.").unwrap(), RecordType::A);
let cname_record = cname_record(
Name::from_str("www.example.com.").unwrap(),
Name::from_str("v4.example.com.").unwrap(),
);
let v4_record = v4_record(
... | rust_cleaned_test_functions.jsonl/21988 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 467
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
606,
27464,
368,
341,
262,
1077,
9039,
5738,
284,
11361,
486,
1631,
21182,
486,
1499,
2895,
445,
2136,
7724,
905,
98401,
15454,
1507,
13583,
929,
486,
32,
317,
262,
1077,
78514,
14192,
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_json_object_expression_implicit_keys_and_with() {
let n = ObjectExpr {
base: BaseNode::default(),
with: Some(Identifier {
base: BaseNode::default(),
name: "a".to_string(),
}),
properties: vec![Property {
base: BaseNode::defa... | rust_cleaned_test_functions.jsonl/40438 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 421
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
5314,
28068,
62,
30940,
12631,
8378,
6615,
368,
341,
262,
1077,
308,
284,
3002,
16041,
341,
286,
2331,
25,
5351,
1955,
486,
2258,
3148,
286,
448,
25,
4329,
7,
8714,
341,
310,
2331,
25,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_correct_snapshot_term() {
// Use five replicas so leader can send a snapshot to a new peer without
// committing extra logs.
let mut cluster = new_server_cluster(0, 5);
let pd_client = cluster.pd_client.clone();
pd_client.disable_default_operator();
// Use run conf chang... | rust_cleaned_test_functions.jsonl/94647 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 766
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31550,
53265,
17464,
368,
341,
262,
442,
5443,
4236,
80801,
773,
7653,
646,
3624,
264,
16295,
311,
264,
501,
14397,
2041,
198,
262,
442,
39483,
4960,
18422,
624,
262,
1077,
5206,
10652,
284,
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... | 2 |
#[test]
fn test_hamming() {
let distance = hamming("this is a test".as_bytes(), "wokka wokka!!!".as_bytes())
.expect("should compute");
assert_eq!(distance, 37);
} | rust_cleaned_test_functions.jsonl/94562 | {
"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,
1523,
309,
5311,
368,
341,
286,
1077,
6010,
284,
13515,
5311,
445,
574,
374,
264,
1273,
3263,
300,
12524,
1507,
330,
86,
562,
4554,
289,
562,
4554,
12069,
3263,
300,
12524,
2398,
310,
659,
17119... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_adhoc_pattern_in_iter() {
let mut grok = Grok::default();
let pattern = grok.compile(r"\[(?<threadname>[^\]]+)\]", false)
.expect("Error while compiling!");
let matches = pattern
.match_against("[thread1]")
.expect("No matches found!")... | rust_cleaned_test_functions.jsonl/117575 | {
"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,
10027,
88473,
21260,
1243,
11723,
368,
341,
286,
1077,
5206,
10487,
74,
284,
17888,
74,
486,
2258,
543,
286,
1077,
5383,
284,
10487,
74,
18922,
2601,
11934,
9697,
75414,
4528,
606,
30768,
24884,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_full_procedure() {
new_test_ext().execute_with(|| {
set_block_1();
let worker1 = worker_pubkey(1);
let worker2 = worker_pubkey(2);
let worker3 = worker_pubkey(3);
// Register workers
assert_ok!(PhalaRegistry::force_register_worker(
Origin::root(),
worker1.clo... | rust_cleaned_test_functions.jsonl/60473 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2626
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16372,
2540,
13196,
368,
341,
298,
8638,
4452,
9927,
1005,
10257,
6615,
79453,
341,
571,
8196,
7113,
62,
16,
543,
571,
10217,
11864,
16,
284,
11864,
34014,
792,
7,
16,
317,
571,
10217,
11864,
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... | 2 |
#[test]
fn test_lp_matrix_one() {
let m = matrix![1.0, -2.0;
0.5, 1.0];
assert_eq!(MatrixNorm::norm(&Lp::Integer(1), &m), 4.5);
} | rust_cleaned_test_functions.jsonl/6904 | {
"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,
76529,
10193,
11667,
368,
341,
286,
1077,
296,
284,
6172,
20703,
16,
13,
15,
11,
481,
17,
13,
15,
280,
664,
220,
15,
13,
20,
11,
220,
16,
13,
15,
935,
286,
2060,
10714,
10297,
6689,
24993,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.