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_set_positive_period() {
// arrange
const PERIOD: u64 = 100000;
let (tmp, max) = setup("test_set_positive_period", CGROUP_CPU_MAX);
let cpu = LinuxCpuBuilder::new().with_period(PERIOD).build();
// act
Cpu::apply(&tmp, &cpu).expect("apply cpu");
... | rust_cleaned_test_functions.jsonl/126561 | {
"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,
2602,
54160,
20818,
368,
341,
286,
442,
30893,
198,
286,
733,
17854,
33291,
25,
575,
21,
19,
284,
220,
16,
15,
15,
15,
15,
15,
280,
286,
1077,
320,
5173,
11,
1932,
8,
284,
6505,
445,
1944,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hundredweight() {
assert_query!("4qr to hundredweight", 1, hundredweight);
assert_query!("(1t / 20) to hundredweight", 1, hundredweight);
} | rust_cleaned_test_functions.jsonl/36188 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 66
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1523,
7114,
4765,
368,
341,
262,
2060,
5738,
17223,
19,
23004,
311,
7739,
4765,
497,
220,
16,
11,
7739,
4765,
317,
262,
2060,
5738,
17223,
7,
16,
83,
608,
220,
17,
15,
8,
311,
7739,
4765,
49... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_withdraw_votes() {
let validators =
HashMap::from_iter(vec![("test1".to_string(), 10), ("test2".to_string(), 10)]);
let context = get_context_with_epoch_height("test1".to_string(), 1);
testing_env!(
context,
Default::default(),
... | rust_cleaned_test_functions.jsonl/3919 | {
"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,
6615,
7633,
65116,
368,
341,
286,
1077,
38588,
4035,
310,
10528,
486,
1499,
11723,
25592,
20703,
445,
1944,
16,
3263,
983,
3904,
1507,
220,
16,
15,
701,
3489,
1944,
17,
3263,
983,
3904,
1507,
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_data_key() {
assert!(validate_data_key(&data_key(b"abc")));
assert!(!validate_data_key(b"abc"));
let mut region = Region::new();
// uninitialised region should not be passed in `enc_start_key` and `enc_end_key`.
assert!(::panic_hook::recover_safe(|| enc_s... | rust_cleaned_test_functions.jsonl/44172 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 382
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1769,
3097,
368,
341,
286,
2060,
10297,
7067,
1769,
3097,
2099,
691,
3097,
1883,
1,
13683,
17621,
286,
2060,
0,
3471,
7067,
1769,
3097,
1883,
1,
13683,
14929,
286,
1077,
5206,
5537,
284,
17152,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_schema_based_failure() {
let schema = Schema::default();
let known = Known::for_schema(&schema);
let query = r#"
[:find ?x
:where (or [?x :foo/nope1 "John"]
[?x :foo/nope2 "Ámbar"]
[?x :foo/nope3 "Da... | rust_cleaned_test_functions.jsonl/44224 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 289
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25371,
66679,
43618,
368,
341,
286,
1077,
10802,
284,
12539,
486,
2258,
543,
286,
1077,
3881,
284,
48286,
486,
1958,
25371,
2099,
17349,
317,
286,
1077,
3239,
284,
435,
2,
698,
310,
20865,
3903,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_vec() {
let mut a = arr2(&[[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]]);
a.slice_collapse(s![..;-1, ..]);
assert_eq!(a.row(3).to_vec(), vec![1, 2, 3]);
assert_eq!(a.column(2).to_vec(), vec![12, 9, 6, 3]);
a.slice_collapse(s![.., ..;-1]);
assert_eq!(a.row(3).to_vec(... | rust_cleaned_test_functions.jsonl/92637 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 189
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
13251,
368,
341,
262,
1077,
5206,
264,
284,
2890,
17,
2099,
15505,
16,
11,
220,
17,
11,
220,
18,
1125,
508,
19,
11,
220,
20,
11,
220,
21,
1125,
508,
22,
11,
220,
23,
11,
220,
24,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_file_path_from_git_diff_header_line_containing_spaces() {
assert_eq!(
parse_diff_header_line("+++ a/my src/delta.rs", true, None),
("my src/delta.rs".to_string(), FileEvent::Change)
);
assert_eq!(
parse_diff_header_line("+++ my src/... | rust_cleaned_test_functions.jsonl/72332 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 523
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
2458,
2638,
5673,
68801,
15850,
8757,
6528,
10260,
2056,
67883,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
15850,
8757,
6528,
445,
62730,
264,
34198,
2286,
3446,
5964,
25638,
497,
830,
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_format_replacement() {
let added = " 84,\
\n 248,";
let removed = " 0,\
\n 0,\
\n 128,";
let mut buf = String::new();
let _ = format_replacement(&mut buf, added, removed);
println!(
"## removed ##... | rust_cleaned_test_functions.jsonl/34739 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1264
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8955,
1288,
16101,
368,
341,
262,
1077,
3694,
284,
330,
262,
220,
23,
19,
42871,
338,
1124,
77,
262,
220,
17,
19,
23,
11,
876,
262,
1077,
6963,
284,
330,
262,
220,
15,
42871,
4293,
1124,
77,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_option_as_deref_mut() {
let mut val = 42;
let ref_option = &mut Some(&mut val);
assert_eq!(ref_option.as_deref_mut(), Some(&mut 42));
let ref_option = &mut Some(String::from("a result"));
assert_eq!(ref_option.as_deref_mut(), Some(String::from("a result").deref_mut()));... | rust_cleaned_test_functions.jsonl/20251 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 259
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9672,
11898,
814,
43970,
29523,
368,
341,
1066,
262,
1077,
5206,
1044,
284,
220,
19,
17,
280,
262,
1077,
2053,
9672,
284,
609,
6984,
4329,
2099,
6984,
1044,
317,
262,
2060,
10714,
10297,
1097,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_display_indent() {
let plan = display_plan();
let expected = "Projection: #employee_csv.id\
\n Filter: #employee_csv.state = Utf8(\"CO\")\
\n TableScan: employee_csv projection=Some([0, 3])";
assert_eq!(expected, format!("{}", plan.display_indent()))... | rust_cleaned_test_functions.jsonl/29893 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 150
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14825,
69045,
368,
341,
286,
1077,
3119,
284,
3037,
26564,
1428,
286,
1077,
3601,
284,
330,
46321,
25,
671,
12946,
14020,
1764,
5661,
286,
1124,
77,
220,
12339,
25,
671,
12946,
14020,
3467,
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_compute_cached_metrics() {
let now = 100;
let mut neurons = HashMap::<u64, Neuron>::new();
// Not Dissolving neurons
neurons.insert(
1,
Neuron {
cached_neuron_stake_e8s: 100_000_000,
dissolve_state: Some(DissolveState::DissolveDelaySeconds... | rust_cleaned_test_functions.jsonl/1185 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3092
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57028,
64369,
37686,
368,
341,
262,
1077,
1431,
284,
220,
16,
15,
15,
280,
262,
1077,
5206,
33213,
284,
10528,
27638,
84,
21,
19,
11,
4182,
36090,
6831,
931,
1428,
262,
442,
2806,
51032,
19648,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_current() {
let (version, channel) = (::Version::read(), ::Channel::read());
assert!(version.is_some());
assert!(channel.is_some());
if let Ok(known_channel) = env::var("KNOWN_CHANNEL") {
assert_eq!(channel, ::Channel::parse(&known_channel));
... | rust_cleaned_test_functions.jsonl/79907 | {
"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,
21039,
11080,
368,
341,
286,
1077,
320,
4366,
11,
5496,
8,
284,
68590,
5637,
486,
878,
1507,
3504,
9629,
486,
878,
1423,
286,
2060,
10297,
4366,
2079,
61855,
1423,
286,
2060,
10297,
10119,
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... | 2 |
#[test]
fn test_uncle_count() {
let (shared, chain1, chain2) = prepare();
let dummy_context = dummy_context(&shared);
let block = chain1
.last()
.cloned()
.unwrap()
.as_advanced_builder()
.uncle(chain2.last().cloned().unwrap().as_uncle())
.build_... | rust_cleaned_test_functions.jsonl/118897 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 326
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
76576,
273,
3180,
368,
341,
262,
1077,
320,
6100,
11,
8781,
16,
11,
8781,
17,
8,
284,
10549,
543,
262,
1077,
17292,
8467,
284,
17292,
8467,
2099,
6100,
626,
1066,
262,
1077,
2504,
284,
8781,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_no_such_file_or_directory() {
new_ucmd!()
.arg("no_such_file.toml")
.fails()
.stderr_contains("cannot open 'no_such_file.toml' for reading: No such file or directory");
} | rust_cleaned_test_functions.jsonl/32772 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 107
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
643,
1387,
2458,
8734,
14846,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
858,
445,
2152,
643,
1387,
2458,
73494,
75,
1138,
286,
659,
59631,
741,
286,
659,
36422,
63598,
445,
33260,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_manhattan_dist() {
let insts = Instruction::read(SAMPLE).unwrap();
let mut ship = Ship::new();
ship.apply_insts(&insts, Ship::apply_inst).unwrap();
assert_eq!(25, ship.manhattan_dist())
} | rust_cleaned_test_functions.jsonl/17499 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17062,
25337,
16031,
368,
341,
286,
1077,
1761,
82,
284,
29051,
486,
878,
3759,
18918,
568,
15454,
543,
286,
1077,
5206,
8284,
284,
26803,
486,
931,
543,
286,
8284,
13045,
17740,
82,
2099,
6308,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_packet_sender_reply() {
fn do_test(input: Result<i8, String>, expected_output: ErlResult<i8, String>) {
let mut cursor = Cursor::new(vec![]);
{
let mut sender = PacketSender::from_writer(&mut cursor, PacketSize::Four);
sender.reply(... | rust_cleaned_test_functions.jsonl/121757 | {
"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,
21078,
54356,
15323,
368,
341,
286,
5168,
653,
4452,
5384,
25,
5714,
21897,
23,
11,
923,
8066,
3601,
7645,
25,
80834,
2077,
21897,
23,
11,
923,
9231,
341,
310,
1077,
5206,
8128,
284,
28067,
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_mvcc_txn_commit_err() {
test_mvcc_txn_commit_err_imp(b"k", b"v");
let long_value = "v".repeat(SHORT_VALUE_MAX_LEN + 1).into_bytes();
test_mvcc_txn_commit_err_imp(b"k2", &long_value);
} | rust_cleaned_test_functions.jsonl/61086 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 129
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73187,
638,
92299,
36346,
9266,
368,
341,
286,
1273,
73187,
638,
92299,
36346,
9266,
36788,
1883,
62911,
497,
293,
1,
85,
3071,
286,
1077,
1293,
3142,
284,
330,
85,
3263,
30624,
3759,
70702,
7476,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_uint_to_int_panic() {
Int256::from(BIGGEST_INT_AS_UINT.clone().add(Uint256::from(1 as u32)));
} | rust_cleaned_test_functions.jsonl/47759 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 68
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15807,
2346,
4042,
620,
31270,
368,
341,
286,
1333,
17,
20,
21,
486,
1499,
5349,
1914,
81757,
9161,
28028,
27241,
15997,
1005,
718,
12317,
396,
17,
20,
21,
486,
1499,
7,
16,
438,
575,
18,
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 |
#[test]
fn test_process_op_in() {
let filter = filter();
let mut cred_def_ids = vec![unencrypted_target("Not Here".to_string())];
let mut op = Operator::In(cred_def_id_tag(), cred_def_ids.clone());
assert!(Verifier::_process_operator("zip", &op, &filter).is_err());
cred... | rust_cleaned_test_functions.jsonl/71868 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 226
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
10287,
1243,
368,
341,
286,
1077,
4051,
284,
4051,
543,
286,
1077,
5206,
4187,
7844,
8077,
284,
7486,
20703,
359,
36444,
11123,
445,
2623,
5692,
3263,
983,
3904,
2140,
4821,
286,
1077,
5206... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sqrt() {
let test_cases = vec![
(None, None),
(Some(64f64), Some(Real::new(8f64).unwrap())),
(
Some(2f64),
Some(Real::new(std::f64::consts::SQRT_2).unwrap()),
),
(Some(-16f64), None),
... | rust_cleaned_test_functions.jsonl/9486 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 390
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
92199,
368,
341,
286,
1077,
1273,
41427,
284,
7486,
90515,
310,
320,
4064,
11,
2240,
1326,
310,
320,
8373,
7,
21,
19,
69,
21,
19,
701,
4329,
7,
12768,
486,
931,
7,
23,
69,
21,
19,
568,
154... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_write_single_register() {
let (_s, cfg) = start_dummy_server_with_cfg();
let mut trans = Transport::new_with_cfg("127.0.0.1", cfg).unwrap();
assert!(trans.write_single_register(0, 1).is_ok());
} | rust_cleaned_test_functions.jsonl/46837 | {
"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,
9165,
19487,
14000,
368,
341,
286,
1077,
5453,
82,
11,
13286,
8,
284,
1191,
60321,
12015,
6615,
18343,
543,
286,
1077,
5206,
1356,
284,
16742,
486,
931,
6615,
18343,
445,
16,
17,
22,
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,
1... | 1 |
#[test]
fn test_send_propose_and_prevote_when_we_are_leader() {
let sandbox = timestamping_sandbox();
// round happens
sandbox.add_time(Duration::from_millis(sandbox.current_round_timeout()));
sandbox.add_time(Duration::from_millis(
sandbox.current_round_timeout() + PROPOSE_TIMEOUT,
... | rust_cleaned_test_functions.jsonl/47687 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 226
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13565,
21663,
960,
8378,
25566,
1272,
47636,
45922,
56855,
79991,
368,
341,
262,
1077,
42754,
284,
11441,
287,
643,
31536,
1428,
262,
442,
4778,
8573,
198,
262,
42754,
1364,
3009,
64114,
486,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sanity() -> Result<(), ErrBox> {
let initial = AttestationConfig {
symbols: vec![
P2WSymbol {
name: Some("ETH/USD".to_owned()),
product_addr: Default::default(),
price_addr: Default::default(),
... | rust_cleaned_test_functions.jsonl/73889 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 447
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
38270,
368,
1464,
5714,
68843,
15495,
1611,
29,
341,
286,
1077,
2856,
284,
2411,
1944,
367,
2648,
341,
310,
17738,
25,
7486,
90515,
394,
393,
17,
7433,
4001,
341,
503,
829,
25,
4329,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_bitreader_lsb() {
let pattern = 0x5555_5555_5555_5555u64;
for i in 0..16 {
let segment = mask!(16u64);
let xor_mask =
(segment * ((i >> 3) & 0x1)) << 48 |
(segment * ((i >> 2) & 0x1)) << 32 |
(segment * ((i >... | rust_cleaned_test_functions.jsonl/79990 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 849
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13996,
11149,
907,
16892,
368,
341,
286,
1077,
5383,
284,
220,
15,
87,
20,
20,
20,
20,
62,
20,
20,
20,
20,
62,
20,
20,
20,
20,
62,
20,
20,
20,
20,
84,
21,
19,
280,
286,
369,
600,
304,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_row_iter_complex() {
let table = Table::find_first(TABLE_COMPLEX).unwrap();
let mut table_iter = table.iter();
let row = table_iter.next().unwrap();
let mut iter = row.iter();
assert_eq!(Some("John"), iter.next().map(String::as_str));
assert_eq!(S... | rust_cleaned_test_functions.jsonl/47599 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 550
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8530,
11723,
41522,
368,
341,
286,
1077,
1965,
284,
6633,
486,
3903,
12978,
83006,
97820,
568,
15454,
543,
286,
1077,
5206,
1965,
11723,
284,
1965,
19471,
1428,
286,
1077,
2802,
284,
1965,
11723,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_generate_identifier() {
let mut used_names: HashMap<String, usize> = HashMap::new();
assert_eq!(
generate_identifier("someVar", &mut used_names),
"someVar".to_string()
);
assert_eq!(
generate_identifier("someVar", &mut used_names),
"someVar2".to_st... | rust_cleaned_test_functions.jsonl/103030 | {
"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,
48851,
33176,
368,
341,
262,
1077,
5206,
1483,
9187,
25,
10528,
3464,
11,
22301,
29,
284,
10528,
486,
931,
543,
262,
2060,
10714,
33673,
286,
6923,
33176,
445,
14689,
3962,
497,
609,
6984,
1483,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ldxw_all() {
test_interpreter_and_jit_asm!(
"
mov r0, r1
ldxw r9, [r0+0]
be32 r9
ldxw r8, [r0+4]
be32 r8
ldxw r7, [r0+8]
be32 r7
ldxw r6, [r0+12]
be32 r6
ldxw r5, [r0+16]
be32 r5
ldxw r4, ... | rust_cleaned_test_functions.jsonl/58990 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 817
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
50573,
87,
86,
5705,
368,
341,
262,
1273,
15318,
28637,
8378,
5374,
275,
67529,
33673,
286,
6228,
286,
1974,
435,
15,
11,
435,
16,
198,
286,
326,
12719,
86,
435,
24,
11,
508,
81,
15,
10,
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_make_command_line() {
use std::str;
use std::c_str::CString;
use super::make_command_line;
fn test_wrapper(prog: &str, args: &[&str]) -> String {
make_command_line(&prog.to_c_str(),
args.iter()
... | rust_cleaned_test_functions.jsonl/131816 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 735
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28230,
10811,
6528,
368,
341,
286,
990,
1460,
486,
495,
280,
286,
990,
1460,
486,
66,
2895,
486,
63677,
280,
286,
990,
2256,
486,
6927,
10811,
6528,
401,
286,
5168,
1273,
23561,
80078,
25,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_find_lifetimes_trait_impl() {
check(
r#"
trait Foo<'a> {
fn foo() -> &'a ();
}
impl<'a> Foo<'a> for &'a () {
fn foo() -> &'a<|> () {
unimplemented!()
}
}
"#,
expect![[r#"
'a LifetimeParam FileId(0) 47..49 47..49 Lifetime
... | rust_cleaned_test_functions.jsonl/47792 | {
"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,
21814,
907,
333,
6889,
78491,
21007,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
29432,
33428,
18291,
64,
29,
341,
262,
5168,
15229,
368,
1464,
30136,
64,
9563,
532,
6383,
18291,
64,
29,
33428,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mcg128xsl64_true_values() {
let mut rng = Mcg128Xsl64::new(42);
let mut results = [0u64; 6];
for i in results.iter_mut() { *i = rng.next_u64(); }
let expected: [u64; 6] = [0x63b4a3a813ce700a, 0x382954200617ab24,
0xa7fd85ae3fe950ce, 0xd715286aa2887737, 0x60c92fee2e59... | rust_cleaned_test_functions.jsonl/52975 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 200
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
27446,
16,
17,
23,
87,
3226,
21,
19,
16082,
9146,
368,
341,
1066,
262,
1077,
5206,
28422,
284,
4483,
70,
16,
17,
23,
55,
3226,
21,
19,
486,
931,
7,
19,
17,
626,
262,
1077,
5206,
3059,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ptrace_cont() {
use nix::sys::ptrace;
use nix::sys::signal::{raise, Signal};
use nix::sys::wait::{waitpid, WaitStatus};
use nix::unistd::fork;
use nix::unistd::ForkResult::*;
let _m = ::FORK_MTX.lock().expect(
"Mutex got poisoned by another test",
);
// ... | rust_cleaned_test_functions.jsonl/63569 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 795
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4348,
578,
10260,
368,
341,
262,
990,
308,
941,
486,
7791,
486,
3505,
578,
280,
262,
990,
308,
941,
486,
7791,
486,
26622,
22964,
18704,
11,
27230,
2440,
262,
990,
308,
941,
486,
7791,
486,
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... | 5 |
#[test]
fn test_current() {
let mut ss = ScopeStack::new();
assert_eq!(ss.current(), 0);
ss.push();
assert_eq!(ss.current(), 1);
ss.push();
assert_eq!(ss.current(), 2);
ss.pop();
assert_eq!(ss.current(), 1);
ss.pop();
assert_eq!(ss.... | rust_cleaned_test_functions.jsonl/80368 | {
"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,
11080,
368,
341,
286,
1077,
5206,
10870,
284,
34920,
4336,
486,
931,
543,
286,
2060,
10714,
10297,
778,
4952,
1507,
220,
15,
317,
286,
10870,
2552,
543,
286,
2060,
10714,
10297,
778,
4952,
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_flash() {
let mut f1 = SimFlash::new(vec![4096usize; 256], 1);
test_device(&mut f1);
let mut f2 = SimFlash::new(vec![16 * 1024, 16 * 1024, 16 * 1024, 64 * 1024,
128 * 1024, 128 * 1024, 128 * 1024], 1);
test_device... | rust_cleaned_test_functions.jsonl/62820 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 185
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30225,
368,
341,
1789,
286,
1077,
5206,
282,
16,
284,
4467,
23876,
486,
931,
25592,
20703,
19,
15,
24,
21,
51878,
26,
220,
17,
20,
21,
1125,
220,
16,
317,
286,
1273,
9204,
2099,
6984,
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... | 1 |
#[test]
fn test_derive_key() {
let main = hex::decode("588ba9eef353778b074413a0140205d90d7479e36e0dd4ee35bb729d26131ef1")
.unwrap();
let dk1 = derive_key(&main, b"purpose1", 32);
assert_eq!(
hex::encode(dk1),
"835b5df80ce9ca46908e8524fb308649122cfbcefb... | rust_cleaned_test_functions.jsonl/89673 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 274
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35345,
533,
3097,
368,
341,
286,
1077,
1887,
284,
12371,
486,
18196,
445,
20,
23,
23,
4645,
24,
68,
823,
18,
20,
18,
22,
22,
23,
65,
15,
22,
19,
19,
16,
18,
64,
15,
16,
19,
15,
17,
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_typedef_in_pod_struct() {
let hdr = indoc! {"
#include <string>
typedef uint32_t my_int;
struct A {
my_int a;
};
inline uint32_t take_a(A a) {
return a.a;
}
"};
let rs = quote! {
let a = ffi::A {
... | rust_cleaned_test_functions.jsonl/9863 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 265
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42111,
4219,
1243,
85337,
15126,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
286,
671,
997,
366,
917,
397,
286,
13501,
2622,
18,
17,
528,
847,
4042,
280,
286,
2036,
362,
341,
310,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sbc() {
let mut r = Register::new();
let mut b = MockBus::new();
r.set_A(0x03);
r.set_status_carry(true);
b.memory[0x10] = 0x02;
sbc(0x10, &mut r, &mut b);
assert_eq!(r.get_A(),0x01);
assert_eq!(r.get_status_overflow(), false);
r.set_A(0x04);
r.set_status... | rust_cleaned_test_functions.jsonl/14224 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 336
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
8904,
368,
341,
262,
1077,
5206,
435,
284,
8451,
486,
931,
543,
262,
1077,
5206,
293,
284,
14563,
15073,
486,
931,
543,
262,
435,
980,
1566,
7,
15,
87,
15,
18,
317,
262,
435,
980,
4773,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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/4698 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2323
} | [
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_pipe() {
let (fd0, fd1) = pipe().unwrap();
let m0 = stat::SFlag::from_bits_truncate(stat::fstat(fd0).unwrap().st_mode as mode_t);
// S_IFIFO means it's a pipe
assert_eq!(m0, SFlag::S_IFIFO);
let m1 = stat::SFlag::from_bits_truncate(stat::fstat(fd1).unwrap().st_mode as mode_t)... | rust_cleaned_test_functions.jsonl/104819 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 175
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41862,
368,
341,
262,
1077,
320,
6902,
15,
11,
12414,
16,
8,
284,
13647,
1005,
15454,
543,
262,
1077,
296,
15,
284,
2793,
486,
50,
12135,
486,
1499,
20034,
3547,
26900,
41785,
486,
69,
9878,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_equal() {
assert!(Version::parse("1.0").unwrap() == Version::parse("1.0.0").unwrap());
assert!(!(Version::parse("1.0").unwrap() == Version::parse("1.1").unwrap()));
} | rust_cleaned_test_functions.jsonl/6349 | {
"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,
9438,
11478,
368,
341,
286,
2060,
10297,
5637,
486,
6400,
445,
16,
13,
15,
1827,
15454,
368,
621,
6079,
486,
6400,
445,
16,
13,
15,
13,
15,
1827,
15454,
1423,
286,
2060,
0,
33660,
5637,
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_counter() {
let opts = Opts::new("test", "test help")
.const_label("a", "1")
.const_label("b", "2");
let counter = Counter::with_opts(opts).unwrap();
counter.inc();
assert_eq!(counter.get() as u64, 1);
counter.inc_by(42.0);
... | rust_cleaned_test_functions.jsonl/46515 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 359
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15730,
368,
341,
286,
1077,
12185,
284,
506,
12754,
486,
931,
445,
1944,
497,
330,
1944,
1492,
1138,
310,
659,
1024,
6106,
445,
64,
497,
330,
16,
1138,
310,
659,
1024,
6106,
445,
65,
497,
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 |
#[test]
fn test_apply_strategy_for_type_6() {
let data = [0, 0, 0, 6, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 3];
let expected = vec!['A', 'A', 'A'];
let mut decoder = Decoder::new(&data);
if let StrategyDataTypes::VecChar(actual) = decoder.apply().unwrap() {
as... | rust_cleaned_test_functions.jsonl/30706 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 211
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36551,
49308,
5478,
1819,
62,
21,
368,
341,
286,
1077,
821,
284,
508,
15,
11,
220,
15,
11,
220,
15,
11,
220,
21,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
16,
11,
220,
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... | 2 |
#[test]
fn test_no_default_follow_for_governance() {
let driver = fake::FakeDriver::default();
let mut gov = Governance::new(
fixture_for_following(),
driver.get_fake_env(),
driver.get_fake_ledger(),
);
gov.make_proposal(
&NeuronId { id: 1 },
// Must match... | rust_cleaned_test_functions.jsonl/42895 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 806
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
9993,
43490,
5478,
1889,
6706,
681,
368,
341,
262,
1077,
5579,
284,
12418,
486,
52317,
11349,
486,
2258,
543,
262,
1077,
5206,
47625,
284,
80589,
486,
931,
1006,
286,
12507,
5478,
43490,
287... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_vcx_proof_get_requests() {
let _setup = SetupMocks::init();
let cxn = ::connection::tests::build_test_connection();
AgencyMock::set_next_response(::utils::constants::NEW_PROOF_REQUEST_RESPONSE.to_vec());
let cb = return_types_u32::Return_U32_STR::new().unwrap()... | rust_cleaned_test_functions.jsonl/104431 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
25844,
86757,
3062,
37216,
368,
341,
286,
1077,
716,
15188,
284,
18626,
72577,
486,
2327,
1428,
286,
1077,
20716,
77,
284,
3504,
7742,
486,
23841,
486,
5834,
4452,
15866,
1428,
286,
16379,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dispatch_with_init_boot_request_unknown_client_returns_none() {
let mut req = new_test_request();
req.options.remove(2);
let mut server = new_test_server(|| 42);
let got = server.dispatch(req);
assert!(got.is_none());
} | rust_cleaned_test_functions.jsonl/61726 | {
"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,
42991,
6615,
6137,
52062,
7893,
57507,
8179,
58900,
31488,
368,
341,
286,
1077,
5206,
4232,
284,
501,
4452,
7893,
543,
286,
4232,
10912,
4850,
7,
17,
626,
286,
1077,
5206,
3538,
284,
501,
4452,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_create_table() {
let ddl = "\
CREATE TABLE clickhouse_test_create_table (\
click_id FixedString(64), \
click_time DateTime\
) Engine=Memory";
let pool = Pool::new(database_url());
let done = pool
.get_handle()
... | rust_cleaned_test_functions.jsonl/30928 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 385
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
5237,
368,
341,
262,
1077,
55780,
284,
93317,
2290,
30776,
14363,
4205,
7675,
4452,
8657,
5237,
320,
5661,
2290,
4205,
842,
256,
20149,
703,
7,
21,
19,
701,
3044,
2290,
4205,
3009,
6520,
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_non_utf_string() {
let bytes = vec![1, 0, 0, 0, 0xC0];
assert_eq!(
String::try_from_slice(&bytes).unwrap_err().to_string(),
"invalid utf-8 sequence of 1 bytes from index 0"
);
} | rust_cleaned_test_functions.jsonl/103718 | {
"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,
21637,
39453,
3904,
368,
341,
262,
1077,
5820,
284,
7486,
20703,
16,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
12125,
15,
935,
262,
2060,
10714,
33673,
286,
923,
486,
1539,
5673,
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_btreeset_from_unit_struct() {
assert_de_tokens_error::<BTreeSet<isize>>(
&[Token::UnitStruct { name: "Anything" }],
"invalid type: unit value, expected a sequence",
);
} | rust_cleaned_test_functions.jsonl/129533 | {
"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,
48626,
7858,
295,
5673,
14832,
15126,
368,
341,
262,
2060,
2259,
28838,
4096,
27638,
33,
6533,
1649,
27,
285,
551,
97238,
286,
44590,
3323,
486,
4562,
9422,
314,
829,
25,
330,
77303,
1,
29043,
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 |
#[test]
fn test_entity_builder_bogus_entids() {
let mut builder = TermBuilder::new();
let e = builder.named_tempid("x");
let a1 = fake_known_entid(37); // :db/doc
let a2 = fake_known_entid(999);
let v = TypedValue::typed_string("Some attribute");
let ve = fake_known_entid(12345)... | rust_cleaned_test_functions.jsonl/69161 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 538
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19169,
28532,
880,
538,
355,
27425,
3365,
368,
972,
262,
1077,
5206,
7363,
284,
17519,
3297,
486,
931,
1647,
262,
1077,
384,
284,
7363,
65111,
11771,
307,
445,
87,
2815,
262,
1077,
264,
16,
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... | 2 |
#[test]
fn test_has_label() {
mock_mgp_once!(
mgp_vertex_has_label_context,
|vertex, label, result| unsafe {
assert_eq!(vertex, null_mut());
assert_eq!(CStr::from_ptr(label.name), c_str!("labela"));
(*result) = 1;
mgp_error::MGP_ERROR_NO_ERROR
... | rust_cleaned_test_functions.jsonl/28518 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 250
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21778,
6106,
368,
341,
262,
7860,
717,
21888,
7630,
33673,
286,
13742,
79,
26611,
21778,
6106,
8467,
345,
286,
760,
12085,
11,
2383,
11,
1102,
91,
19860,
341,
310,
2060,
10714,
10297,
12085,
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_parse_turnpoint() {
let tp = CRecordTurnpoint::parse(b"C5111359N00101899WTAKEOFF Lasham Clubhouse").unwrap();
assert_relative_eq!(tp.latitude, 51.18931666666667);
assert_relative_eq!(tp.longitude, -1.03165);
assert_eq!(tp.text, Some("TAKEOFF Lasham Clubhouse".into... | rust_cleaned_test_functions.jsonl/35067 | {
"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,
21039,
37274,
2768,
368,
341,
286,
1077,
18101,
284,
356,
6471,
19389,
2768,
486,
6400,
1883,
46316,
20,
16,
16,
16,
18,
20,
24,
45,
15,
15,
16,
15,
16,
23,
24,
24,
54,
15204,
3390,
27068,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_two_in_one_read_shortest_first() {
let mut d = MessageDeframer::new();
assert_eq!(d.has_pending(), false);
assert_len(FIRST_MESSAGE.len() + SECOND_MESSAGE.len(),
input_bytes_concat(&mut d, SECOND_MESSAGE, FIRST_MESSAGE));
assert_eq!(d.frames.len... | rust_cleaned_test_functions.jsonl/29507 | {
"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,
23241,
1243,
11667,
6443,
16673,
477,
12978,
368,
341,
286,
1077,
5206,
294,
284,
4856,
2620,
46369,
486,
931,
543,
286,
2060,
10714,
10297,
67,
6858,
37861,
1507,
895,
317,
286,
2060,
6043,
7832,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let mut light_chain = LightChain::default_with_length(1);
let first_block = light_chain.block(1);
assert_eq!(1, first_block.unwrap().height());
light_chain.advance_chain();
let second_block = light_chain.block(2);
assert_eq!(2, second_bl... | rust_cleaned_test_functions.jsonl/10098 | {
"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,
7113,
368,
341,
286,
1077,
5206,
3100,
30583,
284,
8658,
18837,
486,
2258,
6615,
5118,
7,
16,
317,
286,
1077,
1156,
7113,
284,
3100,
30583,
15697,
7,
16,
317,
286,
2060,
10714,
10297,
16,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_best_peers() {
let mut pdb = get_db();
let p0 = PeerId::random();
let p1 = PeerId::random();
let p2 = PeerId::random();
pdb.connect_ingoing(&p0, "/ip4/0.0.0.0".parse().unwrap(), None);
pdb.connect_ingoing(&p1, "/ip4/0.0.0.0".parse().unwrap(), None... | rust_cleaned_test_functions.jsonl/73650 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 418
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33101,
36367,
388,
368,
341,
286,
1077,
5206,
47984,
284,
633,
8685,
1428,
286,
1077,
281,
15,
284,
45147,
764,
486,
11463,
543,
286,
1077,
281,
16,
284,
45147,
764,
486,
11463,
543,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_highlighting_with_content_children_included() {
let source = vec!["assert!(", " a.b.c() < D::e::<F>()", ");"].join("\n");
assert_eq!(
&to_token_vector(&source, get_language("rust"), &RUST_SHEET).unwrap(),
&[
vec![
("assert", vec![Highlight:... | rust_cleaned_test_functions.jsonl/12261 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 815
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74546,
287,
6615,
7495,
31206,
1243,
10181,
368,
341,
262,
1077,
2530,
284,
7486,
0,
1183,
2207,
0,
12918,
330,
262,
264,
948,
520,
368,
366,
422,
486,
68,
27638,
37,
13555,
497,
36778,
5521,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_part_two() {
let solver = Day7Solver {};
test_solver(&solver, true, &["3,26,1001,26,-4,26,3,27,1002,27,2,27,1,27,26,27,4,27,1001,28,-1,28,1005,28,6,99,0,0,5"], "139629729");
test_solver(&solver, true, &["3,52,1001,52,-5,52,3,53,1,52,56,54,1007,54,5,55,1005,55,26,1001,54,-... | rust_cleaned_test_functions.jsonl/54987 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 270
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10495,
23241,
368,
341,
286,
1077,
28961,
284,
6059,
22,
63830,
9321,
286,
1273,
53156,
2099,
75501,
11,
830,
11,
609,
1183,
18,
11,
17,
21,
11,
16,
15,
15,
16,
11,
17,
21,
4999,
19,
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... | 1 |
#[test]
fn test_dispatch() {
let (mut isolate, dispatch_count) = setup(Mode::Async);
js_check(isolate.execute(
"filename.js",
r#"
let control = new Uint8Array([42]);
Deno.core.send(1, control);
async function main() {
Deno.core.send(1, control);
}
... | rust_cleaned_test_functions.jsonl/969 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 205
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42991,
368,
341,
262,
1077,
320,
6984,
42123,
11,
6845,
3180,
8,
284,
6505,
3189,
534,
486,
6525,
317,
262,
6994,
7200,
82669,
7769,
1006,
414,
330,
8404,
2857,
756,
414,
435,
2,
698,
286,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_user_ip_from_client_ip_without_appropriate_platform() {
let mut event = Annotated::new(Event::default());
let mut config = StoreConfig::default();
config.client_ip = Some(IpAddr::parse("2.125.160.216").unwrap());
let geo = GeoIpLookup::open("tests/fixtures/GeoIP2-Enterprise-Tes... | rust_cleaned_test_functions.jsonl/14086 | {
"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,
3317,
10385,
5673,
8179,
10385,
39904,
8191,
24278,
34260,
368,
341,
262,
1077,
5206,
1538,
284,
1527,
87029,
486,
931,
30469,
486,
2258,
5231,
262,
1077,
5206,
2193,
284,
9129,
2648,
486,
2258,
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_str_container() {
fn sum_len(v: &[&str]) -> uint {
v.iter().map(|x| x.len()).sum()
}
let s = String::from_str("01234");
assert_eq!(5, sum_len(&["012", "", "34"]));
assert_eq!(5, sum_len(&[String::from_str("01").as_slice(),
... | rust_cleaned_test_functions.jsonl/2483 | {
"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,
2895,
15847,
368,
341,
286,
5168,
2629,
6043,
3747,
25,
44590,
5,
495,
2467,
1464,
2622,
341,
310,
348,
19471,
1005,
2186,
22428,
87,
91,
856,
19406,
6011,
1242,
741,
286,
555,
286,
1077,
274,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_option_value() {
macro_rules! test_some_value {
( $type: ty, $val: literal ) => {
let val: Option<$type> = Some($val);
let v: Value = val.into();
let out: $type = v.unwrap();
assert_eq!(out, val.unwrap());
... | rust_cleaned_test_functions.jsonl/12479 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 587
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9672,
3142,
368,
341,
286,
18072,
21407,
0,
1273,
61855,
3142,
341,
310,
320,
400,
1313,
25,
13580,
11,
400,
831,
25,
23141,
873,
589,
341,
394,
1077,
1044,
25,
6959,
35887,
1313,
29,
284,
432... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_lassoc_term() {
let input = vec![Token::Integer(2), Token::Minus, Token::Integer(1), Token::Minus, Token::Integer(1)];
let stmt = parse(&input).unwrap();
assert_eq!(stmt,
Stmt::Eval(
Expr::Minus(
... | rust_cleaned_test_functions.jsonl/55667 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 261
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
62,
447,
509,
17464,
368,
341,
1789,
286,
1077,
1946,
284,
7486,
20703,
3323,
486,
3486,
7,
17,
701,
9660,
486,
74458,
11,
9660,
486,
3486,
7,
16,
701,
9660,
486,
74458,
11,
9660,
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_parse_duration() {
let tests: &[(&'static str, Option<Duration>)] = &[
("5s", Some(Duration::from_secs(5))),
("5m", Some(Duration::from_secs(60 * 5))),
("5m 8s", Some(Duration::from_secs(60 * 5 + 8))),
(
"2h3s 1ms",
... | rust_cleaned_test_functions.jsonl/106446 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 719
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
25454,
368,
341,
286,
1077,
7032,
25,
44590,
2099,
6,
1978,
607,
11,
6959,
27,
12945,
29,
7252,
284,
609,
9640,
310,
3489,
20,
82,
497,
4329,
64114,
486,
1499,
68718,
7,
20,
41749,
310,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_invalid_n_runs() {
assert!(
GaussianMixtureModel::params(1)
.with_n_runs(0)
.fit(&DatasetBase::from(array![[0.]]))
.is_err(),
"n_runs must be strictly positive"
);
} | rust_cleaned_test_functions.jsonl/10372 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 169
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
1089,
67352,
368,
341,
286,
2060,
33673,
310,
48568,
44,
12735,
1712,
486,
3519,
7,
16,
340,
394,
659,
4197,
1089,
67352,
7,
15,
340,
394,
659,
6276,
2099,
33363,
3978,
486,
1499,
6110,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_set_max_schedules() {
let GenesisConfigInfo { genesis_config, .. } = create_genesis_config(2);
let bank = Arc::new(Bank::new(&genesis_config));
let mut cache = LeaderScheduleCache::new_from_bank(&bank);
// Max schedules must be greater than 0
cache.set_ma... | rust_cleaned_test_functions.jsonl/26074 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 224
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
6345,
643,
49613,
368,
341,
286,
1077,
40788,
2648,
1731,
314,
59366,
5332,
11,
5241,
335,
284,
1855,
16322,
13774,
5332,
7,
17,
317,
286,
1077,
6073,
284,
19689,
486,
931,
5349,
1180,
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_image_crops() {
// test the top left crop
let top_left = crop_and_resize("assets/lena.png",
0.25, 0.25, 0.25, 0.25, 32, 32);
println!("dims: {:?}", top_left.dimensions());
top_left.save(&Path::new("assets/test_lena_top_left.p... | rust_cleaned_test_functions.jsonl/28012 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 915
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4954,
666,
3702,
368,
341,
286,
442,
1273,
279,
1909,
2115,
19097,
198,
286,
1077,
1909,
9579,
284,
19097,
8378,
53370,
445,
5160,
14,
48021,
3508,
756,
11070,
220,
15,
13,
17,
20,
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_service_group() {
let _exec = fasync::Executor::new().unwrap();
let (mut service_group, _server) = build_service_group();
let mut expected_server_channels = HashSet::new();
let mut expected_psms = HashSet::new();
assert_eq!(service_group.service_defs(),... | rust_cleaned_test_functions.jsonl/98661 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 516
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12267,
6288,
368,
341,
286,
1077,
716,
11748,
284,
282,
7692,
486,
25255,
486,
931,
1005,
15454,
1428,
286,
1077,
320,
6984,
2473,
6288,
11,
716,
4030,
8,
284,
1936,
12267,
6288,
1428,
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_region_retry() {
#[derive(Clone)]
struct MockRpcResponse;
impl HasError for MockRpcResponse {
fn error(&mut self) -> Option<Error> {
unreachable!()
}
}
impl HasRegionError for MockRpcResponse {
fn regio... | rust_cleaned_test_functions.jsonl/3248 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1559
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20627,
62745,
368,
341,
286,
11506,
27098,
65297,
5563,
286,
2036,
14563,
60248,
2582,
401,
286,
11605,
11443,
1454,
369,
14563,
60248,
2582,
341,
310,
5168,
1465,
2099,
6984,
656,
8,
1464,
6959,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_datefastfield() {
use crate::fastfield::FastValue;
let mut schema_builder = Schema::builder();
let date_field = schema_builder.add_date_field("date", FAST);
let multi_date_field = schema_builder.add_date_field(
"multi_date",
IntOptions::def... | rust_cleaned_test_functions.jsonl/5525 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1193
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4164,
9349,
2566,
368,
341,
286,
990,
17717,
486,
9349,
2566,
486,
32174,
1130,
280,
286,
1077,
5206,
10802,
28532,
284,
12539,
486,
17850,
543,
286,
1077,
2400,
5013,
284,
10802,
28532,
1364,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stack2() {
test_interpreter_and_jit_asm!(
"
stb [r10-4], 0x01
stb [r10-3], 0x02
stb [r10-2], 0x03
stb [r10-1], 0x04
mov r1, r10
mov r2, 0x4
sub r1, r2
syscall BpfMemFrob
mov r1, 0
ldxb r2, [r10-4]
... | rust_cleaned_test_functions.jsonl/59031 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 492
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15528,
17,
368,
341,
262,
1273,
15318,
28637,
8378,
5374,
275,
67529,
33673,
286,
6228,
286,
357,
65,
508,
81,
16,
15,
12,
19,
1125,
220,
15,
87,
15,
16,
198,
286,
357,
65,
508,
81,
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... | 1 |
#[test]
fn test_serde_compat() -> Result<()> {
// Build the big struct
let mut m = BTreeMap::new();
m.insert("m1".to_string(), 1);
m.insert("m2".to_string(), 2);
let u = Un::un1(UnOne { one: 1 });
let e = En::TWO;
let mut int_keys = BTreeMap::new();
int_keys.insert(42, 43);
... | rust_cleaned_test_functions.jsonl/122581 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 451
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75861,
450,
89602,
368,
1464,
5714,
71698,
341,
262,
442,
7854,
279,
2409,
2036,
198,
262,
1077,
5206,
296,
284,
425,
6533,
2227,
486,
931,
543,
262,
296,
7030,
445,
76,
16,
3263,
983,
3904,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nonlinear_normal_positve() {
assert_eq!(nonlinear_normal_positve(0.0), 0.0);
assert_eq!(nonlinear_normal_positve(23.45), 23.45);
assert_eq!(nonlinear_normal_positve(-0.0), 0.0);
assert_eq!(nonlinear_normal_positve(-23.45), 0.0);
assert_eq!(nonlinear_normal_positve(f64::INFINI... | rust_cleaned_test_functions.jsonl/101301 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 285
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21637,
22763,
13973,
6479,
275,
586,
368,
341,
262,
2060,
10714,
10297,
6280,
22763,
13973,
6479,
275,
586,
7,
15,
13,
15,
701,
220,
15,
13,
15,
317,
262,
2060,
10714,
10297,
6280,
22763,
13973,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lifetime() {
#[derive(PartialEq, TypedBuilder)]
struct Foo<'a, 'b> {
x: &'a i32,
y: &'b i32,
}
assert!(Foo::builder().x(&1).y(&2).build() == Foo { x: &1, y: &2 });
} | rust_cleaned_test_functions.jsonl/36678 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 124
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
98827,
368,
341,
262,
11506,
27098,
5304,
20894,
27312,
11,
50554,
3297,
5563,
262,
2036,
33428,
18291,
64,
11,
364,
65,
29,
341,
286,
856,
25,
30136,
64,
600,
18,
17,
345,
286,
379,
25,
30136... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_retain() {
let mut set = BTreeSet::from([1, 2, 3, 4, 5, 6]);
set.retain(|&k| k % 2 == 0);
assert_eq!(set.len(), 3);
assert!(set.contains(&2));
assert!(set.contains(&4));
assert!(set.contains(&6));
} | rust_cleaned_test_functions.jsonl/13745 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 122
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21695,
466,
368,
341,
262,
1077,
5206,
738,
284,
425,
6533,
1649,
486,
1499,
2561,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
2558,
262,
738,
1327,
22921,
22428,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rotate_nearest_rgb() {
fn rotate_nearest_about_center(image: &RgbImage) -> RgbImage {
rotate_about_center(
image,
std::f32::consts::PI / 4f32,
Interpolation::Nearest,
Rgb::black(),
)
}
compare_to_truth(
"elephant... | rust_cleaned_test_functions.jsonl/81459 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 222
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60834,
13925,
15432,
37407,
368,
341,
262,
5168,
16919,
13925,
15432,
57975,
21087,
10075,
25,
609,
80951,
1906,
8,
1464,
431,
9511,
1906,
341,
286,
16919,
57975,
21087,
1006,
310,
2168,
345,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_insert_error_cases() {
let mut netif_configs = NetworkInterfaceConfigs::new();
let id_1 = "id_1";
let host_dev_name_1 = "dev3";
let guest_mac_1 = "01:23:45:67:89:0a";
// Adding the first valid network config.
let netif_1 = create_netif(id_1, host... | rust_cleaned_test_functions.jsonl/72601 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1474
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
4096,
41427,
368,
341,
286,
1077,
5206,
4179,
333,
59150,
284,
8141,
5051,
84905,
486,
931,
1428,
286,
1077,
877,
62,
16,
284,
330,
307,
62,
16,
876,
286,
1077,
3468,
10433,
1269,
62,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_add_sub_invariant() {
// issue #37
let base = NaiveDate::from_ymd(2000, 1, 1).and_hms(0, 0, 0);
let t = -946684799990000;
let time = base + Duration::microseconds(t);
assert_eq!(t, time.signed_duration_since(base).num_microseconds().unwrap());
... | rust_cleaned_test_functions.jsonl/76828 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 151
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28943,
2891,
5228,
1243,
15969,
368,
341,
286,
442,
4265,
671,
18,
22,
198,
286,
1077,
2331,
284,
12812,
533,
1916,
486,
1499,
62,
1600,
67,
7,
17,
15,
15,
15,
11,
220,
16,
11,
220,
16,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_iter_mut_forwards() {
let mut cache = LruCache::new(4);
cache.put("a", 1);
cache.put("b", 2);
cache.put("c", 3);
cache.put("d", 4);
let mut iter = cache.iter_mut();
assert_opt_eq_mut_tuple(iter.next(), ("d", 4));
assert_opt_eq_mut_... | rust_cleaned_test_functions.jsonl/77939 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 441
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11723,
29523,
5478,
4014,
368,
341,
286,
1077,
5206,
6500,
284,
444,
2672,
8233,
486,
931,
7,
19,
317,
286,
6500,
3597,
445,
64,
497,
220,
16,
317,
286,
6500,
3597,
445,
65,
497,
220,
17,
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_array_chunks_zip() {
let v1: &[i32] = &[0, 1, 2, 3, 4];
let v2: &[i32] = &[6, 7, 8, 9, 10];
let res = v1
.array_chunks::<2>()
.zip(v2.array_chunks::<2>())
.map(|(a, b)| a.iter().sum::<i32>() + b.iter().sum::<i32>())
.collect::<Vec<_>>();
assert_eq... | rust_cleaned_test_functions.jsonl/9648 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 202
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
65470,
42131,
368,
341,
262,
1077,
348,
16,
25,
44590,
72,
18,
17,
60,
284,
44590,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
935,
262,
1077,
348,
17,
25,
44590,
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... | 1 |
#[test]
fn test_if() {
use std::f64::consts::{E, PI};
let cases = vec![
((Some(0), E, PI), Real::new(PI).ok()),
((Some(1), E, PI), Real::new(E).ok()),
((None, E, PI), Real::new(PI).ok()),
];
for ((condition, value1, value2), expected) in case... | rust_cleaned_test_functions.jsonl/14918 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 406
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11119,
368,
341,
286,
990,
1460,
486,
69,
21,
19,
486,
95773,
22964,
36,
11,
22578,
2315,
286,
1077,
5048,
284,
7486,
90515,
310,
1781,
8373,
7,
15,
701,
468,
11,
22578,
701,
8800,
486,
931,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_sorted_by_ancestors_score_competitive() {
let tx1 = build_tx(vec![(&Byte32::zero(), 1)], 2);
let tx1_hash = tx1.hash();
let tx2 = build_tx(vec![(&tx1_hash, 0)], 1);
let tx2_hash = tx2.hash();
let tx3 = build_tx(vec![(&tx2_hash, 0)], 1);
let tx2_1 ... | rust_cleaned_test_functions.jsonl/50524 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 816
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41277,
3710,
62,
681,
267,
1087,
10405,
2965,
6862,
3404,
368,
341,
286,
1077,
9854,
16,
284,
1936,
17805,
25592,
20703,
2099,
7153,
18,
17,
486,
14154,
1507,
220,
16,
25035,
220,
17,
317,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_heap_str() {
let long = "I am a long string that has very many characters";
let repr = Repr::new(&long);
assert_eq!(repr.as_str(), long);
} | rust_cleaned_test_functions.jsonl/14387 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 88
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33059,
2895,
368,
341,
286,
1077,
1293,
284,
330,
40,
1079,
264,
1293,
914,
429,
702,
1602,
1657,
5766,
876,
286,
1077,
30636,
284,
1032,
649,
486,
931,
2099,
4825,
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 |
#[test]
fn test_iterate_into_string() {
let words = vec!["hello", " ", "world"];
let capitalized_words = words
.iter()
.map(|x| capitalize_first(x))
.collect::<String>();
assert_eq!(capitalized_words, "Hello World");
} | rust_cleaned_test_functions.jsonl/68053 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 144
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11723,
349,
45514,
3904,
368,
341,
286,
1077,
4244,
284,
7486,
0,
1183,
14990,
497,
330,
3670,
330,
14615,
6332,
286,
1077,
97321,
18981,
284,
4244,
198,
310,
659,
2015,
741,
310,
659,
2186,
224... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_value_struct() -> LuaResult<()> {
let lua = Lua::new();
let globals = lua.globals();
globals.set("null", lua.null())?;
#[derive(Serialize)]
struct Test {
name: String,
key: i64,
data: Option<bool>,
}
let test = Test {
name: "alex".... | rust_cleaned_test_functions.jsonl/50704 | {
"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,
2346,
3142,
15126,
368,
1464,
37662,
2077,
71698,
341,
262,
1077,
20357,
284,
37662,
486,
931,
543,
262,
1077,
37785,
284,
20357,
1302,
16616,
543,
262,
37785,
980,
445,
2921,
497,
20357,
59266,
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... | 4 |
#[test]
fn test_padding_with_large_payload() {
let mut buffer = buffer();
assert!(buffer.enqueue(12, ()).is_ok());
assert!(buffer.dequeue().is_ok());
buffer
.enqueue(12, ())
.unwrap()
.copy_from_slice(b"abcdefghijkl");
} | rust_cleaned_test_functions.jsonl/101977 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 158
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40726,
6615,
45228,
32813,
368,
341,
286,
1077,
5206,
4147,
284,
4147,
543,
286,
2060,
10297,
7573,
47468,
7,
16,
17,
11,
1719,
568,
285,
19817,
1423,
286,
2060,
10297,
7573,
93789,
1005,
285,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_isometry_transform_vector() {
let distance = Vector2::new(1_f64, 2_f64);
let translation = Translation2::from_vector(&distance);
let rotation = Rotation2::from_angle(Degrees(90_f64));
let isometry = Isometry2::from_parts(&translation, &rotation);
let vecto... | rust_cleaned_test_functions.jsonl/77210 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
6988,
18449,
12247,
368,
341,
286,
1077,
6010,
284,
4196,
17,
486,
931,
7,
16,
761,
21,
19,
11,
220,
17,
761,
21,
19,
317,
286,
1077,
14468,
284,
38041,
17,
486,
1499,
12247,
2099,
193... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_kvm_bindings_struct() {
#[repr(C)]
#[derive(Debug, PartialEq, Versionize)]
pub struct kvm_pit_config {
pub flags: ::std::os::raw::c_uint,
pub pad: [::std::os::raw::c_uint; 15usize],
}
let state = kvm_pit_config {
flags:... | rust_cleaned_test_functions.jsonl/43358 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 424
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4698,
7338,
94516,
15126,
368,
341,
286,
11506,
30837,
3025,
5563,
286,
11506,
27098,
42618,
11,
55039,
11,
6079,
551,
5563,
286,
6675,
2036,
94748,
620,
275,
5332,
341,
310,
6675,
8042,
25,
3504,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
for &p in TEST_PROB {
for &n in TEST_SIZE {
let mut rng: StdRng = SeedableRng::from_seed([0; 32]);
let mut bv = BitVector::new();
let mut ba = BitArray::new(n as usize);
for i in 0..n {
... | rust_cleaned_test_functions.jsonl/50483 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 391
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
368,
341,
286,
369,
609,
79,
304,
13602,
5756,
33,
341,
310,
369,
609,
77,
304,
13602,
4098,
341,
394,
1077,
5206,
28422,
25,
42517,
49,
968,
284,
35822,
480,
49,
968,
486,
1499,
33809,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_decode_uadd8() {
assert_eq!(
decode_32(0xfa82f24c),
Instruction::UADD8 {
params: Reg3NoSetFlagsParams {
rd: Reg::R2,
rn: Reg::R2,
rm: Reg::R12,
}
}
);
} | rust_cleaned_test_functions.jsonl/64871 | {
"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,
15227,
7300,
718,
23,
368,
341,
1066,
262,
2060,
10714,
33673,
286,
16895,
62,
18,
17,
7,
15,
48890,
23,
17,
69,
17,
19,
66,
1326,
286,
29051,
486,
52,
15665,
23,
341,
310,
3628,
25,
3184,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_finalize_some_value() {
assert_eq!(finalize(3987120094), 18446744069722431521);
} | rust_cleaned_test_functions.jsonl/54037 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 58
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70616,
61855,
3142,
368,
341,
286,
2060,
10714,
10297,
94405,
7,
18,
24,
23,
22,
16,
17,
15,
15,
24,
19,
701,
220,
16,
23,
19,
19,
21,
22,
19,
19,
15,
21,
24,
22,
17,
17,
19,
18,
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 |
#[test]
fn test_multi_char_truncation_symbol() -> io::Result<()> {
test_truncate_length_with_config(
"1337_hello_world",
15,
"1337_hello_worl",
"a",
"truncation_symbol = \"apple\"",
)
} | rust_cleaned_test_functions.jsonl/106750 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 131
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25133,
9232,
3547,
1347,
367,
21179,
368,
1464,
6399,
486,
2077,
71698,
341,
262,
1273,
3547,
26900,
5118,
6615,
5332,
1006,
286,
330,
16,
18,
18,
22,
96724,
31792,
756,
286,
220,
16,
20,
345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_square() {
let mut b : felem_as_words = [9794203289623549276, 7309342082925068282, 1139538881605221074, 15659550692327388916, 16008355200866287827, 582484205531694093];
let mut out : felem_as_words = [0, 0, 0, 0, 0, 0];
bls12_square(&mut out, &mut b);
assert_eq!(out, [12260768510... | rust_cleaned_test_functions.jsonl/91331 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 206
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39794,
368,
341,
262,
1077,
5206,
293,
549,
1152,
3433,
11898,
18981,
284,
508,
24,
22,
24,
19,
17,
15,
18,
17,
23,
24,
21,
17,
18,
20,
19,
24,
17,
22,
21,
11,
220,
22,
18,
15,
24,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_handle_heartbeat() {
setup_for_test();
let commit = 2u64;
let nw = |f, to, term, commit| {
let mut m = new_message(f, to, MessageType::MsgHeartbeat, 0);
m.set_term(term);
m.set_commit(commit);
m
};
let mut tests = vec![
(nw(2, 1, 2, com... | rust_cleaned_test_functions.jsonl/107115 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 756
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10630,
62,
72471,
368,
341,
262,
6505,
5478,
4452,
543,
262,
1077,
5266,
284,
220,
17,
84,
21,
19,
280,
262,
1077,
62532,
284,
760,
69,
11,
311,
11,
4647,
11,
5266,
91,
341,
286,
1077,
5206,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_rm_verbose() {
let (at, mut ucmd) = testing(UTIL_NAME);
let file_a = "test_rm_verbose_file_a";
let file_b = "test_rm_verbose_file_b";
at.touch(file_a);
at.touch(file_b);
let result = ucmd.arg("-v").arg(file_a).arg(file_b).run();
assert_empty_stderr!(result);
ass... | rust_cleaned_test_functions.jsonl/61418 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 220
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58537,
67921,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
7497,
7,
36969,
4708,
317,
262,
1077,
1034,
4306,
284,
330,
1944,
58537,
67921,
2458,
4306,
876,
262,
1077,
1034,
880,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_gdt_entry() {
assert_eq!(GdtEntry::new(0xa09b, 0x0, 0xfffff).0, 0xaf9b000000ffff);
assert_eq!(GdtEntry::new(0xc093, 0x0, 0xfffff).0, 0xcf93000000ffff);
} | rust_cleaned_test_functions.jsonl/12649 | {
"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,
1889,
8047,
9078,
368,
341,
286,
2060,
10714,
10297,
38,
8047,
5874,
486,
931,
7,
15,
9591,
15,
24,
65,
11,
220,
15,
87,
15,
11,
220,
15,
20518,
69,
568,
15,
11,
220,
15,
54795,
24,
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_list_coercion() {
Python::with_gil(|py| {
let v = vec!["foo", "bar"];
let ob = v.to_object(py);
let seq = ob.cast_as::<PySequence>(py).unwrap();
assert!(seq.list().is_ok());
});
} | rust_cleaned_test_functions.jsonl/70328 | {
"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,
2019,
11393,
2962,
290,
368,
341,
286,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
341,
310,
1077,
348,
284,
7486,
0,
1183,
7975,
497,
330,
2257,
6332,
310,
1077,
1508,
284,
348,
2389,
5314,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_setter_should_panic() {
let mut a = Ts {jaf: 4, field_1: 0, field_2: String::from("hello")};
a.set_field_1(20);
assert_eq!(a.field_1, 11);
} | rust_cleaned_test_functions.jsonl/24667 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 89
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
2602,
465,
43378,
620,
31270,
368,
341,
262,
1077,
5206,
264,
284,
25076,
314,
73,
2577,
25,
220,
19,
11,
2070,
62,
16,
25,
220,
15,
11,
2070,
62,
17,
25,
923,
486,
1499,
445,
14990,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_entry_error() {
let tests = [
&b": 1"[..],
b"?: 1",
b"First",
b"First second",
b"First.?: 1",
b"F\xc3\xb6rst: 1",
b"F~rst: 1",
];
for data in tests.iter() {
match parse_e... | rust_cleaned_test_functions.jsonl/113430 | {
"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,
21039,
9078,
4096,
368,
341,
286,
1077,
7032,
284,
2278,
310,
609,
65,
788,
220,
16,
36864,
496,
1259,
310,
293,
1,
4820,
220,
16,
756,
310,
293,
1,
5338,
756,
310,
293,
1,
5338,
2086,
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_position_elem() {
assert!([].position_elem(&1).is_none());
let v1 = vec![1, 2, 3, 3, 2, 5];
assert_eq!(v1.position_elem(&1), Some(0));
assert_eq!(v1.position_elem(&2), Some(1));
assert_eq!(v1.position_elem(&5), Some(5));
assert!(v1.position_elem(&... | rust_cleaned_test_functions.jsonl/111401 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 181
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9661,
28179,
368,
341,
286,
2060,
0,
2561,
936,
3487,
28179,
2099,
16,
568,
285,
31488,
5231,
286,
1077,
348,
16,
284,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
18,
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_min_max() -> Result<()> {
let observed = return_type(&AggregateFunction::Min, &[DataType::Utf8])?;
assert_eq!(DataType::Utf8, observed);
let observed = return_type(&AggregateFunction::Max, &[DataType::Int32])?;
assert_eq!(DataType::Int32, observed);
// t... | rust_cleaned_test_functions.jsonl/4593 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 306
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7260,
6345,
368,
1464,
5714,
71698,
341,
286,
1077,
13166,
284,
470,
1819,
2099,
64580,
5152,
486,
6217,
11,
44590,
22653,
486,
38980,
23,
2467,
37445,
286,
2060,
10714,
10297,
22653,
486,
38980,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_single_no_fraction() {
assert_eq!(
Variant::VSingle(4.0).divide(Variant::VSingle(2.0)).unwrap(),
Variant::VInteger(2)
);
} | rust_cleaned_test_functions.jsonl/84604 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 145
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19487,
6536,
59023,
368,
341,
394,
2060,
10714,
33673,
503,
39292,
486,
53,
10888,
7,
19,
13,
15,
568,
59394,
12410,
15341,
486,
53,
10888,
7,
17,
13,
15,
4579,
15454,
3148,
503,
39292,
486,
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 |
#[test]
fn test_deserializing_lat_long_value_from_bytes() {
let lat_long_bytes = [
0, 0, 0, 2, 0, 0, 0, 20, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 8,
255, 255, 255, 255, 255, 255, 255, 255,
];
let lat_long = LatLongValue::from_sql(Some(&lat_long... | rust_cleaned_test_functions.jsonl/104568 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 236
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
2848,
4849,
26174,
17799,
3142,
5673,
12524,
368,
341,
286,
1077,
6844,
17799,
12524,
284,
2278,
310,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
17,
11,
220,
15,
11,
220,
15,
11,
220... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.