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_mul() {
assert_eq!(Vec3::new(1.0, 0.0, -1.0) * Vec3::ones(), 0.0);
} | rust_cleaned_test_functions.jsonl/35224 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 65
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24944,
368,
341,
286,
2060,
10714,
10297,
10050,
18,
486,
931,
7,
16,
13,
15,
11,
220,
15,
13,
15,
11,
481,
16,
13,
15,
8,
353,
11312,
18,
486,
3154,
1507,
220,
15,
13,
15,
317,
262,
335... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_hidden_field() {
use serde::Serialize;
#[derive(OnlineConfig, Default, Serialize)]
#[serde(default)]
#[serde(rename_all = "kebab-case")]
pub struct TestConfig {
#[online_config(skip)]
skip_field: String,
#[online_config... | rust_cleaned_test_functions.jsonl/67350 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 784
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26739,
5013,
368,
341,
286,
990,
61570,
486,
15680,
401,
286,
11506,
27098,
7,
19598,
2648,
11,
7899,
11,
39900,
5563,
286,
11506,
47024,
18978,
5563,
286,
11506,
47024,
51787,
5705,
284,
330,
440... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_alignment_Fx() {
let input: [u8; 8] = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0]; // 0xc000000000000000 -2
let expected_output = unindent(
"
0000000 -2.0000000000000000
0000 0000 0000 c000
0000010
",
);
new_uc... | rust_cleaned_test_functions.jsonl/48815 | {
"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,
51006,
1400,
87,
368,
341,
262,
1077,
1946,
25,
508,
84,
23,
26,
220,
23,
60,
284,
508,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
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_tw_session_parse() {
let mut buf = BytesMut::from(REQUEST_TW_SESSION1);
let expected = get_request_tw_session();
let res = RequestTwSession::parse(&mut buf);
assert_eq!(buf.remaining(), 0);
assert!(res.is_ok());
assert_eq!(res.unwrap(), exp... | rust_cleaned_test_functions.jsonl/63830 | {
"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,
7893,
54178,
12316,
21039,
368,
341,
286,
1077,
5206,
6607,
284,
30024,
51440,
486,
1499,
7,
10794,
95747,
34361,
16,
317,
286,
1077,
3601,
284,
633,
7893,
54178,
12316,
543,
286,
1077,
592,
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_issue_82291() {
use std::cell::Cell;
let mut v1 = [()];
let v2 = [()];
let called = Cell::new(0);
let mut zip = v1
.iter_mut()
.map(|r| {
called.set(called.get() + 1);
r
})
.zip(&v2);
zip.next_back();
assert_... | rust_cleaned_test_functions.jsonl/8971 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 215
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53340,
62,
23,
17,
17,
24,
16,
368,
341,
262,
990,
1460,
486,
5873,
486,
3599,
401,
262,
1077,
5206,
348,
16,
284,
508,
33800,
262,
1077,
348,
17,
284,
508,
368,
4821,
262,
1077,
2598,
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_node_named_child_with_aliases_and_extras() {
let (parser_name, parser_code) =
generate_parser_for_grammar(GRAMMAR_WITH_ALIASES_AND_EXTRAS).unwrap();
let mut parser = Parser::new();
parser
.set_language(get_test_language(&parser_name, &parser_code, None))
.unw... | rust_cleaned_test_functions.jsonl/99267 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 358
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5084,
71834,
17268,
6615,
90233,
8378,
2702,
13503,
368,
341,
262,
1077,
320,
9657,
1269,
11,
6729,
4136,
8,
4035,
286,
6923,
18517,
5478,
62,
41094,
6699,
33905,
60661,
23929,
8912,
40,
4066,
50,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_traverse_empty_state() {
let tmpdir = tempfile::Builder::new().prefix("test").tempdir().unwrap();
let state = ReplicatedState::new_rooted_at(
subnet_test_id(1),
SubnetType::Application,
tmpdir.path().into(),
);
let visitor = Tra... | rust_cleaned_test_functions.jsonl/98351 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 721
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3547,
22439,
15124,
4387,
368,
341,
286,
1077,
4174,
3741,
284,
54819,
486,
3297,
486,
931,
1005,
11849,
445,
1944,
1827,
3888,
3741,
1005,
15454,
543,
286,
1077,
1584,
284,
3321,
13724,
1397,
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_extension_successful_with_complete_json_response() {
use self::colorful_extension::*;
let client = ColorfulClient::new(
ClientId::new("aaa".to_string()),
Some(ClientSecret::new("bbb".to_string())),
AuthUrl::new("https://example.com/auth".to_string()).unwrap(),
... | rust_cleaned_test_functions.jsonl/18610 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1360
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31035,
92951,
6615,
27675,
9455,
9655,
368,
341,
262,
990,
656,
486,
3423,
1262,
31035,
56162,
262,
1077,
2943,
284,
3478,
1262,
2959,
486,
931,
1006,
286,
8423,
764,
486,
931,
445,
32646,
3263,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_raster_size() {
let dataset = Dataset::open(fixture!("tinymarble.png")).unwrap();
let (size_x, size_y) = dataset.size();
assert_eq!(size_x, 100);
assert_eq!(size_y, 50);
} | rust_cleaned_test_functions.jsonl/83427 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 100
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
1710,
2300,
2368,
368,
341,
262,
1077,
10337,
284,
39183,
486,
2508,
94886,
17223,
55971,
1600,
277,
891,
3508,
15197,
15454,
543,
262,
1077,
320,
2141,
3212,
11,
1379,
4178,
8,
284,
10337,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_thread_list_from_parent() {
let num_of_threads = 5;
let mut child = start_child_and_wait_for_threads(num_of_threads);
let pid = child.id() as i32;
let mut dumper =
linux_ptrace_dumper::LinuxPtraceDumper::new(pid).expect("Couldn't init dumper");
assert_eq!(dumper.threa... | rust_cleaned_test_functions.jsonl/126012 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 579
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10814,
2019,
5673,
15960,
368,
341,
262,
1077,
1629,
3575,
29725,
284,
220,
20,
280,
262,
1077,
5206,
1682,
284,
1191,
17268,
8378,
18760,
5478,
29725,
8068,
3575,
29725,
317,
262,
1077,
14814,
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... | 2 |
#[test]
fn test_meta_item_list_name_value() {
run_test(
"#[foo(bar = 5)]",
MetaList {
ident: ident("foo").into(),
paren_token: Default::default(),
nested: punctuated![NestedMeta::Meta(
MetaNameValue {
ident: ident("bar")... | rust_cleaned_test_functions.jsonl/63944 | {
"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,
13381,
5634,
2019,
1269,
3142,
368,
341,
262,
1598,
4452,
1006,
286,
5869,
58,
7975,
54630,
284,
220,
20,
7252,
756,
286,
15819,
852,
341,
310,
3524,
25,
3524,
445,
7975,
1827,
18122,
3148,
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_simple() {
let mut m = Sha1::new();
let tests = [
("The quick brown fox jumps over the lazy dog",
"2fd4e1c67a2d28fced849ee1bb76e7391b93eb12"),
("The quick brown fox jumps over the lazy cog",
"de9f2c7fd25e1b3afad3e85a0bd17d9b100db... | rust_cleaned_test_functions.jsonl/74477 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 626
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
368,
341,
286,
1077,
5206,
296,
284,
27970,
16,
486,
931,
1428,
286,
1077,
7032,
284,
2278,
310,
3489,
785,
3974,
13876,
38835,
34208,
916,
279,
15678,
5562,
756,
1797,
330,
17,
6902,
19,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_buffer_get_allocated() {
let mut ring = RingBuffer::new(vec![b'.'; 12]);
assert_eq!(ring.get_allocated(16, 4), b"");
assert_eq!(ring.get_allocated(0, 4), b"");
ring.enqueue_slice(b"abcd");
assert_eq!(ring.get_allocated(0, 8), b"abcd");
ring.enqu... | rust_cleaned_test_functions.jsonl/37271 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 283
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7776,
3062,
82342,
368,
341,
286,
1077,
5206,
10058,
284,
21525,
4095,
486,
931,
25592,
20703,
65,
6,
3159,
26,
220,
16,
17,
10149,
286,
2060,
10714,
10297,
12640,
670,
82342,
7,
16,
21,
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... | 1 |
#[test]
fn test_213() {
assert_eq!(Solution::rob(vec![2, 3, 2]), 3);
assert_eq!(Solution::rob(vec![0]), 0);
assert_eq!(Solution::rob(vec![1, 2, 3, 1]), 4);
} | rust_cleaned_test_functions.jsonl/54519 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
17,
16,
18,
368,
341,
286,
2060,
10714,
10297,
36842,
486,
22740,
25592,
20703,
17,
11,
220,
18,
11,
220,
17,
9719,
220,
18,
317,
286,
2060,
10714,
10297,
36842,
486,
22740,
25592,
20703,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_string_builder() {
let mut builder = LargeStringBuilder::with_capacity(3, 3);
builder.append_value("foo");
builder.append_null();
builder.append_value("bar");
let out = builder.finish();
let vals = out.iter().collect::<Vec<_>>();
assert_eq!... | rust_cleaned_test_functions.jsonl/48487 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 177
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3904,
28532,
368,
341,
286,
1077,
5206,
7363,
284,
20286,
69412,
486,
4197,
35603,
7,
18,
11,
220,
18,
317,
286,
7363,
2057,
3142,
445,
7975,
797,
286,
7363,
2057,
15162,
543,
286,
7363,
2057,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_push_update() {
let mut crds = Crds::default();
let mut push = CrdsGossipPush::default();
let mut ci = ContactInfo::new_localhost(&Pubkey::new_rand(), 0);
ci.wallclock = 0;
let value_old = CrdsValue::ContactInfo(ci.clone());
// push a new ... | rust_cleaned_test_functions.jsonl/87050 | {
"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,
11305,
14218,
8882,
368,
341,
286,
1077,
5206,
1560,
5356,
284,
4553,
5356,
486,
2258,
543,
286,
1077,
5206,
4484,
284,
4553,
5356,
38,
41473,
16644,
486,
2258,
543,
286,
1077,
5206,
11825,
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_is_ascii_lowercase() {
assert_all!(is_ascii_lowercase,
"abcdefghijklmnopqrstuvwxyz",
);
assert_none!(is_ascii_lowercase,
"ABCDEFGHIJKLMNOQPRSTUVWXYZ",
"0123456789",
"!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
" \t\n\x0... | rust_cleaned_test_functions.jsonl/35076 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 408
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
50238,
93129,
368,
341,
286,
2060,
5705,
10297,
285,
50238,
93129,
345,
310,
330,
67512,
756,
286,
1439,
286,
2060,
31488,
10297,
285,
50238,
93129,
345,
310,
330,
71286,
70518,
8996,
48,
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_empty_line() {
let err = Model::train("data/empty_line.ffm").unwrap_err();
assert_eq!(err.to_string(), "FFM error (line: 2): expected line to start with int".to_string());
} | rust_cleaned_test_functions.jsonl/25226 | {
"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,
15124,
6528,
368,
341,
286,
1077,
1848,
284,
4903,
486,
10397,
445,
691,
14,
3194,
6528,
83885,
76,
1827,
15454,
9266,
543,
286,
2060,
10714,
10297,
615,
2389,
3904,
1507,
330,
1748,
44,
1465,
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 |
#[test]
fn test_fork_merge_false() {
let mut ds = DataStack::new();
let cs = TestConstraintSystem::<Bn256>::new();
let value = Scalar::new_constant_usize(42, zinc_types::ScalarType::Field);
ds.set(4, Cell::Value(value))
.expect(zinc_const::panic::TEST_DATA_VALID);
ds.fork();
as... | rust_cleaned_test_functions.jsonl/106058 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 469
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
669,
20888,
36015,
368,
341,
262,
1077,
5206,
11472,
284,
2885,
4336,
486,
931,
543,
262,
1077,
10532,
284,
3393,
17890,
2320,
27638,
33,
77,
17,
20,
21,
6831,
931,
543,
262,
1077,
897,
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_hover_infer_associated_method_exact() {
check(
r#"
mod wrapper {
pub struct Thing { x: u32 }
impl Thing {
pub fn new() -> Thing { Thing { x: 0 } }
}
}
fn main() { let foo_test = wrapper::Thing::new$0(); }
"#,
expect![[r#"
*new*
... | rust_cleaned_test_functions.jsonl/117607 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 291
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53445,
1243,
802,
58665,
657,
9032,
71084,
368,
341,
262,
1779,
1006,
286,
435,
2,
698,
2593,
13261,
341,
262,
6675,
2036,
37200,
314,
856,
25,
575,
18,
17,
555,
262,
11605,
37200,
341,
286,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_timestamp_other() {
assert_de_tokens_error::<UnixTimestamp>(
&[Token::Bool(true)],
"invalid type: boolean `true`, expected a non-negative timestamp or datetime string",
);
} | rust_cleaned_test_functions.jsonl/13695 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 113
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
23073,
30456,
368,
341,
286,
2060,
2259,
28838,
4096,
27638,
55832,
20812,
17055,
310,
44590,
3323,
486,
11233,
3715,
30749,
310,
330,
11808,
943,
25,
2710,
1565,
1866,
7808,
3601,
264,
2477,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_serialize_ilint() {
let mut writer = VecWriter::new();
match writer.serialize_ilint(ILINT_SAMPLE) {
Ok(()) => (),
_ => panic!(),
}
assert_eq!(writer.as_slice(), &ILINT_SAMPLE_BIN);
writer.set_read_only(true);
match writer.serialize_ilint(ILINT_SAMPLE) {
... | rust_cleaned_test_functions.jsonl/25681 | {
"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,
88686,
26743,
396,
368,
341,
262,
1077,
5206,
6916,
284,
11312,
6492,
486,
931,
1428,
262,
2432,
6916,
33969,
26743,
396,
94448,
3221,
41439,
8,
341,
286,
7622,
7,
2140,
589,
84201,
286,
716,
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... | 3 |
#[test]
fn test_retention_policy_invalid() {
let actual = RetentionPolicy::from_str("y1d88a1b2c3m5").unwrap();
let expected = RetentionPolicy {
yearly: Some(1),
monthly: Some(5),
weekly: None,
daily: Some(88),
hourly: None,
};
... | rust_cleaned_test_functions.jsonl/48502 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 190
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21695,
2939,
22773,
31433,
368,
341,
286,
1077,
5042,
284,
10392,
78165,
486,
1499,
2895,
445,
88,
16,
67,
23,
23,
64,
16,
65,
17,
66,
18,
76,
20,
1827,
15454,
543,
286,
1077,
3601,
284,
103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_edge_pixels() {
#[rustfmt::skip]
let im = vec![5, 6, 7, 8, 9,
4, 0, 0, 0, 0,
3, 0, 0, 0, 0,
2, 0, 0, 0, 0,
1, 0, 0, 0, 0];
let (e0, e1, e2, e3, e4, e5, e6, e7, e8) = edge_pixels(&im, 1... | rust_cleaned_test_functions.jsonl/44866 | {
"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,
17932,
49745,
368,
341,
286,
11506,
35788,
12501,
486,
20599,
921,
286,
1077,
732,
284,
7486,
20703,
20,
11,
220,
21,
11,
220,
22,
11,
220,
23,
11,
220,
24,
345,
2549,
220,
19,
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_row_as_slice_complex() {
let table = Table::find_first(TABLE_COMPLEX).unwrap();
let mut iter = table.iter();
let empty: [&str; 0] = [];
assert_eq!(&["John", "20"], iter.next().unwrap().as_slice());
assert_eq!(&["May", "30", "foo"], iter.next().unwrap().as... | rust_cleaned_test_functions.jsonl/47597 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 231
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8530,
11898,
26488,
41522,
368,
341,
286,
1077,
1965,
284,
6633,
486,
3903,
12978,
83006,
97820,
568,
15454,
543,
286,
1077,
5206,
5367,
284,
1965,
19471,
543,
286,
1077,
4287,
25,
34336,
495,
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_rwlock_downgrade() {
let x = Arc::new(RwLock::new(0));
let mut handles = Vec::new();
for _ in 0..8 {
let x = x.clone();
handles.push(thread::spawn(move || {
for _ in 0..100 {
let mut writer = x.write();
... | rust_cleaned_test_functions.jsonl/15760 | {
"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,
98850,
13998,
6937,
368,
341,
286,
1077,
856,
284,
19689,
486,
931,
2785,
86,
11989,
486,
931,
7,
15,
1106,
286,
1077,
5206,
13469,
284,
11312,
486,
931,
543,
286,
369,
716,
304,
220,
15,
496,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_groth16_bench() {
let n_average = 3; // number of times we do the benchmarking to average out results
let nb_proofs = vec![8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192];
let max = *nb_proofs.last().unwrap();
let public_inputs = 350; // roughly what a prove commit needs
... | rust_cleaned_test_functions.jsonl/2136 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2517
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
299,
339,
16,
21,
880,
19762,
368,
341,
262,
1077,
308,
38594,
284,
220,
18,
26,
442,
1372,
315,
3039,
582,
653,
279,
28431,
287,
311,
5461,
700,
3059,
198,
262,
1077,
16649,
2540,
36081... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_mac_bytes_conversion() {
let mac = 0x1234567890AB;
let serialized = bytes_of_mac(mac);
let deserialized = mac_of_bytes(serialized);
assert_eq!(mac, deserialized);
} | rust_cleaned_test_functions.jsonl/78225 | {
"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,
22802,
12524,
64132,
368,
341,
286,
1077,
8978,
284,
220,
15,
87,
16,
17,
18,
19,
20,
21,
22,
23,
24,
15,
1867,
401,
286,
1077,
32916,
284,
5820,
3575,
22802,
73611,
317,
286,
1077,
939,
675... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_secret_timeout() {
// Simple test of payment secret storage time outs
let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
let nodes = create_network(2, &node_cfgs, &node_chanmg... | rust_cleaned_test_functions.jsonl/16954 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1190
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21962,
20537,
368,
341,
197,
322,
8993,
1273,
315,
8160,
6234,
5819,
882,
22806,
198,
10217,
26023,
1645,
18343,
82,
284,
1855,
45552,
1645,
18343,
82,
7,
17,
317,
10217,
2436,
18343,
82,
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... | 4 |
#[test]
fn test_array_literal() {
fold("(![])", "false");
fold("(![1])", "false");
fold("(![a])", "false");
fold_same("foo(), false;");
} | rust_cleaned_test_functions.jsonl/122223 | {
"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,
3858,
34100,
368,
341,
262,
11555,
445,
3471,
1294,
11583,
330,
3849,
797,
262,
11555,
445,
3471,
58,
16,
2467,
497,
330,
3849,
797,
262,
11555,
445,
3471,
58,
64,
2467,
497,
330,
3849,
797,
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 |
#[test]
fn test_lazy_ternary_and_predicates() {
let df = get_df();
// really need to check the root column
let ldf = df
.clone()
.lazy()
.with_column(lit(3).alias("foo"))
.filter(col("foo").is_not_null());
let _new = ldf.collect().unwrap();
let ldf = df
... | rust_cleaned_test_functions.jsonl/114 | {
"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,
49646,
62,
4160,
658,
8378,
12830,
24821,
368,
341,
262,
1077,
6764,
284,
633,
10894,
543,
1066,
262,
442,
2167,
1184,
311,
1779,
279,
3704,
3250,
198,
262,
1077,
326,
2940,
284,
6764,
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_g1_addition_correctness() {
let mut p = G1Projective::new(
Fq::from_repr(BigInteger768([
0xdfc2b7cbc7c68dd3,
0xda35f108daf8530a,
0xed1046ac66215fc2,
0x456d3bec410beaa6,
0x83c63b83fe368eb7,
0x7f3cf1cdbb8d1853,
... | rust_cleaned_test_functions.jsonl/52500 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2863
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
16,
2891,
680,
31550,
2090,
368,
341,
262,
1077,
5206,
281,
284,
479,
16,
7849,
533,
486,
931,
1006,
286,
434,
80,
486,
1499,
68535,
91756,
22,
21,
23,
8956,
310,
220,
15,
53833,
66,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_helper_unquote() -> Result<(), Box<dyn Error>> {
assert_renders![
(r##"{{ unquote "''" }}"##, r##""##),
(r##"{{ unquote "'f'" }}"##, r##"f"##),
(r##"{{ unquote "foo" }}"##, r##"foo"##),
(r##"{{ unquote "'foo'" }}"##, r##"foo"##),
... | rust_cleaned_test_functions.jsonl/35005 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 290
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10418,
4907,
2949,
368,
1464,
5714,
68843,
8261,
92846,
4600,
2452,
341,
286,
2060,
1288,
303,
388,
90515,
310,
320,
81,
565,
1,
2979,
650,
2949,
330,
4605,
1,
14483,
565,
11,
435,
565,
3014,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_sysvar_invalid_id_with_feature() {
let mut transaction_context = TransactionContext::new(Vec::new(), 1);
let invoke_context = InvokeContext::new_mock(&mut transaction_context, &[]);
// Attempt to create system account in account already owned by another program
... | rust_cleaned_test_functions.jsonl/106195 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 473
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
20344,
947,
31433,
842,
6615,
17069,
368,
341,
286,
1077,
5206,
7745,
8467,
284,
17869,
1972,
486,
931,
49923,
486,
931,
1507,
220,
16,
317,
286,
1077,
19873,
8467,
284,
39667,
1972,
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_merge_nulls_constant() {
#[rpn_fn]
fn foo(v: &Real) -> Result<Option<Real>> {
Ok(Some(*v * 2.5))
}
let exp = RpnExpressionBuilder::new_for_test()
.push_constant_for_test(ScalarValue::Real(Real::new(10.0).ok()))
.push_fn... | rust_cleaned_test_functions.jsonl/92678 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 448
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
15162,
82,
34967,
368,
341,
394,
11506,
81,
19958,
15246,
921,
286,
5168,
15229,
3747,
25,
609,
12768,
8,
1464,
5714,
94150,
64829,
2452,
341,
310,
7622,
65405,
4071,
85,
353,
220,
17,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_schema_id_parts_for_id_as_unqualified() {
let (did, _, _) = _schema_id_unqualified().parts().unwrap();
assert_eq!(_did(), did);
} | rust_cleaned_test_functions.jsonl/130824 | {
"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,
25371,
842,
33217,
5478,
842,
11898,
4907,
36335,
368,
341,
310,
1077,
320,
22920,
11,
8358,
27439,
284,
716,
17349,
842,
4907,
36335,
1005,
18252,
1005,
15454,
543,
310,
2060,
10714,
0,
2490,
229... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_vec3_align() {
use std::mem;
if cfg!(any(feature = "packed-vec3", feature = "scalar-math")) {
assert_eq!(12, mem::size_of::<Vec3>());
assert_eq!(4, mem::align_of::<Vec3>());
assert_eq!(12, mem::size_of::<Vec3Mask>());
assert_eq!(4, mem::align_of::<Vec3Mask... | rust_cleaned_test_functions.jsonl/84426 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 292
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
18,
37015,
368,
341,
262,
990,
1460,
486,
10536,
280,
262,
421,
13286,
10297,
3767,
27062,
284,
330,
50321,
12,
4083,
18,
497,
4565,
284,
330,
35342,
1448,
587,
2761,
341,
286,
2060,
1071... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_u64_into_boolean_vec_le() {
let mut cs = TestConstraintSystem::<Scalar>::new();
let bits = u64_into_boolean_vec_le(&mut cs, Some(17234652694787248421)).unwrap();
assert!(cs.is_satisfied());
assert_eq!(bits.len(), 64);
assert_eq!(bits[63 - 0].get_value(... | rust_cleaned_test_functions.jsonl/13770 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 389
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7300,
21,
19,
45514,
46642,
13251,
11751,
368,
341,
286,
1077,
5206,
10532,
284,
3393,
17890,
2320,
27638,
20639,
6831,
931,
1428,
286,
1077,
9472,
284,
575,
21,
19,
45514,
46642,
13251,
11751,
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_summary() {
let client = MockClient::default();
let mut cfg = Config::default();
cfg.receiver_address = "127.0.0.1:12345".to_owned();
cfg.report_receiver_interval = ReadableDuration::millis(REPORT_INTERVAL_MS);
let (rh, crh, tf) = RecorderBuilder::default()
.enable(... | rust_cleaned_test_functions.jsonl/80908 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1735
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27251,
368,
341,
262,
1077,
2943,
284,
14563,
2959,
486,
2258,
1428,
262,
1077,
5206,
13286,
284,
5532,
486,
2258,
543,
262,
13286,
80618,
6744,
284,
330,
16,
17,
22,
13,
15,
13,
15,
13,
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... | 4 |
#[test]
fn test_oob_callx_high() {
let prog = &mut [
0xb7, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, // r0 = 0
0x67, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
0x47, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
0x8D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // callx r0
... | rust_cleaned_test_functions.jsonl/15545 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 312
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14179,
674,
13429,
87,
22680,
368,
341,
262,
1077,
29271,
284,
609,
6984,
2278,
286,
220,
15,
7929,
22,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
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 |
#[test]
fn test_construct_mappings() {
let mappings = make_mappings(graph_factory());
let mappings = mappings.borrow();
assert_eq!(mappings.len(), 4);
assert!(mappings.get_namespace("xsd").is_some());
assert!(mappings.get_namespace("rdf").is_some());
assert!(mappings.get_namespace("rdf... | rust_cleaned_test_functions.jsonl/63200 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 162
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64803,
84153,
368,
341,
262,
1077,
44817,
284,
1281,
84153,
24312,
24269,
1423,
262,
1077,
44817,
284,
44817,
83640,
1428,
262,
2060,
10714,
10297,
76,
23036,
19406,
1507,
220,
19,
626,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rev_iter() {
let m = generate_test();
for (i, elt) in m.iter().rev().enumerate() {
assert_eq!((6 - i) as int, *elt);
}
let mut n = DList::new();
assert_eq!(n.iter().rev().next(), None);
n.push_front(4);
let mut it = n.iter().rev... | rust_cleaned_test_functions.jsonl/56735 | {
"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,
38082,
11723,
368,
341,
286,
1077,
296,
284,
6923,
4452,
543,
286,
369,
320,
72,
11,
54139,
8,
304,
296,
19471,
1005,
7282,
1005,
76569,
368,
341,
310,
2060,
10714,
0,
1188,
21,
481,
600,
8,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_interp_col() {
use super::{NONE, NONE5};
use approx::assert_abs_diff_eq;
use nalgebra::dvector;
let dfrom = Domain::new(0, 2, NONE5);
let dto = Domain::new(0, 10, NONE);
let min = dvector![0.0, 5.0, 10.0];
let m = lin_interp_mat_col(&dfrom, &dto, 1, min);
as... | rust_cleaned_test_functions.jsonl/82195 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 303
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68711,
10211,
368,
341,
262,
990,
2256,
22964,
45425,
11,
42869,
20,
2440,
262,
990,
9848,
486,
2207,
31170,
15850,
10714,
280,
262,
990,
84533,
26083,
486,
67,
3215,
401,
262,
1077,
294,
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_validate_max_gas_price_above_bounds() {
let vm_validator = TestValidator::new();
let address = account_config::aptos_root_address();
let transaction = transaction_test_helpers::get_test_signed_transaction(
address,
1,
&vm_genesis::GENESIS_KEYPAIR.0,
v... | rust_cleaned_test_functions.jsonl/35405 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 324
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
6345,
82116,
9040,
77315,
36878,
368,
341,
262,
1077,
10995,
64959,
284,
3393,
14256,
486,
931,
1428,
262,
1077,
2621,
284,
2692,
5332,
486,
2689,
436,
12993,
6744,
543,
262,
1077,
7745,
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_empty_primitive() {
let array = new_empty_array(&DataType::Int32);
let a = array.as_any().downcast_ref::<Int32Array>().unwrap();
assert_eq!(a.len(), 0);
let expected: &[i32] = &[];
assert_eq!(a.values(), expected);
} | rust_cleaned_test_functions.jsonl/7985 | {
"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,
15124,
84087,
368,
341,
286,
1077,
1334,
284,
501,
15124,
3858,
2099,
22653,
486,
1072,
18,
17,
317,
286,
1077,
264,
284,
1334,
5357,
37248,
1005,
2923,
3829,
7793,
27638,
1072,
18,
17,
1857,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_select_transactions_per_cost() {
solana_logger::setup();
let GenesisConfigInfo { genesis_config, .. } = create_genesis_config(10);
let bank = Arc::new(Bank::new_for_tests(&genesis_config));
let cost_model = Arc::new(RwLock::new(CostModel::default()));
let... | rust_cleaned_test_functions.jsonl/116533 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 873
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13051,
68182,
5678,
15890,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
40788,
2648,
1731,
314,
59366,
5332,
11,
5241,
335,
284,
1855,
16322,
13774,
5332,
7,
16,
15,
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,
1... | 1 |
#[test]
fn test_serde() {
let s = SmolStr::new("Hello, World");
let s = serde_json::to_string(&s).unwrap();
assert_eq!(s, "\"Hello, World\"");
let s: SmolStr = serde_json::from_str(&s).unwrap();
assert_eq!(s, "Hello, World");
} | rust_cleaned_test_functions.jsonl/106849 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 140
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75861,
450,
368,
341,
286,
1077,
274,
284,
4388,
337,
2580,
486,
931,
445,
9707,
11,
4337,
797,
286,
1077,
274,
284,
61570,
9455,
486,
983,
3904,
2099,
82,
568,
15454,
543,
286,
2060,
10714,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_valid_url_failure() -> Result<()> {
let bad_url = "https://example space com".to_string();
match validate_url(bad_url) {
Ok(u) => anyhow::bail!("got: {}, want: error", u),
Err(e) => {
assert!(
e.is::<url::ParseError>(),
... | rust_cleaned_test_functions.jsonl/125244 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 317
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8337,
2903,
43618,
368,
1464,
5714,
71698,
341,
286,
1077,
3873,
2903,
284,
330,
2428,
1110,
8687,
3550,
469,
3263,
983,
3904,
543,
286,
2432,
9593,
2903,
1883,
329,
2903,
8,
341,
310,
7622,
815... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_iter() {
let a = Series::new("age", [23, 71, 9].as_ref());
let _b = a
.i32()
.unwrap()
.into_iter()
.map(|opt_v| opt_v.map(|v| v * 2));
} | rust_cleaned_test_functions.jsonl/6820 | {
"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,
11723,
368,
341,
286,
1077,
264,
284,
11131,
486,
931,
445,
424,
497,
508,
17,
18,
11,
220,
22,
16,
11,
220,
24,
936,
300,
7793,
1423,
286,
1077,
716,
65,
284,
264,
198,
310,
659,
72,
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_boolean_array_gt_scalar() {
let a: BooleanArray = vec![Some(true), Some(false), None].into();
let res1: Vec<Option<bool>> = gt_bool_scalar(&a, false).unwrap().iter().collect();
assert_eq!(res1, vec![Some(true), Some(false), None]);
let res2: Vec<Option<bool>> =... | rust_cleaned_test_functions.jsonl/45802 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 196
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46642,
3858,
37479,
41652,
368,
341,
286,
1077,
264,
25,
6992,
1857,
284,
7486,
20703,
8373,
3715,
701,
4329,
3576,
701,
2240,
936,
18122,
1428,
286,
1077,
592,
16,
25,
11312,
94150,
17028,
2452,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_abbreviation_1() {
assert_eq!(
Solution::min_abbreviation(String::from("apple"), vec![String::from("blade")]),
String::from("a4")
);
} | rust_cleaned_test_functions.jsonl/120828 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 105
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7260,
62,
76857,
62,
16,
368,
341,
286,
2060,
10714,
33673,
310,
12478,
486,
1065,
62,
76857,
2242,
486,
1499,
445,
22377,
3975,
7486,
20703,
703,
486,
1499,
445,
62727,
899,
17036,
310,
923,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_protection_wep() {
let dev_info = test_utils::fake_device_info(CLIENT_ADDR);
let client_config = ClientConfig::from_config(SmeConfig::default().with_wep(), false);
let hasher = WlanHasher::new(DUMMY_HASH_KEY);
// WEP-40 with credentials:
let credentia... | rust_cleaned_test_functions.jsonl/101627 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 644
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
2540,
39141,
1670,
747,
368,
341,
286,
1077,
3483,
3109,
284,
1273,
17309,
486,
30570,
9204,
3109,
52991,
10757,
16058,
317,
286,
1077,
2943,
5332,
284,
8423,
2648,
486,
1499,
5332,
3759,
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_deserialization_of_null() -> serde_json::Result<()> {
let payload = r#"{"query":"query","variables":null}"#;
let payload: StartPayload<DefaultScalarValue> = serde_json::from_str(payload)?;
let expected = StartPayload {
query: "query".into(),
varia... | rust_cleaned_test_functions.jsonl/27162 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 207
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
50563,
3575,
15162,
368,
1464,
61570,
9455,
486,
2077,
71698,
341,
286,
1077,
7729,
284,
435,
55543,
4913,
1631,
3252,
1631,
2198,
18616,
788,
2921,
9863,
2,
280,
286,
1077,
7729,
25,
5145,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_dollar_plus_dollar() {
let bank = Bank::new();
let expression = dollar(6.0).plus(dollar(4.0));
let reduced = bank.reduce(&expression, "USD");
assert_eq!(dollar(6.0 + 4.0), reduced);
} | rust_cleaned_test_functions.jsonl/133364 | {
"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,
814,
21295,
28043,
814,
21295,
368,
341,
286,
1077,
6073,
284,
8547,
486,
931,
543,
286,
1077,
7493,
284,
17692,
7,
21,
13,
15,
568,
7138,
1500,
21295,
7,
19,
13,
15,
1106,
286,
1077,
11046,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_type_name() {
assert_eq!(
CursorShape::from_type_name("block"),
Some(CursorShape::Block)
);
assert_eq!(
CursorShape::from_type_name("horizontal"),
Some(CursorShape::Horizontal)
);
assert_eq!(
... | rust_cleaned_test_functions.jsonl/94970 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 228
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
1819,
1269,
368,
341,
286,
2060,
10714,
33673,
310,
28067,
12301,
486,
1499,
1819,
1269,
445,
4574,
4461,
310,
4329,
3025,
3823,
12301,
486,
4713,
340,
286,
1439,
286,
2060,
10714,
33673,
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_has_duplicates() {
let a = vec![1, 2, 3, 4, 5];
assert_eq!(a.iter().has_duplicates(), false);
let a = vec![1, 2, 1, 4, 5];
assert_eq!(a.iter().has_duplicates(), true);
} | rust_cleaned_test_functions.jsonl/91326 | {
"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,
21778,
75051,
368,
341,
286,
1077,
264,
284,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
286,
2060,
10714,
10297,
64,
19471,
1005,
4648,
75051,
1507,
895,
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... | 1 |
#[test]
fn test_router_detect10() {
let router = Router::new().push(Router::with_path(r"users/<*sub:/(images|css)/.+/>").handle(fake_handler));
let mut req: Request = hyper::Request::builder()
.uri("http://local.host/users/12/m.jpg")
.body(hyper::Body::empty())
... | rust_cleaned_test_functions.jsonl/3302 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 412
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55587,
56457,
16,
15,
368,
341,
286,
1077,
9273,
284,
10554,
486,
931,
1005,
9077,
2785,
2676,
486,
4197,
2638,
2601,
1,
4218,
23012,
9,
1966,
25,
11884,
3642,
91,
5143,
5620,
59152,
9685,
1827,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_log_connect_stats_success() {
let mut exec = fasync::TestExecutor::new().expect("Failed to create an executor");
let (mut cobalt_sender, mut cobalt_receiver) = fake_cobalt_sender();
let (mut cobalt_1dot1_proxy, mut cobalt_1dot1_stream) =
create_proxy_and_strea... | rust_cleaned_test_functions.jsonl/50924 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1236
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5224,
15720,
15381,
18632,
368,
341,
286,
1077,
5206,
3883,
284,
282,
7692,
486,
2271,
25255,
486,
931,
1005,
17119,
445,
9408,
311,
1855,
458,
31558,
797,
286,
1077,
320,
6984,
33828,
3145,
54356... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_add_border_constraint() {
let points = random_points_with_seed::<f64>(1000, b" ddpoo2jjb8ynbv2");
let mut cdt = CDT::new();
let mut max_y = -::std::f64::MAX;
for point in points {
max_y = max_y.max(point.y);
cdt.insert(point);
}
... | rust_cleaned_test_functions.jsonl/70755 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 303
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
31940,
46973,
368,
341,
286,
1077,
3501,
284,
4194,
12928,
6615,
33809,
27638,
69,
21,
19,
2235,
16,
15,
15,
15,
11,
293,
1,
294,
9796,
2624,
17,
38811,
65,
23,
1872,
54929,
17,
797,
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... | 2 |
#[test]
fn test_replay_confidence_cache() {
fn leader_vote(bank: &Arc<Bank>, pubkey: &Pubkey) {
let mut leader_vote_account = bank.get_account(&pubkey).unwrap();
let mut vote_state = VoteState::from(&leader_vote_account).unwrap();
vote_state.process_slot_vote_unchecke... | rust_cleaned_test_functions.jsonl/43056 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2869
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
1363,
16059,
7087,
11529,
368,
341,
286,
5168,
7653,
54360,
1883,
1180,
25,
609,
36809,
27,
25828,
8066,
95116,
25,
609,
29162,
792,
8,
341,
310,
1077,
5206,
7653,
54360,
13500,
284,
6073,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_checker() {
let (mut default, mut lock, mut write) = (vec![], vec![], vec![]);
enum Expect {
Keep,
Remove,
};
// test check CF_LOCK.
default.extend(vec![
(b"k4", 100, Expect::Keep),
(b"k5", ... | rust_cleaned_test_functions.jsonl/60242 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3150
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73187,
638,
62715,
368,
341,
286,
1077,
320,
6984,
1638,
11,
5206,
5296,
11,
5206,
3270,
8,
284,
320,
4083,
0,
12995,
7486,
0,
12995,
7486,
0,
56703,
286,
7618,
32085,
341,
310,
13655,
345,
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... | 9 |
#[test]
fn test_banking_stage_entries_only() {
analog_logger::setup();
let GenesisConfigInfo {
genesis_config,
mint_keypair,
..
} = create_slow_genesis_config(10);
let bank = Arc::new(Bank::new_no_wallclock_throttle_for_tests(&genesis_config));... | rust_cleaned_test_functions.jsonl/4983 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2478
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
32334,
35238,
26092,
18410,
368,
341,
286,
23400,
27413,
486,
15188,
543,
286,
1077,
40788,
2648,
1731,
341,
310,
59366,
5332,
345,
310,
28337,
3097,
12670,
345,
310,
54538,
286,
335,
284,
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... | 4 |
#[test]
fn test_9() {
let string = r#"[ab] "#;
let tokenizer = Tokenizer::new(string);
let tokens: Vec<Token> = tokenizer.iter().collect();
assert_eq!(
tokens,
vec![
Token::Quoted("[ab]".to_string()),
Token::Space(" ".to_str... | rust_cleaned_test_functions.jsonl/75873 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 272
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
24,
368,
341,
286,
1077,
914,
284,
435,
2,
36864,
370,
60,
5869,
280,
286,
1077,
45958,
284,
9660,
3135,
486,
931,
3609,
317,
286,
1077,
11211,
25,
11312,
83416,
29,
284,
45958,
19471,
100... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_merge_overwriting_with_list() {
let mut upper = Env::new();
let mut lower = Env::new();
lower.insert(
"mykey".to_string(),
EnvKey::Single("lower_value".to_string()),
);
upper.insert(
"mykey".to_string(),
Env... | rust_cleaned_test_functions.jsonl/131135 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 413
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
15431,
25304,
6615,
2019,
368,
341,
286,
1077,
5206,
8416,
284,
37039,
486,
931,
543,
286,
1077,
5206,
4722,
284,
37039,
486,
931,
543,
286,
4722,
7030,
1006,
310,
330,
2408,
792,
3263,
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_qualified_address_invalid_length_verkey() {
let vk_bytes = rand_bytes(VERKEY_LEN+1);
let address = vk_bytes.into_base58_check();
let result = validate_address(&address);
let error = result.unwrap_err();
assert_eq!(ErrorCode::CommonInvalidStructure, error);... | rust_cleaned_test_functions.jsonl/72542 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 139
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
36335,
6744,
31433,
5118,
26042,
792,
368,
341,
286,
1077,
34283,
12524,
284,
10382,
12524,
7,
3763,
4784,
15536,
10,
16,
317,
286,
1077,
2621,
284,
34283,
12524,
39860,
7651,
20,
23,
7200,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_biguint_to_bits_le() {
let value = BigUint::from(1u8);
assert_eq!(biguint_to_bits_le(&BigUint::from(1u8), 4), vec![1, 0, 0, 0]);
assert_eq!(
biguint_to_bits_le(&BigUint::from(1u8), 8),
vec![1, 0, 0, 0, 0, 0, 0, 0]
);
assert_eq!(
... | rust_cleaned_test_functions.jsonl/64238 | {
"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,
36386,
2496,
2346,
20034,
11751,
368,
341,
286,
1077,
897,
284,
6164,
21570,
486,
1499,
7,
16,
84,
23,
626,
286,
2060,
10714,
10297,
16154,
2496,
2346,
20034,
11751,
2099,
15636,
21570,
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_gmm_fit() {
let mut rng = Isaac64Rng::seed_from_u64(42);
let weights = array![0.5, 0.5];
let means = array![[0., 0.], [5., 5.]];
let covars = array![[[1., 0.8], [0.8, 1.]], [[1.0, -0.6], [-0.6, 1.0]]];
let mvn1 =
MultivariateNormal::new(&means.... | rust_cleaned_test_functions.jsonl/10368 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 913
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
3821,
32416,
368,
341,
286,
1077,
5206,
28422,
284,
41508,
21,
19,
49,
968,
486,
22602,
5673,
7300,
21,
19,
7,
19,
17,
317,
286,
1077,
14324,
284,
1334,
20703,
15,
13,
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... | 5 |
#[test]
fn test_reserve_exact() {
let mut d = RingBuf::new();
d.push(0u64);
d.reserve_exact(50);
assert_eq!(d.elts.capacity(), 50);
let mut d = RingBuf::new();
d.push(0u32);
d.reserve_exact(50);
assert_eq!(d.elts.capacity(), 50);
} | rust_cleaned_test_functions.jsonl/49518 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 174
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
89591,
71084,
368,
341,
286,
1077,
5206,
294,
284,
21525,
15064,
486,
931,
543,
286,
294,
2552,
7,
15,
84,
21,
19,
317,
286,
294,
48520,
71084,
7,
20,
15,
317,
286,
2060,
10714,
10297,
67,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_timing_task() {
let pool = MultiTaskRuntimeBuilder::default();
let rt = pool.build();
match rt.spawn_timing(rt.alloc(), async move {
println!("!!!!!!run timing task ok, index: {}", index);
}, 5000) {
Err(e) => {
... | rust_cleaned_test_functions.jsonl/62458 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 783
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25133,
70973,
12184,
368,
972,
262,
1077,
7314,
284,
17439,
6262,
15123,
3297,
486,
2258,
1647,
262,
1077,
16677,
284,
7314,
13239,
7317,
688,
2432,
16677,
59296,
70973,
56154,
78224,
1507,
3312,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_sanitize_with_instruction() {
assert!(Message {
header: MessageHeader {
num_required_signatures: 1,
..MessageHeader::default()
},
account_keys: vec![Pubkey::new_unique(), Pubkey::new_unique()],
instructions: ... | rust_cleaned_test_functions.jsonl/94108 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 309
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
58652,
6615,
54923,
368,
341,
286,
2060,
10297,
2052,
341,
310,
4247,
25,
4856,
4047,
341,
394,
1629,
18743,
11172,
2789,
25,
220,
16,
345,
394,
5241,
2052,
4047,
486,
2258,
741,
310,
1153,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ignore_unknown_features() {
let output = cargo_hack()
.args(&[
"hack",
"check",
"--ignore-unknown-features",
"--no-default-features",
"--features",
"f",
])
.current_dir(test_dir("tests/fixtures/vi... | rust_cleaned_test_functions.jsonl/25306 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 376
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58493,
57507,
14965,
368,
341,
262,
1077,
2550,
284,
25652,
1523,
473,
741,
286,
659,
2116,
2099,
9640,
310,
330,
65972,
756,
310,
330,
2028,
756,
310,
14482,
13130,
12,
16088,
12,
20304,
756,
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_message_descriptor() {
assert_eq!("TestDescriptor", TestDescriptor::descriptor_static().name());
let d = reflect::MessageDescriptor::for_type::<TestDescriptor>();
assert_eq!("TestDescriptor", d.name());
assert_eq!("basic.TestDescriptor", d.full_name());
let mut t = TestDesc... | rust_cleaned_test_functions.jsonl/2716 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 217
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6462,
33774,
368,
341,
262,
2060,
10714,
17223,
2271,
11709,
497,
3393,
11709,
486,
53132,
25360,
1005,
606,
5231,
262,
1077,
294,
284,
8708,
486,
2052,
11709,
486,
1958,
1819,
27638,
2271,
11709,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_clobs() {
// parse tests for short clob
parse_equals("{{\"hello\"}}\n", "hello");
parse_equals("{{\"a\\\"'\\n\"}}\n", "a\"\'\n");
parse_equals("{{\"\\xe2\\x9d\\xa4\\xef\\xb8\\x8f\"}}\n", "❤️");
// parse tests for long clob
parse_equals("{{''... | rust_cleaned_test_functions.jsonl/111153 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 260
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
666,
68164,
368,
341,
286,
442,
4715,
7032,
369,
2805,
272,
1684,
198,
286,
4715,
61664,
445,
2979,
2105,
14990,
2105,
3417,
59,
77,
497,
330,
14990,
797,
286,
4715,
61664,
445,
2979,
210... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_is_mmapped_for_unmapped_next_to_mapped() {
serial_test(|| {
with_cleanup(
|| {
// map 1 page from START
assert!(dzmmap_noreplace(START, BYTES_IN_PAGE).is_ok());
// check if the next page is map... | rust_cleaned_test_functions.jsonl/107215 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 362
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
6892,
35599,
5677,
5478,
4907,
65371,
11257,
2346,
91933,
368,
341,
286,
6146,
4452,
79453,
341,
310,
448,
42444,
1006,
394,
1369,
341,
503,
442,
2415,
220,
16,
2150,
504,
20998,
198,
503,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_similarity_limit() {
let f = File::open("testdata/similarity.bin").unwrap();
let mut reader = BufReader::new(f);
let embeddings = Embeddings::read_word2vec_binary(&mut reader).unwrap();
let result = embeddings.word_similarity("Stuttgart", 10);
assert!(res... | rust_cleaned_test_functions.jsonl/22003 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 277
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
76236,
14763,
368,
341,
286,
1077,
282,
284,
2887,
486,
2508,
445,
92425,
2687,
318,
48225,
29394,
1827,
15454,
543,
286,
1077,
5206,
6604,
284,
69013,
5062,
486,
931,
955,
317,
286,
1077,
70547,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_resource_prefix() {
let tree = Tree::new(&ResourceDef::prefix("/"), 1);
assert_eq!(tree.find(&mut Path::new("/")), Some(1));
assert_eq!(tree.find(&mut Path::new("/a")), Some(1));
assert_eq!(tree.find(&mut Path::new("/a/test/test")), Some(1));
let tree = T... | rust_cleaned_test_functions.jsonl/2254 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1235
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17962,
13974,
368,
341,
286,
1077,
4916,
284,
8942,
486,
931,
2099,
4783,
2620,
486,
11849,
4283,
3975,
220,
16,
317,
286,
2060,
10714,
10297,
9344,
2658,
2099,
6984,
7933,
486,
931,
4283,
35674,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_shortcut_functions() {
let mut context = HashMapContext::new();
context
.set_value("string".into(), Value::from("a string"))
.unwrap();
assert_eq!(
eval_string_with_context("string", &context),
Ok("a string".to_string())
);
assert_eq!(eva... | rust_cleaned_test_functions.jsonl/105351 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2230
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16673,
10242,
31708,
368,
341,
262,
1077,
5206,
2266,
284,
10528,
1972,
486,
931,
543,
262,
2266,
198,
286,
659,
746,
3142,
445,
917,
3263,
18122,
1507,
5162,
486,
1499,
445,
64,
914,
5455,
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_is_same_subnet() {
// valid test
vec![
("202.194.128.9", "202.194.128.14", "255.255.255.0"),
("220.230.1.1", "220.255.230.1", "255.192.0.0"),
("100.0.0.1", "100.0.0.100", "255.255.255.128"),
("100.200.2.100", "100.200.14.230", "255.... | rust_cleaned_test_functions.jsonl/104541 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 666
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
33574,
95681,
368,
341,
286,
442,
2697,
1273,
198,
286,
7486,
90515,
310,
3489,
17,
15,
17,
13,
16,
24,
19,
13,
16,
17,
23,
13,
24,
497,
330,
17,
15,
17,
13,
16,
24,
19,
13,
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_read_until() {
let inner = MemReader::new(vec!(0, 1, 2, 1, 0));
let mut reader = BufferedReader::with_capacity(2, inner);
assert_eq!(reader.read_until(0), Ok(vec!(0)));
assert_eq!(reader.read_until(2), Ok(vec!(1, 2)));
assert_eq!(reader.read_until(1), Ok(v... | rust_cleaned_test_functions.jsonl/52989 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 218
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
44352,
368,
341,
286,
1077,
9179,
284,
13550,
5062,
486,
931,
25592,
10297,
15,
11,
220,
16,
11,
220,
17,
11,
220,
16,
11,
220,
15,
1106,
286,
1077,
5206,
6604,
284,
25568,
486,
4197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_chunk_out_of_range() {
let index: u64 = 4;
let chunk: u64 = 10;
let max: u64 = 25;
// test
let result = get_chunk(index, chunk, max);
assert_eq!(result.is_none(), true);
} | rust_cleaned_test_functions.jsonl/95325 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 132
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
30539,
6068,
3575,
9698,
368,
341,
286,
1077,
1922,
25,
575,
21,
19,
284,
220,
19,
280,
286,
1077,
11879,
25,
575,
21,
19,
284,
220,
16,
15,
280,
286,
1077,
1932,
25,
575,
21,
19,
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_block_hash() {
let runner = test_utils::AuroraRunner::default();
let chain_id = {
let number = crate::prelude::U256::from(runner.chain_id);
crate::types::u256_to_arr(&number)
};
let account_id = runner.aurora_account_id;
let block_hash = crate::engine::Engine:... | rust_cleaned_test_functions.jsonl/131050 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 249
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7113,
8950,
368,
341,
262,
1077,
22259,
284,
1273,
17309,
486,
32,
324,
6215,
19486,
486,
2258,
543,
262,
1077,
8781,
842,
284,
341,
286,
1077,
1372,
284,
17717,
486,
1726,
52538,
486,
52,
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_push_vote() {
let tree = HashMap::new();
let bmap = HashMap::new();
let b0 = Fork { id: 0, base: 0 };
let mut tower = Tower::new(32, 7, 0);
let vote = Vote::new(b0.clone(), 0);
assert!(tower.push_vote(vote, &tree, &bmap));
assert_eq!(tower.votes.len(), 1);
let vo... | rust_cleaned_test_functions.jsonl/80075 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 781
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14218,
54360,
368,
341,
262,
1077,
4916,
284,
10528,
486,
931,
543,
262,
1077,
293,
2186,
284,
10528,
486,
931,
543,
262,
1077,
293,
15,
284,
47850,
314,
877,
25,
220,
15,
11,
2331,
25,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_add_selection_above() {
let mut editor = Editor::new(Rc::new(RefCell::new(Buffer::new(1))));
editor.buffer.borrow_mut().splice(0..0, "\
abcdefghijk\n\
lmnop\n\
\n\
\n\
qrstuvwxyz\n\
");
// Multi-line sel... | rust_cleaned_test_functions.jsonl/123914 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1245
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
23672,
77315,
368,
341,
286,
1077,
5206,
6440,
284,
12580,
486,
931,
2785,
66,
486,
931,
7,
3945,
3599,
486,
931,
55574,
486,
931,
7,
16,
38776,
286,
6440,
24465,
83640,
29523,
1005,
94960... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hash_2() {
let password = "Correct Horse Battery Staple";
let opslimit = OpsLimit(1);
let memlimit = MemLimit(5000000);
let result = pwhash(password.as_bytes(), opslimit, memlimit);
assert!(result.is_ok(), "failed to verify password with hash");
} | rust_cleaned_test_functions.jsonl/134479 | {
"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,
8950,
62,
17,
368,
341,
286,
1077,
3552,
284,
330,
33092,
33292,
33612,
62506,
273,
876,
286,
1077,
1179,
3226,
2353,
284,
55158,
16527,
7,
16,
317,
286,
1077,
1833,
9506,
284,
13550,
16527,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_primitive_array_alignment() {
let ptr = memory::allocate_aligned(8).unwrap();
let buf = Buffer::from_raw_parts(ptr, 8);
let buf2 = buf.slice(1);
let array_data = ArrayData::builder(DataType::Int32).add_buffer(buf2).build();
Int32Array::from(array_data);
... | rust_cleaned_test_functions.jsonl/19361 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 143
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84087,
3858,
51006,
368,
341,
286,
1077,
10087,
284,
4938,
486,
31191,
66385,
7,
23,
568,
15454,
543,
286,
1077,
6607,
284,
10312,
486,
1499,
16067,
33217,
23866,
11,
220,
23,
317,
286,
1077,
66... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_atomic_lsn() {
let lsn = AtomicLsn::new(0);
assert_eq!(lsn.fetch_add(1234), Lsn(0));
assert_eq!(lsn.load(), Lsn(1234));
lsn.store(Lsn(5678));
assert_eq!(lsn.load(), Lsn(5678));
assert_eq!(lsn.fetch_max(Lsn(6000)), Lsn(5678));
assert_eq!(ls... | rust_cleaned_test_functions.jsonl/75381 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 204
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51367,
907,
9613,
368,
341,
286,
1077,
326,
9613,
284,
30316,
43,
9613,
486,
931,
7,
15,
317,
286,
2060,
10714,
10297,
4730,
77,
16121,
2891,
7,
16,
17,
18,
19,
701,
444,
9613,
7,
15,
1106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_use_loc() {
check_location(r"use f$0", ImmediateLocation::Use);
check_location(r"use f$0;", ImmediateLocation::Use);
check_location(r"use f::{f$0}", ImmediateLocation::UseTree);
check_location(r"use {f$0}", ImmediateLocation::UseTree);
} | rust_cleaned_test_functions.jsonl/55224 | {
"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,
15951,
13400,
368,
341,
286,
1779,
13126,
2601,
25372,
282,
3,
15,
497,
80310,
4707,
486,
10253,
317,
286,
1779,
13126,
2601,
25372,
282,
3,
15,
32503,
80310,
4707,
486,
10253,
317,
286,
1779,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tiledinputpart_level_rounding_mode_success() {
let input = MultiPartInputFile::new(&*SRC_IMAGE_PATH, 0, true).unwrap();
let tiled_input_part = super::TiledInputPart::new(&input, 0);
let level_rounding_mode = tiled_input_part.level_rounding_mode();
assert_eq!(leve... | rust_cleaned_test_functions.jsonl/59295 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
2181,
1355,
4480,
8274,
29896,
287,
7302,
18632,
368,
341,
286,
1077,
1946,
284,
17439,
5800,
2505,
1703,
486,
931,
2099,
9,
56017,
19121,
7944,
11,
220,
15,
11,
830,
568,
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_filter_vouched() {
let uuid = Uuid::parse_str(UUID).unwrap_or_default();
let profile = some_profile();
let vouched = UsersVouched::from(&profile);
assert_eq!(vouched.user_uuid, uuid);
assert_eq!(vouched.first_name, None);
assert_eq!(vouched.last_na... | rust_cleaned_test_functions.jsonl/62146 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 207
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8727,
2273,
33070,
368,
341,
286,
1077,
16040,
284,
547,
2423,
486,
6400,
2895,
65664,
568,
15454,
8734,
9993,
543,
286,
1077,
5526,
284,
1045,
13789,
543,
286,
1077,
348,
33070,
284,
14627,
53,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_zst() {
let mut m = BTreeMap::new();
assert_eq!(m.len(), 0);
assert_eq!(m.insert((), ()), None);
assert_eq!(m.len(), 1);
assert_eq!(m.insert((), ()), Some(()));
assert_eq!(m.len(), 1);
assert_eq!(m.iter().count(), 1);
m.clear();
assert_eq!(m.len(), 0);
... | rust_cleaned_test_functions.jsonl/49397 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 219
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6415,
267,
368,
341,
262,
1077,
5206,
296,
284,
425,
6533,
2227,
486,
931,
543,
262,
2060,
10714,
10297,
76,
19406,
1507,
220,
15,
626,
262,
2060,
10714,
10297,
76,
7030,
7,
1507,
320,
5731,
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... | 2 |
#[test]
fn test_parse_command() {
let test_commands = get_clap_app("test", "desc", "version");
let default_keypair = Keypair::new();
let (default_keypair_file, mut tmp_file) = make_tmp_file();
write_keypair(&default_keypair, tmp_file.as_file_mut()).unwrap();
let default_s... | rust_cleaned_test_functions.jsonl/870 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3156
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
10811,
368,
341,
286,
1077,
1273,
44151,
284,
633,
6794,
391,
8191,
445,
1944,
497,
330,
8614,
497,
330,
4366,
797,
286,
1077,
1638,
3097,
12670,
284,
6569,
1082,
1310,
486,
931,
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_convert_i64() {
fn check(b1: BigUint, i: i64) {
let b2: BigUint = FromPrimitive::from_i64(i).unwrap();
assert!(b1 == b2);
assert!(b1.to_i64().unwrap() == i);
}
check(Zero::zero(), 0);
check(One::one(), 1);
check(i64::MA... | rust_cleaned_test_functions.jsonl/96895 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 534
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
5318,
21,
19,
368,
341,
286,
5168,
1779,
1883,
16,
25,
6164,
21570,
11,
600,
25,
600,
21,
19,
8,
341,
310,
1077,
293,
17,
25,
6164,
21570,
284,
5542,
33313,
486,
1499,
5318,
21,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_basic_kg() {
let base_kg = BaseUnit::new("kilogram".into());
let mut hashmap = HashMap::new();
hashmap.insert(base_kg, 1.into());
let kg = NamedUnit::new("k".into(), "g".into(), "g".into(), hashmap, 1);
let one_kg = Value::new(1, vec![UnitExponent::new(kg.... | rust_cleaned_test_functions.jsonl/73911 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 242
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34729,
4698,
70,
368,
341,
286,
1077,
2331,
4698,
70,
284,
5351,
4562,
486,
931,
445,
85526,
12958,
3263,
18122,
1423,
286,
1077,
5206,
92148,
284,
10528,
486,
931,
543,
286,
92148,
7030,
12663,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_syn_state_hwy() {
let context = Context::new(
String::from("us"),
Some(String::from("PA")),
Tokens::new(HashMap::new(), HashMap::new(), HashMap::new()),
);
assert_eq!(
syn_state_hwy(&Name::new(String::from(""), 0, None, &co... | rust_cleaned_test_functions.jsonl/25031 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 4157
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51393,
4387,
1523,
22545,
368,
341,
286,
1077,
2266,
284,
9608,
486,
931,
1006,
310,
923,
486,
1499,
445,
355,
4461,
310,
4329,
2242,
486,
1499,
445,
8041,
30154,
310,
58166,
486,
931,
7,
18497,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_eval_binary_function_vector_vector() {
#[derive(Debug, Clone, Copy, RpnFunction)]
#[rpn_function(args = 2)]
struct FnFoo;
impl FnFoo {
fn call(
_ctx: &mut EvalContext,
_payload: RpnFnCallPayload<'_>,
... | rust_cleaned_test_functions.jsonl/111588 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1091
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
31761,
9174,
12247,
12247,
368,
341,
394,
11506,
27098,
42618,
11,
27913,
11,
14540,
11,
431,
19958,
5152,
5563,
286,
11506,
81,
19958,
9174,
7356,
284,
220,
17,
5563,
286,
2036,
50182,
409... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_new_from_file_crafted_data_len() {
let file = get_append_vec_path("test_new_from_file_crafted_data_len");
let path = &file.path;
let mut av = AppendVec::new(path, true, 1024 * 1024);
av.set_no_remove_on_drop();
let crafted_data_len = 1;
av.append... | rust_cleaned_test_functions.jsonl/5421 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 452
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
5673,
2458,
666,
60769,
1769,
6043,
368,
341,
286,
1077,
1034,
284,
633,
26041,
13251,
2638,
445,
1944,
5921,
5673,
2458,
666,
60769,
1769,
6043,
797,
286,
1077,
1815,
284,
609,
1192,
3875,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bit_xor() {
let mut ctx = EvalContext::default();
let function = AggrFnBitOp::<BitXor>(std::marker::PhantomData);
let mut state = function.create_state();
let mut result = [VectorValue::with_capacity(0, EvalType::Int)];
state.push_result(&mut ctx, &mut r... | rust_cleaned_test_functions.jsonl/16698 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1204
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13996,
76462,
368,
341,
286,
1077,
5206,
5635,
284,
58239,
1972,
486,
2258,
543,
286,
1077,
729,
284,
4598,
901,
24911,
8344,
7125,
27638,
8344,
55,
269,
2235,
1834,
486,
27742,
486,
3357,
30002,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_corruption() {
assert::fail("'U4V6'[93]", "out of bound");
assert::fail("''[2]", "out of bound");
} | rust_cleaned_test_functions.jsonl/8189 | {
"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,
3904,
14734,
14123,
368,
341,
286,
2060,
486,
18403,
45456,
52,
19,
53,
21,
66895,
24,
18,
19076,
330,
411,
315,
6822,
797,
286,
2060,
486,
18403,
445,
4605,
58,
17,
19076,
330,
411,
315,
6822... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_deserialize_bool() {
let value = Value::Boolean(true);
let deserializer = ValueDeserializer::new(&value);
let result: bool = bool::deserialize(deserializer).unwrap();
assert!(result);
} | rust_cleaned_test_functions.jsonl/67376 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 105
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
9050,
22159,
368,
341,
286,
1077,
897,
284,
5162,
486,
6890,
3715,
317,
286,
1077,
939,
41939,
284,
5162,
80097,
486,
931,
2099,
957,
317,
286,
1077,
1102,
25,
1807,
284,
1807,
486,
66777... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_variant_typing() {
let out: bool = rune!(pub fn main() { Err(0) is Result });
assert_eq!(out, true);
let out: bool = rune!(pub fn main() { Ok(0) is Result });
assert_eq!(out, true);
let out: bool = rune!(pub fn main() { Some(0) is Option });
assert_eq!(out, true);
... | rust_cleaned_test_functions.jsonl/103098 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 440
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46112,
42111,
287,
368,
341,
262,
1077,
700,
25,
1807,
284,
63499,
10297,
9585,
5168,
1887,
368,
314,
15495,
7,
15,
8,
374,
5714,
1625,
262,
2060,
10714,
10297,
411,
11,
830,
626,
262,
1077,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.