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_chain_basics() -> std::io::Result<()> {
let source1: io::Cursor<Vec<u8>> = io::Cursor::new(vec![0, 1, 2]);
let source2: io::Cursor<Vec<u8>> = io::Cursor::new(vec![3, 4, 5]);
task::block_on(async move {
let mut buffer = Vec::new();
let mut source ... | rust_cleaned_test_functions.jsonl/45549 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 268
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30583,
880,
67981,
368,
1464,
1460,
486,
815,
486,
2077,
71698,
341,
286,
1077,
2530,
16,
25,
6399,
486,
14543,
50439,
34837,
23,
2452,
284,
6399,
486,
14543,
486,
931,
25592,
20703,
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... | 2 |
#[test]
fn test_primitive_array_negate() {
let a: Int64Array = (0..100).into_iter().map(Some).collect();
let actual = negate(&a).unwrap();
let expected: Int64Array = (0..100).into_iter().map(|i| Some(-i)).collect();
assert_eq!(expected, actual);
} | rust_cleaned_test_functions.jsonl/120284 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 128
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84087,
3858,
28209,
349,
368,
341,
286,
1077,
264,
25,
1333,
21,
19,
1857,
284,
320,
15,
496,
16,
15,
15,
568,
18122,
11723,
1005,
2186,
65405,
568,
17384,
543,
286,
1077,
5042,
284,
71219,
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_manifest_generation_binds() {
let mut m = Manifest {
pkg_ident: PackageIdent::from_str("core/nginx").unwrap(),
metadata_name: "nginx-latest".to_owned(),
image: "core/nginx:latest".to_owned(),
count: 3,
service_topology: Default:... | rust_cleaned_test_functions.jsonl/32937 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 422
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74269,
64191,
880,
8673,
368,
341,
286,
1077,
5206,
296,
284,
39361,
341,
310,
24793,
38399,
25,
16906,
28301,
486,
1499,
2895,
445,
2153,
69261,
1827,
15454,
3148,
310,
11160,
1269,
25,
330,
7356... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_simple_graph_parse() {
let inputs = read_lines("data/day_12_sample.txt");
let (nodes, edges) = parse_cave_system(&inputs);
assert_eq!(nodes.len(), 6);
assert_eq!(edges.len(), inputs.len() * 2);
} | rust_cleaned_test_functions.jsonl/42446 | {
"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,
30015,
14738,
21039,
368,
341,
262,
1077,
11127,
284,
1349,
18323,
445,
691,
44739,
62,
16,
17,
17491,
3909,
797,
262,
1077,
320,
20008,
11,
12822,
8,
284,
4715,
666,
523,
17687,
2099,
24941,
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_find_pitchgroup() {
let notes0 = [C(Natural), G(Flat)];
let result0 = PitchGroup::find(¬es0);
println!("Result 0: {:?}\n", &result0);
let notes1 = [C(Natural), A(Natural), D(Natural)];
let result1 = PitchGroup::find(¬es1);
println!("Result 1... | rust_cleaned_test_functions.jsonl/126566 | {
"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,
21814,
51959,
4074,
368,
341,
286,
1077,
8388,
15,
284,
508,
34,
8204,
4585,
701,
479,
7,
31019,
12587,
286,
1077,
1102,
15,
284,
45576,
2808,
486,
3903,
2099,
18286,
15,
317,
286,
13751,
17223,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_err_bad_swap() {
let tmp = create_temp_dir("test_err_bad_swap_v2").expect("create temp directory for test");
set_fixture(&tmp, CGROUP_MEMORY_MAX, "0").expect("set fixture for memory limit");
set_fixture(&tmp, CGROUP_MEMORY_LOW, "0").expect("set fixture for memory reservat... | rust_cleaned_test_functions.jsonl/79410 | {
"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,
9266,
34199,
40991,
368,
341,
286,
1077,
4174,
284,
1855,
11771,
4334,
445,
1944,
9266,
34199,
40991,
2273,
17,
1827,
17119,
445,
3182,
2730,
6220,
369,
1273,
797,
286,
738,
74409,
2099,
5173,
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_metric_cache_ignore_shared_txns() {
let (mut smp, peers) = SharedMempoolNetwork::bootstrap_validator_network(2, 1);
let (peer_a, peer_b) = (peers.get(0).unwrap(), peers.get(1).unwrap());
let txns = vec![
TestTransaction::new(1, 0, 1),
TestTransaction::new(1, 1, 1),
... | rust_cleaned_test_functions.jsonl/31469 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 558
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41294,
11529,
58493,
20405,
17805,
4412,
368,
341,
262,
1077,
320,
6984,
274,
1307,
11,
25029,
8,
284,
16990,
44,
3262,
1749,
12320,
486,
6281,
64959,
20966,
7,
17,
11,
220,
16,
317,
262,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_headless() {
use glutin::{ContextBuilder, EventsLoop};
let dim = (256, 256, 8, AaMode::Multi(4));
let events_loop = EventsLoop::new();
let context = ContextBuilder::new()
.with_hardware_acceleration(Some(false))
.build_headless(&events_lo... | rust_cleaned_test_functions.jsonl/129992 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 245
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13138,
1717,
368,
341,
286,
990,
34069,
258,
22964,
1972,
3297,
11,
17627,
14620,
2315,
286,
1077,
5103,
284,
320,
17,
20,
21,
11,
220,
17,
20,
21,
11,
220,
23,
11,
362,
64,
3636,
486,
20358... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_extend() {
let mut one_signal = SigSet::empty();
one_signal.add(SIGUSR1);
let mut two_signals = SigSet::empty();
two_signals.add(SIGUSR2);
two_signals.extend(&one_signal);
assert!(two_signals.contains(SIGUSR1));
assert!(two_signals.contai... | rust_cleaned_test_functions.jsonl/8925 | {
"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,
70265,
368,
341,
286,
1077,
5206,
825,
21137,
284,
41560,
1649,
486,
3194,
543,
286,
825,
21137,
1364,
52516,
49558,
16,
626,
286,
1077,
5206,
1378,
76698,
284,
41560,
1649,
486,
3194,
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_extract_prefix() {
use repr::Timestamp;
fn record(offset: i64, predecessor: Option<i64>) -> CachedRecord {
CachedRecord {
offset,
predecessor,
timestamp: Timestamp::default(),
key: Vec::new(),
value: Default::default(),... | rust_cleaned_test_functions.jsonl/60143 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1287
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
13974,
368,
341,
262,
990,
30636,
486,
20812,
401,
262,
5168,
3255,
26245,
25,
600,
21,
19,
11,
39174,
25,
6959,
21897,
21,
19,
9231,
1464,
74205,
6471,
341,
286,
74205,
6471,
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_fixed_size_list_array() {
// Construct a value array
let value_data = ArrayData::builder(DataType::Int32)
.len(9)
.add_buffer(Buffer::from_slice_ref(&[0, 1, 2, 3, 4, 5, 6, 7, 8]))
.build();
// Construct a list array from the above two
... | rust_cleaned_test_functions.jsonl/3841 | {
"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,
37839,
2368,
2019,
3858,
368,
341,
286,
442,
18678,
264,
897,
1334,
198,
286,
1077,
897,
1769,
284,
2910,
1043,
486,
17850,
63941,
486,
1072,
18,
17,
340,
310,
659,
2892,
7,
24,
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... | 2 |
#[test]
fn test_initialize_with_nonexistent_process() {
let process = Process::new(10000).expect("Failed to initialize process");
let version = get_ruby_version(&process);
match version
.unwrap_err()
.root_cause()
.downcast_ref::<AddressFinderError>()
... | rust_cleaned_test_functions.jsonl/90830 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 233
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40889,
6615,
21637,
64085,
11305,
368,
341,
286,
1077,
1882,
284,
8603,
486,
931,
7,
16,
15,
15,
15,
15,
568,
17119,
445,
9408,
311,
9468,
1882,
797,
286,
1077,
2319,
284,
633,
1710,
20028,
94... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_rev_words_on_lines() {
// we include them.
let tests = [("", ""),
("a", "a"),
("a b", "b a"),
("cat dog", "dog cat"),
// compressed into a single space.
("cat dog", "dog cat"),... | rust_cleaned_test_functions.jsonl/15903 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 373
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38082,
18981,
4470,
18323,
368,
341,
1066,
262,
442,
582,
2924,
1105,
624,
262,
1077,
7032,
284,
508,
19814,
72712,
338,
3489,
64,
497,
330,
64,
4461,
338,
3489,
64,
293,
497,
330,
65,
264,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_sample_check_cardinality() {
let res = sample_check_cardinality(
vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].into_iter(),
|idx| idx % 2 == 0,
10_000,
100_000,
);
assert!(res)
} | rust_cleaned_test_functions.jsonl/16011 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 167
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17491,
7200,
16888,
80777,
368,
341,
286,
1077,
592,
284,
6077,
7200,
16888,
80777,
1006,
310,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
11,
220,
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_cached_executors() {
let key1 = solana_sdk::pubkey::new_rand();
let key2 = solana_sdk::pubkey::new_rand();
let key3 = solana_sdk::pubkey::new_rand();
let key4 = solana_sdk::pubkey::new_rand();
let executor: Arc<dyn Executor> = Arc::new(TestExecutor {});
... | rust_cleaned_test_functions.jsonl/28963 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 746
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64369,
18430,
9475,
368,
341,
286,
1077,
1376,
16,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
1376,
17,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
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_convert_to_value() {
let mut sort = HashMap::new();
sort.insert("first_name".to_string(), SortDirection::Desc);
let mut query = FindQuery::find_all();
query.limit = Some(10);
query.skip = Some(20);
query.sort = vec![SortSpec::Complex(sort)];
... | rust_cleaned_test_functions.jsonl/40405 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 245
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
2346,
3142,
368,
341,
286,
1077,
5206,
3378,
284,
10528,
486,
931,
543,
286,
3378,
7030,
445,
3896,
1269,
3263,
983,
3904,
1507,
15967,
9268,
486,
11065,
626,
286,
1077,
5206,
3239,
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_mixed_alloc() {
let mut lin = LinearAllocator::new(100_000);
let mut sc = ScopeStack::new(&mut lin);
let mut count = 0;
for _ in 0..6 {
unsafe {
let a = sc.alloc_obj::<TestObj>().unwrap();
std::ptr::write(
... | rust_cleaned_test_functions.jsonl/107400 | {
"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,
717,
3286,
14802,
368,
341,
286,
1077,
5206,
9805,
284,
28263,
42730,
486,
931,
7,
16,
15,
15,
62,
15,
15,
15,
317,
286,
1077,
5206,
1136,
284,
34920,
4336,
486,
931,
2099,
6984,
9805,
626,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_chunks_exact_remainder() {
let v: &[i32] = &[0, 1, 2, 3, 4];
let c = v.chunks_exact(2);
assert_eq!(c.remainder(), &[4]);
} | rust_cleaned_test_functions.jsonl/9634 | {
"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,
65470,
71084,
86607,
1107,
368,
341,
262,
1077,
348,
25,
44590,
72,
18,
17,
60,
284,
44590,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
935,
262,
1077,
272,
284,
348,
5329,
152... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_strh_reg() {
assert_eq!(
decode_16(0x5274),
Instruction::STRH_reg {
params: Reg3FullParams {
rt: Reg::R4,
rn: Reg::R6,
rm: Reg::R1,
index: true,
add: true,
... | rust_cleaned_test_functions.jsonl/64781 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 315
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
2895,
71,
4920,
368,
341,
1066,
262,
2060,
10714,
33673,
286,
16895,
62,
16,
21,
7,
15,
87,
20,
17,
22,
19,
1326,
286,
29051,
486,
6666,
39,
4920,
341,
310,
3628,
25,
3184,
18,
9432,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rsplitnator() {
let xs = &[1, 2, 3, 4, 5];
let splits: &[&[_]] = &[&[1, 2, 3, 4, 5]];
assert_eq!(xs.rsplitn(1, |x| *x % 2 == 0).collect::<Vec<_>>(), splits);
let splits: &[&[_]] = &[&[5], &[1, 2, 3]];
assert_eq!(xs.rsplitn(2, |x| *x % 2 == 0).collect::<Vec<_>>(), splits);
... | rust_cleaned_test_functions.jsonl/12898 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 352
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
6960,
77,
850,
368,
341,
262,
1077,
11943,
284,
44590,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
4821,
262,
1077,
40467,
25,
44590,
5,
13496,
5053,
284,
44590,
5,
58,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fvm_extractor_empty_fvm() {
let store_dir = tempdir().unwrap();
let uri = store_dir.into_path().into_os_string().into_string().unwrap();
let model = Arc::new(DataModel::connect(uri).unwrap());
let fvm_controller = FvmExtractController::default();
let input... | rust_cleaned_test_functions.jsonl/39216 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 365
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
7338,
89821,
15124,
761,
7338,
368,
341,
286,
1077,
3553,
4334,
284,
2730,
3741,
1005,
15454,
543,
286,
1077,
13071,
284,
3553,
4334,
39860,
2638,
1005,
18122,
29387,
3904,
1005,
18122,
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 |
#[test]
fn test_select_query_with_conditions() {
let query = query_builder::select("users")
.fields(&["id", "name"])
.filter("id = $1")
.filter("name = $2")
.build();
assert_eq!("SELECT id, name FROM users WHERE id = $1 AND name = $2;", query);
... | rust_cleaned_test_functions.jsonl/93980 | {
"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,
13051,
5738,
6615,
54099,
368,
341,
286,
1077,
3239,
284,
3239,
28532,
486,
1742,
445,
4218,
1138,
310,
659,
9007,
2099,
1183,
307,
497,
330,
606,
14108,
310,
659,
5315,
445,
307,
284,
400,
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_repo_arg_with_git_clone() {
let test_env = TestEnvironment::default();
let stderr = test_env.jj_cmd_failure(test_env.env_root(), &["git", "clone", "-R=.", "remote"]);
insta::assert_snapshot!(stderr, @r###"
Error: '--repository' cannot be used with 'git clone'
"###);
} | rust_cleaned_test_functions.jsonl/77489 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 133
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37784,
6057,
6615,
68801,
54742,
368,
341,
262,
1077,
1273,
15879,
284,
3393,
12723,
486,
2258,
543,
262,
1077,
26436,
284,
1273,
15879,
1169,
73,
11684,
43618,
8623,
15879,
9265,
12993,
1507,
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_string_array_get_value_index_out_of_bound() {
let values: [u8; 12] = [
b'h', b'e', b'l', b'l', b'o', b'p', b'a', b'r', b'q', b'u', b'e', b't',
];
let offsets: [i32; 4] = [0, 5, 5, 12];
let array_data = ArrayData::builder(DataType::Utf8)
.le... | rust_cleaned_test_functions.jsonl/11628 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 302
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3904,
3858,
3062,
3142,
3560,
6068,
3575,
19447,
368,
341,
286,
1077,
2750,
25,
508,
84,
23,
26,
220,
16,
17,
60,
284,
2278,
310,
293,
38882,
516,
293,
47868,
516,
293,
63866,
516,
293,
63866,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_occupied_neighbours() {
let pd = PocketDimension::new3(&Pos3(0,0,0), test_grid());
assert_eq!(pd.occupied_neighbours(&Pos3(0,0,0)), 1);
assert_eq!(pd.occupied_neighbours(&Pos3(1,2,0)), 3);
} | rust_cleaned_test_functions.jsonl/76748 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 141
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
40356,
13925,
52117,
368,
341,
286,
1077,
7744,
284,
45724,
26121,
486,
931,
18,
2099,
4859,
18,
7,
15,
11,
15,
11,
15,
701,
1273,
15604,
1423,
286,
2060,
10714,
10297,
15360,
13,
40356,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_skewness() {
let skewness = |x: FisherSnedecor| x.skewness().unwrap();
test_almost(0.1, 10.0, 15.78090735784977089658, 1e-14, skewness);
test_case(1.0, 10.0, 5.773502691896257645091, skewness);
test_case(10.0, 10.0, 3.614784456460255759501, skewness);
} | rust_cleaned_test_functions.jsonl/42684 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 170
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33811,
365,
2090,
368,
341,
286,
1077,
40543,
2090,
284,
760,
87,
25,
35504,
50,
18694,
757,
269,
91,
856,
39454,
365,
2090,
1005,
15454,
543,
286,
1273,
94418,
7,
15,
13,
16,
11,
220,
16,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_versions_from_slice_max() {
assert_eq!(Err(ProtoverError::ExceedsMax), ProtoSet::from_slice(&[(4294967295, 4294967295)]));
} | rust_cleaned_test_functions.jsonl/105773 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 75
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
65148,
5673,
26488,
6345,
368,
341,
286,
2060,
10714,
10297,
7747,
7,
31549,
423,
1454,
486,
840,
4635,
82,
5974,
701,
57677,
1649,
486,
1499,
26488,
2099,
9697,
19,
17,
24,
19,
24,
21,
22,
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 |
#[test]
fn test_unresolved_type_error() {
insta::assert_display_snapshot!(compilation_errors(
"\n\nfn main() {\nlet a = Foo{};\n\nlet b = Bar{};\n}"
));
} | rust_cleaned_test_functions.jsonl/21695 | {
"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,
4907,
39747,
1819,
4096,
368,
341,
286,
1761,
64,
486,
2207,
14825,
53265,
10297,
5689,
13455,
20196,
1006,
310,
2917,
77,
1699,
8822,
1887,
368,
28152,
77,
1149,
264,
284,
33428,
6257,
17882,
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 |
#[test]
fn test_echo_deconstruct() {
let packet = Packet::new_unchecked(&ECHO_PACKET_BYTES[..]);
assert_eq!(packet.msg_type(), Message::EchoRequest);
assert_eq!(packet.msg_code(), 0);
assert_eq!(packet.checksum(), 0x19b3);
assert_eq!(packet.echo_ident(), 0x1234);
... | rust_cleaned_test_functions.jsonl/76450 | {
"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,
68628,
2259,
7596,
368,
341,
286,
1077,
10151,
284,
28889,
486,
931,
4907,
7549,
2099,
36,
30498,
40328,
40705,
95874,
2558,
286,
2060,
10714,
10297,
24829,
15137,
1819,
1507,
4856,
486,
74994,
1900... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rchunks_mut_last() {
let v: &mut [i32] = &mut [0, 1, 2, 3, 4, 5];
let c = v.rchunks_mut(2);
assert_eq!(c.last().unwrap(), &[0, 1]);
let v2: &mut [i32] = &mut [0, 1, 2, 3, 4];
let c2 = v2.rchunks_mut(2);
assert_eq!(c2.last().unwrap(), &[0]);
} | rust_cleaned_test_functions.jsonl/9672 | {
"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,
1710,
84263,
29523,
12195,
368,
341,
262,
1077,
348,
25,
609,
6984,
508,
72,
18,
17,
60,
284,
609,
6984,
508,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_find_all_refs_for_local() {
check(
r#"
fn main() {
let mut i = 1;
let j = 1;
i = i<|> + j;
{
i = 0;
}
i = 5;
}"#,
expect![[r#"
i Local FileId(0) 24..25 Other Write
FileId(0) 50..51 Other Write
... | rust_cleaned_test_functions.jsonl/47769 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 301
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
5705,
60638,
5478,
13564,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
8822,
1887,
368,
341,
262,
1077,
5206,
600,
284,
220,
16,
280,
262,
1077,
502,
284,
220,
16,
280,
262,
600,
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_public_encrypt() {
let k0 = super::Rsa::generate(512).unwrap();
let k0pkey = k0.private_key_to_pem().unwrap();
let k1 = super::Rsa::private_key_from_pem(&k0pkey).unwrap();
let msg = vec![0xdeu8, 0xadu8, 0xd0u8, 0x0du8];
let mut emesg = vec![0; k0.size() ... | rust_cleaned_test_functions.jsonl/28562 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 328
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27074,
66593,
368,
341,
286,
1077,
595,
15,
284,
2256,
486,
49,
9081,
486,
19366,
7,
20,
16,
17,
568,
15454,
543,
286,
1077,
595,
15,
79,
792,
284,
595,
15,
61603,
3097,
2346,
620,
336,
1005... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_session_default_timestamp_and_sid() {
let json = r#"{
"started": "2020-02-07T14:16:00Z",
"attrs": {
"release": "sentry-test@1.0.0"
}
}"#;
let parsed = SessionUpdate::parse(json.as_bytes()).unwrap();
assert!(!parsed.session_id.is_nil());
} | rust_cleaned_test_functions.jsonl/4848 | {
"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,
12316,
9993,
23073,
8378,
53044,
368,
341,
286,
1077,
2951,
284,
435,
55543,
515,
220,
330,
46723,
788,
330,
17,
15,
17,
15,
12,
15,
17,
12,
15,
22,
51,
16,
19,
25,
16,
21,
25,
15,
15,
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_out() {
let mut ss = SimpleStore::new();
let tup = tuple![E::S("test content".to_string())];
assert!(ss.out(tup).is_ok())
} | rust_cleaned_test_functions.jsonl/74946 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 73
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6068,
368,
341,
262,
1077,
5206,
10870,
284,
8993,
6093,
486,
931,
543,
262,
1077,
57385,
284,
14405,
20703,
36,
486,
50,
445,
1944,
2213,
3263,
983,
3904,
2140,
935,
262,
2060,
10297,
778,
2532... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_d_0() {
test_add(
TimeGranularity::Days,
0,
"2000-01-01T00:00:00.0",
"2000-01-01T00:00:00.0",
);
} | rust_cleaned_test_functions.jsonl/134027 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 134
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
814,
62,
15,
368,
341,
286,
1273,
2891,
1006,
310,
4120,
90723,
28979,
486,
20557,
345,
310,
220,
15,
345,
310,
330,
17,
15,
15,
15,
12,
15,
16,
12,
15,
16,
51,
15,
15,
25,
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_check_contains_primitive_primitive() {
// OK
let f1 = Type::primitive_type_builder("f", PhysicalType::INT32)
.build()
.unwrap();
let f2 = Type::primitive_type_builder("f", PhysicalType::INT32)
.build()
.unwrap();
ass... | rust_cleaned_test_functions.jsonl/16688 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 926
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
63598,
84087,
84087,
368,
341,
286,
442,
10402,
198,
286,
1077,
282,
16,
284,
3990,
486,
73448,
1819,
28532,
445,
69,
497,
27379,
929,
486,
3221,
18,
17,
340,
310,
659,
5834,
741,
310,
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_parse_one_log() -> Result<(), MetricForwarderError> {
let input = [
"MONITORING",
"cool_service",
"2017-04-26T10:41:09.023Z",
"some_\tstr:12345.6|c|#some_key=some_value,some_key_2=some_value_2\n",
];
let expecte... | rust_cleaned_test_functions.jsonl/132008 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 332
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
11667,
5224,
368,
1464,
5714,
68843,
52458,
25925,
261,
1454,
29,
341,
286,
1077,
1946,
284,
2278,
310,
330,
21344,
44556,
1718,
756,
310,
330,
42196,
12267,
756,
310,
330,
17,
15,
16,
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_leader_commit_entry() {
setup_for_test();
let s = new_storage();
let mut r = new_test_raft(1, vec![1, 2, 3], 10, 1, s.clone());
r.become_candidate();
r.become_leader();
commit_noop_entry(&mut r, &s);
let li = r.raft_log.last_index();
r.step(new_message(1, 1, Messa... | rust_cleaned_test_functions.jsonl/54474 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 437
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79991,
36346,
9078,
368,
341,
262,
6505,
5478,
4452,
543,
262,
1077,
274,
284,
501,
23310,
543,
262,
1077,
5206,
435,
284,
501,
4452,
62,
2944,
7,
16,
11,
7486,
20703,
16,
11,
220,
17,
11,
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... | 3 |
#[test]
fn test_from_shear() {
let shear_x_with_y = 5;
let shear_y_with_x = 7;
let matrix = Matrix2x2::from_shear(shear_x_with_y, shear_y_with_x);
let expected = Vector2::new(1 + shear_x_with_y, 1 + shear_y_with_x);
let result = matrix * Vector2::new(1, 1);
asser... | rust_cleaned_test_functions.jsonl/128991 | {
"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,
5673,
643,
86060,
368,
341,
286,
1077,
64244,
3212,
6615,
4178,
284,
220,
20,
280,
286,
1077,
64244,
4178,
6615,
3212,
284,
220,
22,
280,
286,
1077,
6172,
284,
11631,
17,
87,
17,
486,
1499,
64... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_flatten() {
#[derive(Deserialize, Serialize, Apiv2Schema)]
struct PagedQuery {
/// First image number to return
offset: Option<i32>,
/// Return number of images
size: Option<i32>,
};
#[derive(Deserialize, Serialize, Apiv2Schema)]
struct ... | rust_cleaned_test_functions.jsonl/128120 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 4008
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75861,
450,
5081,
14456,
368,
341,
262,
11506,
27098,
7,
64465,
11,
39900,
11,
5232,
344,
17,
8632,
5563,
262,
2036,
393,
3279,
2859,
341,
286,
1048,
5512,
2168,
1372,
311,
470,
198,
286,
4347,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_insert_hello_world() {
let mut cl = Cmdline::new(100);
assert_eq!(cl.as_str(), "");
assert!(cl.insert("hello", "world").is_ok());
assert_eq!(cl.as_str(), "hello=world");
let s = CString::new(cl).expect("failed to create CString from Cmdline");
ass... | rust_cleaned_test_functions.jsonl/29212 | {
"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,
17678,
96724,
31792,
368,
341,
286,
1077,
5206,
1185,
284,
40210,
1056,
486,
931,
7,
16,
15,
15,
317,
286,
2060,
10714,
10297,
564,
5357,
2895,
1507,
14498,
286,
2060,
10297,
564,
7030,
445,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_chunks_last() {
let v: &[i32] = &[0, 1, 2, 3, 4, 5];
let c = v.chunks(2);
assert_eq!(c.last().unwrap()[1], 5);
let v2: &[i32] = &[0, 1, 2, 3, 4];
let c2 = v2.chunks(2);
assert_eq!(c2.last().unwrap()[0], 4);
} | rust_cleaned_test_functions.jsonl/4132 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 148
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
65470,
12195,
368,
341,
262,
1077,
348,
25,
44590,
72,
18,
17,
60,
284,
44590,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
262,
1077,
272,
284,
348,
5329,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hover_union_has_impl_action() {
check_actions(
r#"union foo$0() {}"#,
expect![[r#"
[
Implementation(
FilePosition {
file_id: FileId(
0,
... | rust_cleaned_test_functions.jsonl/66665 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 367
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53445,
51621,
21778,
21007,
7931,
368,
341,
286,
1779,
25368,
1006,
310,
435,
55543,
16192,
15229,
3,
15,
368,
4687,
57676,
345,
310,
1720,
0,
15505,
81,
2,
698,
394,
2278,
503,
30813,
1006,
664... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_macro() {
let resp_object = array!["SET", "x"];
let bytes = obj_to_bytes(resp_object);
assert_eq!(bytes, b"*2\r\n$3\r\nSET\r\n$1\r\nx\r\n".as_ref());
let resp_object = array!["RPUSH", "wyz"].extend(vec!["a", "b"]);
let bytes = obj_to_bytes(resp_obje... | rust_cleaned_test_functions.jsonl/78671 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 455
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
58810,
368,
341,
286,
1077,
9039,
5314,
284,
1334,
0,
1183,
5884,
497,
330,
87,
6332,
286,
1077,
5820,
284,
2839,
2346,
12524,
20267,
5314,
317,
286,
2060,
10714,
10297,
9651,
11,
293,
615... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_boolean() {
assert_eq!(parse_boolean(&[0][..]), Ok((EMPTY, false)));
assert_eq!(parse_boolean(&[1][..]), Ok((EMPTY, true)));
} | rust_cleaned_test_functions.jsonl/25448 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 87
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
46642,
368,
341,
286,
2060,
10714,
10297,
6400,
46642,
2099,
58,
15,
1457,
496,
9719,
7622,
1188,
32858,
11,
895,
4945,
286,
2060,
10714,
10297,
6400,
46642,
2099,
58,
16,
1457,
496,
9719,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_take_nonpod_by_ptr_simple() {
let cxx = indoc! {"
uint32_t take_bob(const Bob* a) {
return a->a;
}
std::unique_ptr<Bob> make_bob(uint32_t a) {
auto b = std::make_unique<Bob>();
b->a = a;
return b;
}
"};
l... | rust_cleaned_test_functions.jsonl/9742 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 472
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73261,
21637,
39073,
3710,
4348,
30015,
368,
341,
262,
1077,
272,
4146,
284,
1257,
509,
0,
314,
698,
286,
2622,
18,
17,
528,
1896,
880,
674,
2741,
14261,
9,
264,
8,
341,
310,
470,
264,
405,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_col_prune_derived_dup_cols() {
assert_j_plan(
"select (select sum(c0) from t3 where t3.c1 = t2.c1 and t3.c2 = t2.c2), c1 from t2",
|sql, mut plan| {
col_prune(&mut plan.qry_set, plan.root).unwrap();
let subq = get_lvl_queries(&plan,... | rust_cleaned_test_functions.jsonl/27148 | {
"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,
10211,
5294,
2886,
35345,
2221,
51932,
25347,
368,
341,
286,
2060,
5374,
26564,
1006,
310,
330,
1742,
320,
1742,
2629,
1337,
15,
8,
504,
259,
18,
1380,
259,
18,
520,
16,
284,
259,
17,
520,
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_segments_of_raw_buffers() {
let buf = vec![255u8; 1];
let input = vec![buf.clone(), buf.clone(), buf.clone()];
assert_write_check_read(input, 8);
} | rust_cleaned_test_functions.jsonl/118850 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 82
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55735,
3575,
16067,
54591,
368,
341,
262,
1077,
6607,
284,
7486,
20703,
17,
20,
20,
84,
23,
26,
220,
16,
4821,
262,
1077,
1946,
284,
7486,
20703,
5909,
15997,
1507,
6607,
15997,
1507,
6607,
1599... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_cow_is_well_encoded() {
assert_eq!(
Extension::NoBody.to_cow(),
Extension::NoBody.to_encoded_string()
);
assert_eq!(
Extension::Hierarchy.to_string(),
Extension::Hierarchy.to_encoded_string()
);
assert_eq!... | rust_cleaned_test_functions.jsonl/84394 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 407
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
666,
363,
6892,
1670,
613,
73069,
368,
341,
286,
2060,
10714,
33673,
310,
26473,
486,
2753,
5444,
2389,
666,
363,
3148,
310,
26473,
486,
2753,
5444,
2389,
73069,
3904,
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_ocaml_hashes() {
let mut json_file = open_hashes_json("ocaml_hash.json");
let test_cases: Vec<OCamlHashTest> = serde_json::from_reader(&mut json_file).unwrap();
for test_case in test_cases {
let computed_hash = ocaml_hash_string(test_case.seed, test_case.s.a... | rust_cleaned_test_functions.jsonl/24605 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 294
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49648,
9467,
91616,
368,
341,
286,
1077,
5206,
2951,
2458,
284,
1787,
91616,
9455,
445,
509,
9467,
8950,
4323,
3071,
286,
1077,
1273,
41427,
25,
11312,
27,
7612,
9467,
6370,
2271,
29,
284,
61570,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_redeem_with_shares_and_exit_price() {
let mut context = get_context(accounts(0));
testing_env!(context.build());
let mut contract = Shares::create(
NFT_CONTRACT_ADDRESS.into(),
NFT_TOKEN_ID.into(),
accounts(0),
TOTAL_SUPPLY... | rust_cleaned_test_functions.jsonl/21364 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1078
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
450,
336,
6615,
3712,
5403,
8378,
16880,
9040,
368,
341,
286,
1077,
5206,
2266,
284,
633,
8467,
91868,
7,
15,
1106,
286,
7497,
15879,
10297,
2147,
13239,
5231,
286,
1077,
5206,
5116,
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_lazy_wildcard() {
let df = load_df();
let new = df.clone().lazy().select(&[col("*")]).collect().unwrap();
assert_eq!(new.shape(), (5, 3));
let new = df
.lazy()
.groupby(vec![col("b")])
.agg(vec![col("*").sum(), col("*").first()... | rust_cleaned_test_functions.jsonl/14672 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 230
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49646,
1670,
695,
4951,
368,
341,
286,
1077,
6764,
284,
2795,
10894,
543,
286,
1077,
501,
284,
6764,
15997,
1005,
49013,
1005,
1742,
2099,
58,
2074,
29592,
899,
10697,
17384,
1005,
15454,
543,
286... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_default_port() {
assert_eq!(Url::parse("http://example.com/wow").unwrap().port(), 80u16);
assert_eq!(Url::parse("https://example.com/wow").unwrap().port(), 443u16);
} | rust_cleaned_test_functions.jsonl/80263 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 92
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9993,
8716,
368,
341,
286,
2060,
10714,
10297,
2864,
486,
6400,
445,
1254,
1110,
8687,
905,
6324,
363,
1827,
15454,
1005,
403,
1507,
220,
23,
15,
84,
16,
21,
317,
286,
2060,
10714,
10297,
2864,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_inline_let_bind_cast_expr() {
check_assist(
inline_local_variable,
"
fn bar(a: usize): usize { a }
fn foo() {
let a<|> = bar(1) as u64;
a + 1;
if a > 10 {
}
while a > 10 {
}
let b = a * 10;
bar(a);
}",
"
fn bar(a: usiz... | rust_cleaned_test_functions.jsonl/60314 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 308
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41871,
62,
1149,
27461,
5303,
21915,
368,
341,
286,
1779,
12083,
380,
1006,
310,
7381,
13564,
14635,
345,
310,
6228,
8822,
3619,
2877,
25,
22301,
1648,
22301,
314,
264,
456,
8822,
15229,
368,
341,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fi_fo_buf() {
let mut a = [0u8; 4];
let b = [1u8, 2, 3, 4];
ocall::copy(&mut a[..], &b[..]).unwrap();
assert_eq!(a, b);
} | rust_cleaned_test_functions.jsonl/31499 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 91
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
72,
761,
78,
10363,
368,
341,
262,
1077,
5206,
264,
284,
508,
15,
84,
23,
26,
220,
19,
935,
262,
1077,
293,
284,
508,
16,
84,
23,
11,
220,
17,
11,
220,
18,
11,
220,
19,
935,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_store_overhead() {
solana_logger::setup();
let accounts = AccountsDb::new_single();
let account = AccountSharedData::default();
let pubkey = solana_sdk::pubkey::new_rand();
accounts.store_uncached(0, &[(&pubkey, &account)]);
let slot_stores = accou... | rust_cleaned_test_functions.jsonl/1406 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 275
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14809,
15431,
1983,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
9618,
284,
40655,
7994,
486,
931,
19487,
543,
286,
1077,
2692,
284,
8615,
16997,
1043,
486,
2258,
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... | 2 |
#[test]
fn test_exp() {
assert_eq!(1.0, 0.0f32.exp());
assert_approx_eq!(2.718282, 1.0f32.exp());
assert_approx_eq!(148.413162, 5.0f32.exp());
let inf: f32 = f32::INFINITY;
let neg_inf: f32 = f32::NEG_INFINITY;
let nan: f32 = f32::NAN;
assert_eq!(inf, inf... | rust_cleaned_test_functions.jsonl/8119 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 233
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14214,
368,
341,
286,
2060,
10714,
10297,
16,
13,
15,
11,
220,
15,
13,
15,
69,
18,
17,
13754,
1423,
286,
2060,
90425,
10714,
10297,
17,
13,
22,
16,
23,
17,
23,
17,
11,
220,
16,
13,
15,
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_parse_adstxt() {
assert_eq!(
parse_adstxt(
"# Ads.txt file for example.com:
greenadexchange.com, 12345, DIRECT, d75815a79
blueadexchange.com, XF436, DIRECT
contact=adops@example.com
contact=http://example.com/contact-us
subdomain=divisionone.example.com"
)
... | rust_cleaned_test_functions.jsonl/95248 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 712
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
10027,
267,
2252,
368,
341,
262,
2060,
10714,
33673,
286,
4715,
10027,
267,
2252,
1006,
310,
5869,
42183,
3909,
1034,
369,
3110,
905,
510,
13250,
329,
39568,
905,
11,
220,
16,
17,
18,
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_is_pod_created() {
assert!(!is_pod_created(None));
let mut pod = Pod { ..Pod::default() };
assert!(!is_pod_created(Some(&pod)));
pod.status = Some(PodStatus {
phase: Some("".to_string()),
..PodStatus::default()
});
assert!... | rust_cleaned_test_functions.jsonl/59341 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 267
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
85337,
27288,
368,
341,
286,
2060,
0,
3471,
285,
85337,
27288,
26717,
3237,
286,
1077,
5206,
7509,
284,
16821,
314,
5241,
23527,
486,
2258,
368,
2605,
286,
2060,
0,
3471,
285,
85337,
27288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_expression_chaining() {
let mut context = HashMapContext::new();
assert_eq!(
eval_int_with_context_mut("a = 5; a = a + 2; a", &mut context),
Ok(7)
);
} | rust_cleaned_test_functions.jsonl/105354 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 96
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28068,
4138,
2056,
368,
341,
262,
1077,
5206,
2266,
284,
10528,
1972,
486,
931,
543,
262,
2060,
10714,
33673,
286,
5603,
4042,
6615,
8467,
29523,
445,
64,
284,
220,
20,
26,
264,
284,
264,
488,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_world_symbols_with_no_container() {
let code = r#"
enum FooInner { }
"#;
let mut symbols = get_symbols_matching(code, "FooInner");
let s = symbols.pop().unwrap();
assert_eq!(s.name(), "FooInner");
assert!(s.container_name().is_none());
} | rust_cleaned_test_functions.jsonl/19269 | {
"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,
31792,
55752,
6615,
6536,
15847,
368,
341,
262,
1077,
2038,
284,
435,
2,
698,
262,
7618,
33428,
31597,
314,
456,
262,
5869,
401,
262,
1077,
5206,
17738,
284,
633,
55752,
70763,
15842,
11,
330,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_union() {
let p = Rect::new(Point2D::new(0, 0), Size2D::new(50, 40));
let q = Rect::new(Point2D::new(20,20), Size2D::new(5, 5));
let r = Rect::new(Point2D::new(-15, -30), Size2D::new(200, 15));
let s = Rect::new(Point2D::new(20, -15), Size2D::new(250, 200));
... | rust_cleaned_test_functions.jsonl/24156 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 370
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51621,
368,
341,
286,
1077,
281,
284,
11920,
486,
931,
32737,
17,
35,
486,
931,
7,
15,
11,
220,
15,
701,
8478,
17,
35,
486,
931,
7,
20,
15,
11,
220,
19,
15,
1106,
286,
1077,
2804,
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... | 1 |
#[test]
fn test_reductions_steps() {
let s = "[[[[[4,3],4],4],[7,[[8,4],9]]],[1,1]]";
let mut num = Num::from_input(s);
num.explode(0);
assert_eq!(num._format(), "[[[[0,7],4],[7,[[8,4],9]]],[1,1]]");
num.explode(4);
assert_eq!(num._format(), "[[[[0,7],4],[15,[0,13... | rust_cleaned_test_functions.jsonl/122921 | {
"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,
1288,
1054,
5136,
22731,
368,
341,
286,
1077,
274,
284,
10545,
15505,
15505,
19,
11,
18,
1125,
19,
1125,
19,
14955,
22,
11,
15505,
23,
11,
19,
1125,
24,
5053,
14955,
16,
11,
16,
5053,
876,
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_ctx_alias_broken_regex() -> io::Result<()> {
base_test_ctx_alias(
"input",
toml::toml! {
[kubernetes]
disabled = false
[kubernetes.context_aliases]
"input[.*" = "this does not match"
},
... | rust_cleaned_test_functions.jsonl/41176 | {
"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,
15147,
35947,
880,
81709,
41832,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
2331,
4452,
15147,
35947,
1006,
310,
330,
1355,
756,
310,
311,
1014,
486,
37401,
75,
0,
341,
394,
508,
74,
29827,
92... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_channel_disconnection() {
let system = KompactConfig::default().build().expect("System");
let sender = system.create(CountSender::default);
let counter1 = system.create(Counter::default);
let counter2 = system.create(Counter::default);
let channel1: Box<... | rust_cleaned_test_functions.jsonl/107766 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1836
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14571,
9932,
7742,
368,
341,
286,
1077,
1849,
284,
730,
14435,
531,
2648,
486,
2258,
1005,
5834,
1005,
17119,
445,
2320,
797,
286,
1077,
4646,
284,
1849,
2520,
7,
2507,
20381,
486,
2258,
626,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pairs() {
let mut pairs = Pairs::with_capacity(1).unwrap();
pairs.push(10, 20).unwrap();
pairs.push(20, 10).unwrap();
pairs.push(10, 10).unwrap();
pairs.compact();
for i in 0..pairs.len() {
let kv = pairs.get(i).unwrap();
... | rust_cleaned_test_functions.jsonl/60106 | {
"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,
36430,
368,
341,
286,
1077,
5206,
13530,
284,
393,
4720,
486,
4197,
35603,
7,
16,
568,
15454,
1428,
286,
13530,
2552,
7,
16,
15,
11,
220,
17,
15,
568,
15454,
543,
286,
13530,
2552,
7,
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... | 2 |
#[test]
fn test_outer_doc_comment_of_items() {
let file = SourceFile::parse(
r#"
/// doc
// non-doc
mod foo {}
"#,
)
.ok()
.unwrap();
let module = file.syntax().descendants().find_map(Module::cast).unwrap();
assert_eq!(" doc", module.doc_comments()... | rust_cleaned_test_functions.jsonl/60276 | {
"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,
67258,
18869,
17638,
3575,
12134,
368,
341,
262,
1077,
1034,
284,
8748,
1703,
486,
6400,
1006,
286,
435,
2,
698,
286,
1048,
4629,
198,
286,
442,
2477,
11527,
198,
286,
1463,
15229,
5613,
286,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_init_with_file() {
let wallet_name = "test_init_with_file";
::utils::devsetup::tests::setup_ledger_env(wallet_name);
wallet::close_wallet().unwrap();
pool::close().unwrap();
let config_path = "/tmp/test_init.json";
let content = create_config_util... | rust_cleaned_test_functions.jsonl/19795 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 445
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6137,
6615,
2458,
368,
341,
286,
1077,
15085,
1269,
284,
330,
1944,
6137,
6615,
2458,
876,
286,
3504,
6031,
486,
3583,
15188,
486,
23841,
486,
15188,
38367,
1389,
15879,
95586,
1269,
317,
286,
150... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lint_redundant() {
let m = module(
r#"
def test(): # 1
foo
return # bad: 3
def test2(): # 4
return
foo
def test3(): # 7
if x:
return # bad: 9
else:
y + 1
def test4(): # 12
def test5():
for x in xs:
test
... | rust_cleaned_test_functions.jsonl/6153 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 456
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
907,
396,
1288,
1054,
303,
517,
368,
341,
286,
1077,
296,
284,
4688,
1006,
310,
435,
2,
698,
750,
1273,
4555,
671,
220,
16,
198,
262,
15229,
198,
262,
470,
671,
3873,
25,
220,
18,
198,
750,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_file_reader_rows_nonnullable_typed() {
type RowTyped = (
i64,
List<i32>,
List<List<i32>>,
HashMap<String, i32>,
List<HashMap<String, i32>>,
(
i32,
List<i32>,
(List<List<(i32, String)>>,),
HashMap<String, ((List<f64>,),)>,
),
);
let rows = test_file_rea... | rust_cleaned_test_functions.jsonl/92460 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 393
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
22306,
10949,
21637,
12902,
528,
32501,
368,
341,
197,
13158,
10801,
44466,
284,
2399,
298,
8230,
21,
19,
345,
298,
10675,
21897,
18,
17,
12520,
298,
10675,
15161,
21897,
18,
17,
61340,
298,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_df_compatible_type() {
let (_, mut ucmd) = at_and_ucmd!();
let result = ucmd.arg("-aT").run();
assert!(result.success);
} | rust_cleaned_test_functions.jsonl/3987 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 72
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10894,
2965,
37079,
1819,
368,
341,
262,
1077,
39464,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
1077,
1102,
284,
575,
8710,
21186,
13645,
64,
51,
1827,
6108,
543,
262,
2060,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_parse_attribute_refsig8() {
let buf = [0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x99, 0x99];
let unit = test_parse_attribute_unit_default();
let form = constants::DW_FORM_ref_sig8;
let value = AttributeValue::DebugTypesRef(DebugTypeSignature(0x0807_0605_040... | rust_cleaned_test_functions.jsonl/102041 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 188
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
16791,
7793,
21339,
23,
368,
341,
286,
1077,
6607,
284,
508,
15,
87,
15,
16,
11,
220,
15,
87,
15,
17,
11,
220,
15,
87,
15,
18,
11,
220,
15,
87,
15,
19,
11,
220,
15,
87,
15,
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_verify_signed_msg() {
// Public key
let secret_key =
hex::decode("2009da7287c158b126123c113d1c85241b6e3294dd75c643588630a8bc0f934c")
.unwrap();
let public_key = Bn256.derive_public_key(&secret_key).unwrap();
// Signature
let si... | rust_cleaned_test_functions.jsonl/65097 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 372
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35638,
55617,
6483,
368,
341,
286,
442,
3066,
1376,
198,
286,
1077,
6234,
3097,
4035,
310,
12371,
486,
18196,
445,
17,
15,
15,
24,
3235,
22,
17,
23,
22,
66,
16,
20,
23,
65,
16,
17,
21,
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_add_object() {
let root = json!({
"hello": "123",
"world": 123,
});
let value_to_add = json!("added");
let path = Path::new("/new");
let new = add(root, value_to_add, path).unwrap();
assert_eq!(new.get("new").unwrap(), &json... | rust_cleaned_test_functions.jsonl/83909 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 238
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
5314,
368,
341,
286,
1077,
3704,
284,
2951,
0,
2262,
310,
330,
14990,
788,
330,
16,
17,
18,
756,
310,
330,
14615,
788,
220,
16,
17,
18,
345,
286,
1625,
286,
1077,
897,
2346,
2891,
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_test_case_7() {
let key = Vec::from_hex("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").unwrap();
let data =
"Test Using Larger Than Block-Size Key and ... | rust_cleaned_test_functions.jsonl/17344 | {
"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,
4452,
19096,
62,
22,
368,
341,
286,
1077,
1376,
284,
11312,
486,
1499,
32655,
445,
69440,
69440,
69440,
69440,
69440,
69440,
69440,
69440,
69440,
69440,
69440,
69440,
69440,
69440,
69440,
69440,
69440... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_colinear_3() {
let mut builder = Path::builder();
// The path goes through many points along a line.
builder.begin(point(0.0, 1.0));
builder.line_to(point(0.0, 3.0));
builder.line_to(point(0.0, 5.0));
builder.line_to(point(0.0, 4.0));
builder.line_to(point(0.0, 2.0));... | rust_cleaned_test_functions.jsonl/102420 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 183
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10211,
88921,
62,
18,
368,
341,
262,
1077,
5206,
7363,
284,
7933,
486,
17850,
543,
262,
442,
576,
1815,
5780,
1526,
1657,
3501,
3156,
264,
1555,
624,
262,
7363,
6848,
20235,
7,
15,
13,
15,
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_request_with_an_apns_topic() {
let builder = PlainNotificationBuilder::new("test");
let payload = builder.build(
"a_test_id",
NotificationOptions {
apns_topic: Some("a_topic"),
..Default::default()
},
);... | rust_cleaned_test_functions.jsonl/109659 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 268
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7893,
6615,
12008,
21093,
4412,
31414,
368,
341,
286,
1077,
7363,
284,
43199,
11196,
3297,
486,
931,
445,
1944,
3071,
286,
1077,
7729,
284,
7363,
13239,
1006,
310,
330,
64,
4452,
842,
756,
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_gen_outputs_for_transfer_of_tokens() {
init!("true");
let payee_amount = 11;
let payee_address = r#"pay:null:payee_address"#.to_string();
let refund_address = r#"pay:null:refund_address"#;
let expected_output = format!(r#"[{{"amount":4,"recipient":"{}"}},... | rust_cleaned_test_functions.jsonl/10480 | {
"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,
16322,
35189,
5478,
35403,
3575,
28838,
368,
341,
286,
2930,
17223,
1866,
3071,
286,
1077,
2291,
2127,
13471,
284,
220,
16,
16,
280,
286,
1077,
2291,
2127,
6744,
284,
435,
55543,
13890,
53098,
25,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_partial_min() {
let range = LineRange::from(":50").expect("Shouldn't fail on test!");
assert_eq!(usize::min_value(), range.lower);
assert_eq!(50, range.upper);
} | rust_cleaned_test_functions.jsonl/35924 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 84
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
52068,
7260,
368,
341,
262,
1077,
2088,
284,
7083,
6046,
486,
1499,
18893,
20,
15,
1827,
17119,
445,
14996,
77,
944,
3690,
389,
1273,
11142,
262,
2060,
10714,
10297,
51878,
486,
1065,
3142,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_struct() {
let a: Arc<Array> = Arc::new(PrimitiveArray::from(Buffer::from(vec![1, 2, 3, 4, 5])));
let b: Arc<Array> = Arc::new(PrimitiveArray::from(Buffer::from(vec![
1.1, 2.2, 3.3, 4.4, 5.5,
])));
let s = StructArray::from(vec![a, b]);
assert... | rust_cleaned_test_functions.jsonl/32614 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 209
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15126,
368,
341,
286,
1077,
264,
25,
19689,
60190,
29,
284,
19689,
486,
931,
7,
33313,
1857,
486,
1499,
55574,
486,
1499,
25592,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
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_create_table_from_entity_table_ref() {
for builder in [DbBackend::MySql, DbBackend::Postgres, DbBackend::Sqlite] {
let schema = Schema::new(builder);
assert_eq!(
builder.build(&schema.create_table_from_entity(CakeFillingPrice)),
bui... | rust_cleaned_test_functions.jsonl/120023 | {
"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,
8657,
5237,
5673,
19169,
5237,
7793,
368,
341,
286,
369,
7363,
304,
508,
7994,
29699,
486,
5050,
8269,
11,
11988,
29699,
486,
4133,
17818,
11,
11988,
29699,
486,
8269,
632,
60,
341,
310,
1077,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_ips() -> Result<()> {
test_opt(
DhcpOption::DomainNameServer(vec![
"192.168.0.1".parse::<Ipv4Addr>().unwrap(),
"192.168.1.1".parse::<Ipv4Addr>().unwrap(),
]),
vec![6, 8, 192, 168, 0, 1, 192, 168, 1, 1],
)?;
... | rust_cleaned_test_functions.jsonl/41163 | {
"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,
71074,
368,
1464,
5714,
71698,
341,
286,
1273,
15032,
1006,
310,
43227,
4672,
5341,
486,
13636,
675,
5475,
25592,
90515,
394,
330,
16,
24,
17,
13,
16,
21,
23,
13,
15,
13,
16,
3263,
6400,
27638... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_concat_boolean_primitive_arrays() -> Result<()> {
let arr = concat(&[
&BooleanArray::from(vec![
Some(true),
Some(true),
Some(false),
None,
None,
Some(false),
]),
... | rust_cleaned_test_functions.jsonl/25090 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 477
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57478,
46642,
84087,
68983,
368,
1464,
5714,
71698,
341,
286,
1077,
2890,
284,
33720,
2099,
9640,
310,
609,
6890,
1857,
486,
1499,
25592,
90515,
394,
4329,
3715,
1326,
394,
4329,
3715,
1326,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_block_hash_contract() {
let (mut runner, mut source_account, _) = initialize_transfer();
let test_constructor = test_utils::solidity::ContractConstructor::compile_from_source(
["src", "tests", "res"].iter().collect::<PathBuf>(),
Path::new("target").join("solidity_build"),... | rust_cleaned_test_functions.jsonl/131051 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 348
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7113,
8950,
51499,
368,
341,
262,
1077,
320,
6984,
22259,
11,
5206,
2530,
13500,
11,
27439,
284,
9468,
35403,
543,
262,
1077,
1273,
66210,
284,
1273,
17309,
486,
31027,
487,
486,
14067,
13288,
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_weighted_choice_weight_overflows() {
let x = ::core::u32::MAX / 2; // x + x + 2 is the overflow
WeightedChoice::new(&mut [Weighted { weight: x, item: 0 },
Weighted { weight: 1, item: 1 },
Weighted { weight: x, it... | rust_cleaned_test_functions.jsonl/100785 | {
"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,
15876,
291,
31936,
15876,
15431,
38140,
368,
341,
286,
1077,
856,
284,
3504,
2153,
486,
84,
18,
17,
486,
10586,
608,
220,
17,
26,
442,
856,
488,
856,
488,
220,
17,
374,
279,
16484,
198,
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_zero_balance_proof_correctness() {
let source_keypair = ElGamalKeypair::new_rand();
let mut transcript_prover = Transcript::new(b"test");
let mut transcript_verifier = Transcript::new(b"test");
// general case: encryption of 0
let elgamal_ciphertext = so... | rust_cleaned_test_functions.jsonl/90010 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 552
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19359,
29396,
86757,
31550,
2090,
368,
341,
286,
1077,
2530,
3097,
12670,
284,
3984,
78884,
278,
6608,
1082,
1310,
486,
931,
33864,
1428,
286,
1077,
5206,
35715,
2540,
423,
284,
90303,
486,
931,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_timestamp_serialization() {
let time_stamp = Timestamp::new(PrimitiveDateTime::new(
time::date!(2020 - 1 - 01),
time::time!(12:34:54),
));
let json = json!({ "time stamp test": time_stamp });
assert_eq!(json!({"time stamp test":"2020-01-01... | rust_cleaned_test_functions.jsonl/47264 | {
"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,
23073,
25602,
2022,
368,
341,
286,
1077,
882,
52978,
284,
32758,
486,
931,
7,
33313,
7689,
486,
931,
1006,
310,
882,
486,
1028,
10297,
17,
15,
17,
15,
481,
220,
16,
481,
220,
15,
16,
1326,
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_return() {
let prog = r#"
fn greater_than_five(a: int) -> bool {
if a > 5 {
return true;
}
false
}
greater_than_five(6)
"#;
let ast = program(prog).unwrap();
let mut state = State::default();
SymbolDefineVisitor::visit(&ast, &mut state).unwrap();
Type... | rust_cleaned_test_functions.jsonl/53552 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 378
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12511,
368,
341,
262,
1077,
29271,
284,
435,
2,
698,
8822,
7046,
51613,
95258,
2877,
25,
526,
8,
1464,
1807,
341,
262,
421,
264,
861,
220,
20,
341,
286,
470,
830,
280,
262,
456,
262,
895,
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_flowcontrol_try_from_usize() {
for value in FlowControl::values() {
let converted = <FlowControl as TryFrom<usize>>::try_from(value as usize).unwrap();
assert_eq!(converted, value);
}
assert!(<FlowControl as TryFrom<usize>>::try_from(IcedConstants::FLOW_CONTROL_ENUM_COUNT).is_err());
ass... | rust_cleaned_test_functions.jsonl/5963 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 156
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27441,
2865,
53283,
5673,
11306,
551,
368,
341,
2023,
897,
304,
22452,
3273,
486,
3661,
368,
341,
197,
10217,
16099,
284,
366,
18878,
3273,
438,
9735,
3830,
90244,
77595,
1539,
5673,
3679,
438,
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_optflag() {
let long_args = vec!["--test".to_string()];
let mut opts = Options::new();
opts.optflag("t", "test", "testing");
match opts.parse(&long_args) {
Ok(ref m) => {
assert!(m.opt_present("test"));
assert!(m.opt_present("t"));
}
... | rust_cleaned_test_functions.jsonl/52362 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 301
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15032,
9903,
368,
341,
262,
1077,
1293,
8384,
284,
7486,
0,
1183,
313,
1944,
3263,
983,
3904,
33800,
262,
1077,
5206,
12185,
284,
14566,
486,
931,
543,
262,
12185,
28102,
9903,
445,
83,
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... | 3 |
#[test]
fn test_calculate_weight_skips_root() {
let mut locktower = Locktower::new(EpochStakes::new_for_tests(2), 0, 0.67);
locktower.lockouts.root_slot = Some(1);
let stakes = vec![
(
0,
StakeLockout {
stake: 1,
... | rust_cleaned_test_functions.jsonl/25557 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 425
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24005,
11207,
15876,
33811,
3077,
12993,
368,
341,
286,
1077,
5206,
5296,
77578,
284,
15701,
77578,
486,
931,
10722,
79,
4953,
623,
2050,
486,
931,
5478,
32509,
7,
17,
701,
220,
15,
11,
220,
15,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cubic_duplicated_intersections() {
use std::panic;
let result = panic::catch_unwind(|| {
// the two to be the same if both difference values are < 1e-3.
do_test(
&CubicBezierSegment {
from: point(-33307.36f32, -1804.0625),
... | rust_cleaned_test_functions.jsonl/14576 | {
"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,
666,
41181,
814,
98984,
15318,
24661,
368,
341,
262,
990,
1460,
486,
19079,
280,
262,
1077,
1102,
284,
21975,
486,
7173,
4907,
19154,
79453,
341,
1789,
2290,
442,
279,
1378,
311,
387,
279,
1852,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_read() {
let mut data = &base64::decode("IL1ciMu7b3ZOP5Q1cBA7isI=").unwrap()[..];
let payload = PHYPayload::read(Direction::Uplink, &mut data).unwrap();
eprintln!("PAYLOAD {:?}", payload);
} | rust_cleaned_test_functions.jsonl/133319 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 119
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
368,
341,
286,
1077,
5206,
821,
284,
609,
3152,
21,
19,
486,
18196,
445,
1715,
16,
5855,
39120,
22,
65,
18,
57,
3067,
20,
48,
16,
66,
7064,
22,
285,
40,
75244,
15454,
10116,
496,
935,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_payload_recover_deserialize() {
let payload_script = Script::from_hex(
"6a4c5045584f4e554d0101d204000000000000e3b0c44298fc1c\
149afbf4c8996fb92427ae41e4649b934ca495991b7852b855e3\
b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca49599\
1b7... | rust_cleaned_test_functions.jsonl/119538 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 361
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32813,
1288,
3688,
15768,
9050,
368,
341,
286,
1077,
7729,
14660,
284,
13710,
486,
1499,
32655,
1006,
310,
330,
21,
64,
19,
66,
20,
15,
19,
20,
20,
23,
19,
69,
19,
68,
20,
20,
19,
67,
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_undefined_opt_present() {
let mut opts = Options::new();
opts.optflag("h", "help", "Description");
let args = vec!["-h"];
match opts.parse(args) {
Ok(matches) => assert!(!matches.opt_present("undefined")),
Err(e) => panic!("{}", e),
}
} | rust_cleaned_test_functions.jsonl/52405 | {
"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,
62,
9614,
15032,
36976,
368,
341,
262,
1077,
5206,
12185,
284,
14566,
486,
931,
543,
262,
12185,
28102,
9903,
445,
71,
497,
330,
8653,
497,
330,
5009,
797,
262,
1077,
2827,
284,
7486,
0,
1183,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_env_windows() {
let mut perms = Permissions::allow_all();
perms.env = UnaryPermission {
global_state: PermissionState::Prompt,
..Permissions::new_env(&Some(svec!["HOME"]), false)
};
set_prompt_result(true);
assert!(perms.env.check("HOME").is_ok());
set_prompt... | rust_cleaned_test_functions.jsonl/24819 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 239
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15879,
58220,
368,
341,
262,
1077,
5206,
82282,
284,
53357,
486,
7183,
5705,
543,
262,
82282,
9265,
284,
86951,
14966,
341,
414,
3644,
4387,
25,
18135,
1397,
486,
54615,
345,
414,
5241,
23851,
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_red_setter_oob_panic() {
let mut c1 = Rgi::new(0.2, 0.3, 0.8);
c1.set_red(1.2);
} | rust_cleaned_test_functions.jsonl/86784 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 79
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26058,
2602,
465,
14179,
674,
620,
31270,
368,
341,
286,
1077,
5206,
272,
16,
284,
431,
8212,
486,
931,
7,
15,
13,
17,
11,
220,
15,
13,
18,
11,
220,
15,
13,
23,
317,
286,
272,
16,
980,
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 |
#[test]
fn test_uint8_to_constraint_field() -> Result<(), SynthesisError> {
let mut rng = XorShiftRng::seed_from_u64(1231275789u64);
let max_size = (<Fr as PrimeField>::Params::CAPACITY / 8) as usize;
let modes = [Input, Witness, Constant];
for mode in &modes {
for _... | rust_cleaned_test_functions.jsonl/55611 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 627
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15807,
23,
2346,
46973,
5013,
368,
1464,
5714,
68843,
23153,
13189,
1454,
29,
341,
286,
1077,
5206,
28422,
284,
1599,
269,
24841,
49,
968,
486,
22602,
5673,
7300,
21,
19,
7,
16,
17,
18,
16,
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... | 7 |
#[test]
fn test_total_ord_u8() {
let c = &[1u8, 2, 3];
assert_order!(Greater, &[1u8, 2, 3, 4][..], &c[..]);
let c = &[1u8, 2, 3, 4];
assert_order!(Less, &[1u8, 2, 3][..], &c[..]);
let c = &[1u8, 2, 3, 6];
assert_order!(Equal, &[1u8, 2, 3, 6][..], &c[..]);
let c = &[1u8, 2, 3, 4, 5, 6... | rust_cleaned_test_functions.jsonl/12881 | {
"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,
10784,
67324,
7300,
23,
368,
341,
262,
1077,
272,
284,
44590,
16,
84,
23,
11,
220,
17,
11,
220,
18,
935,
262,
2060,
7869,
10297,
41366,
11,
44590,
16,
84,
23,
11,
220,
17,
11,
220,
18,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_set_raw_policy() {
let name = "sgx_policy_test.rego";
// Right case
let policy = r#"
package policy
# By default, deny requests.
default allow = false
allow {
mrEnclave_is_grant
mrSigner_is_grant
input.productId >= data.productId
input.svn >= data.svn
}... | rust_cleaned_test_functions.jsonl/84003 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 506
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
16067,
22773,
368,
341,
286,
1077,
829,
284,
330,
1991,
87,
22773,
4452,
1327,
3346,
3302,
286,
442,
10083,
1142,
198,
286,
1077,
4842,
284,
435,
2,
698,
1722,
4842,
271,
2,
3216,
1638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.