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_keywrap_parsing() {
for test in wycheproof::keywrap::TestName::all() {
let _kat = wycheproof::keywrap::TestSet::load(test).unwrap();
}
} | rust_cleaned_test_functions.jsonl/5836 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 80
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3097,
10097,
620,
28598,
368,
341,
262,
369,
1273,
304,
289,
5641,
747,
75636,
486,
792,
10097,
486,
2271,
675,
486,
541,
368,
341,
286,
1077,
716,
33755,
284,
289,
5641,
747,
75636,
486,
792,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_spec() {
assert_eq!(parse_spec(":"), Ok((None, None)));
assert!(parse_spec("::")
.err()
.unwrap()
.starts_with("invalid group: "));
} | rust_cleaned_test_functions.jsonl/25010 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 123
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
13594,
368,
341,
286,
2060,
10714,
10297,
6400,
13594,
445,
2974,
701,
7622,
1188,
4064,
11,
2240,
4945,
286,
2060,
10297,
6400,
13594,
445,
486,
1138,
310,
659,
615,
741,
310,
659,
15454,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_trigrams_with_positions() {
let res = get_trigrams_with_positions("xaaaaabbbbd");
assert_eq!(res["aaa"], 0);
assert_eq!(res["bbb"], 1);
} | rust_cleaned_test_functions.jsonl/73151 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 98
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
3547,
83109,
6615,
37219,
368,
341,
286,
1077,
592,
284,
633,
3547,
83109,
6615,
37219,
445,
87,
28458,
370,
6066,
8940,
797,
286,
2060,
10714,
10297,
416,
1183,
32646,
7914,
220,
15,
317,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_tuple_struct() {
#[derive(Tsify)]
struct Tuple(i32, String);
#[derive(Tsify)]
struct EmptyTuple();
assert_eq!(Tuple::DECL, "export type Tuple = [number, string];");
assert_eq!(EmptyTuple::DECL, "export type EmptyTuple = [];");
} | rust_cleaned_test_functions.jsonl/121072 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21773,
15126,
368,
341,
262,
11506,
27098,
4140,
82,
1437,
5563,
262,
2036,
24622,
1956,
18,
17,
11,
923,
317,
262,
11506,
27098,
4140,
82,
1437,
5563,
262,
2036,
22228,
28681,
1428,
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_exit_status_valid_target() {
let mut subprocess = start_c_program("./multi_pipe_test");
assert_eq!(
Command::new("./target/debug/inspect-fds")
.args(&[&subprocess.id().to_string()])
.status()
.expect("Could not find targ... | rust_cleaned_test_functions.jsonl/41238 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 297
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16880,
4773,
8337,
11123,
368,
341,
286,
1077,
5206,
23514,
284,
1191,
666,
25096,
13988,
26268,
41862,
4452,
797,
286,
2060,
10714,
33673,
310,
7348,
486,
931,
13988,
5657,
67479,
14,
82054,
2220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bool_array_or() {
let a = BooleanArray::from(vec![false, false, true, true]);
let b = BooleanArray::from(vec![false, true, false, true]);
let c = or(&a, &b).unwrap();
let expected = BooleanArray::from(vec![false, true, true, true]);
assert_eq!(c, expecte... | rust_cleaned_test_functions.jsonl/45013 | {
"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,
22159,
3858,
8734,
368,
341,
286,
1077,
264,
284,
6992,
1857,
486,
1499,
25592,
20703,
3849,
11,
895,
11,
830,
11,
830,
2558,
286,
1077,
293,
284,
6992,
1857,
486,
1499,
25592,
20703,
3849,
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_trailers_with_fin_after_headers() {
// Make a new connection.
let (mut client, mut server, request_stream_id) = connect_and_send_request(true);
// Send HEADER frame.
server_send_response_and_exchange_packet(
&mut client,
&mut server,
... | rust_cleaned_test_functions.jsonl/101922 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 987
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3547,
604,
388,
6615,
39737,
19844,
26719,
368,
341,
286,
442,
7405,
264,
501,
3633,
624,
286,
1077,
320,
6984,
2943,
11,
5206,
3538,
11,
1681,
12673,
842,
8,
284,
4564,
8378,
13565,
7893,
3715,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_daead_parsing() {
for test in wycheproof::daead::TestName::all() {
let _kat = wycheproof::daead::TestSet::load(test).unwrap();
}
} | rust_cleaned_test_functions.jsonl/5830 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 80
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
47070,
3149,
620,
28598,
368,
341,
262,
369,
1273,
304,
289,
5641,
747,
75636,
486,
3235,
3149,
486,
2271,
675,
486,
541,
368,
341,
286,
1077,
716,
33755,
284,
289,
5641,
747,
75636,
486,
3235,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_coordinate_types() {
let p: Point<u8> = Point::new(0, 0);
assert_eq!(p.x(), 0u8);
let p: Point<i64> = Point::new(1_000_000, 0);
assert_eq!(p.x(), 1_000_000i64);
} | rust_cleaned_test_functions.jsonl/99953 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 125
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68649,
9763,
368,
341,
286,
1077,
281,
25,
5126,
34837,
23,
29,
284,
5126,
486,
931,
7,
15,
11,
220,
15,
317,
286,
2060,
10714,
10297,
79,
1993,
1507,
220,
15,
84,
23,
626,
286,
1077,
281,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_agent_can_execute_multi_agent_one_task() {
let mut context = get_context(accounts(1));
testing_env!(context.build());
let mut contract = Contract::new();
// Move forward time and blocks to get more accurate bps
testing_env!(context
.is_v... | rust_cleaned_test_functions.jsonl/6280 | {
"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,
7200,
25730,
27421,
44329,
25133,
25730,
11667,
12184,
368,
341,
286,
1077,
5206,
2266,
284,
633,
8467,
91868,
7,
16,
1106,
286,
7497,
15879,
10297,
2147,
13239,
1423,
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_node_check() {
let meta = Meta::default();
let address = Address::new("address");
let payload = Payload::new("payload");
let mut node = Node::new(&meta, &address, &payload).unwrap();
let res = node.check();
assert!(res.is_ok());
let invalid_size = 0;
no... | rust_cleaned_test_functions.jsonl/56010 | {
"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,
5084,
7200,
368,
341,
262,
1077,
8823,
284,
15819,
486,
2258,
543,
262,
1077,
2621,
284,
9177,
486,
931,
445,
4995,
797,
262,
1077,
7729,
284,
52916,
486,
931,
445,
19427,
797,
1066,
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... | 1 |
#[test]
fn test_binding_modes() {
let output = "[\"resize\",\"default\"]";
let o: Result<BindingModes, serde_json::error::Error> = serde_json::from_str(output);
assert!(o.is_ok());
} | rust_cleaned_test_functions.jsonl/56069 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 102
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60815,
59724,
368,
341,
286,
1077,
2550,
284,
10545,
2105,
17347,
34333,
2258,
75104,
876,
286,
1077,
297,
25,
5714,
27,
15059,
70035,
11,
61570,
9455,
486,
841,
486,
1454,
29,
284,
61570,
9455,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_root() -> Result<(), Box<dyn Error>> {
let joined_at = Timestamp::from_str("2021-09-19T14:17:32.000000+00:00")?;
let cache = InMemoryCache::new();
let permissions = cache.permissions();
cache.update(&GuildCreate(base_guild()));
cache.update(&MemberAdd(te... | rust_cleaned_test_functions.jsonl/98885 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 647
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12993,
368,
1464,
5714,
68843,
8261,
92846,
4600,
2452,
341,
286,
1077,
10859,
3752,
284,
32758,
486,
1499,
2895,
445,
17,
15,
17,
16,
12,
15,
24,
12,
16,
24,
51,
16,
19,
25,
16,
22,
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... | 3 |
#[test]
fn test_dual_vec_sqrt() {
let res = DualVec64::<2>::new(1.2, StaticVec::new_vec([1.0, 1.0])).sqrt();
assert!((res.re - 1.09544511501033).abs() < 1e-12);
assert!((res.eps[0] - 0.456435464587638).abs() < 1e-12);
assert!((res.eps[1] - 0.456435464587638).abs() < 1e-12);
} | rust_cleaned_test_functions.jsonl/28602 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 159
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
96772,
13251,
92199,
368,
341,
262,
1077,
592,
284,
33659,
10050,
21,
19,
27638,
17,
6831,
931,
7,
16,
13,
17,
11,
23105,
10050,
486,
931,
13251,
2561,
16,
13,
15,
11,
220,
16,
13,
15,
54697... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sanitize_txs() {
let key = Keypair::new();
let id0 = Pubkey::default();
let program_id = solana_sdk::pubkey::new_rand();
let ix = Instruction::new_with_bincode(
program_id,
&0,
vec![
AccountMeta::new(key.pubkey()... | rust_cleaned_test_functions.jsonl/11233 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
58652,
17805,
82,
368,
341,
286,
1077,
1376,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
877,
15,
284,
22611,
792,
486,
2258,
543,
286,
1077,
2025,
842,
284,
2048,
3362,
61783,
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_deref_mut() {
let str_pool : Pool<String> = Pool::with_size(1);
let mut rstring = str_pool.new_from("cat");
rstring.push_str("s love eating mice");
assert_eq!("cats love eating mice", *rstring);
} | rust_cleaned_test_functions.jsonl/121185 | {
"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,
814,
43970,
29523,
368,
341,
414,
1077,
607,
15709,
549,
22728,
3464,
29,
284,
22728,
486,
4197,
2368,
7,
16,
317,
414,
1077,
5206,
435,
917,
284,
607,
15709,
4618,
5673,
445,
4616,
797,
414,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_result_from_ffi_result_err() {
let ffi_res: FfiResult<*mut i32> = FfiResult::Err(util::into_raw(FfiError {
variant: "FailedFunction".to_char_p(),
message: "Eat my shorts!".to_char_p(),
backtrace: "".to_char_p(),
}));
let res = Fallible:... | rust_cleaned_test_functions.jsonl/31443 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 205
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5287,
5673,
62,
53799,
5287,
9266,
368,
341,
286,
1077,
76956,
4918,
25,
434,
9983,
2077,
78822,
6984,
600,
18,
17,
29,
284,
434,
9983,
2077,
486,
7747,
67811,
486,
18122,
16067,
7832,
9983,
145... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_concat_num_column() {
let xs = vec![make_num_column(), make_num_column()];
let actual = ConcatColumnData::concat(xs);
assert_eq!(u32::from(actual.at(0)), 1_u32);
assert_eq!(u32::from(actual.at(1)), 2_u32);
assert_eq!(u32::from(actual.at(2)), 1_u32);
assert_eq!(u32::from(... | rust_cleaned_test_functions.jsonl/64640 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 180
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57478,
4273,
8744,
368,
341,
262,
1077,
11943,
284,
7486,
20703,
6927,
4273,
8744,
1507,
1281,
4273,
8744,
33800,
262,
1077,
5042,
284,
78195,
2933,
1043,
486,
20164,
53322,
626,
262,
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 |
#[test]
fn test_hover_path_link_field() {
check(
r#"
pub struct Foo;
pub struct Bar {
/// [Foo](struct.Foo.html)
fie<|>ld: ()
}
"#,
expect![[r#"
*field*
```rust
test::Bar
```
```rust
... | rust_cleaned_test_functions.jsonl/66140 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 325
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53445,
2638,
7233,
5013,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
9585,
2036,
33428,
280,
9585,
2036,
4716,
341,
262,
1048,
508,
40923,
9533,
1235,
991,
2624,
2564,
340,
262,
62305,
27,
91,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_proof_of_possession() {
let issuer = CredentialIssuer::new();
let proof = issuer.create_proof_of_possession();
let pk = issuer.get_public_key();
assert!(CredentialVerifier::verify_proof_of_possession(pk, proof));
} | rust_cleaned_test_functions.jsonl/32382 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86757,
3575,
620,
3662,
1338,
368,
341,
286,
1077,
54835,
284,
93379,
98902,
486,
931,
1428,
286,
1077,
11064,
284,
54835,
2520,
86757,
3575,
620,
3662,
1338,
543,
286,
1077,
22458,
284,
54835,
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 |
#[test]
fn test_to_quarter() {
let a: PrimitiveArray<Date16Type> =
vec![Some(1), Some(59), None, Some(364)].into();
let b = date16_to_quarter(&a).unwrap();
assert_eq!(1, b.value(0));
assert_eq!(1, b.value(1));
assert_eq!(false, b.is_valid(2));
assert_... | rust_cleaned_test_functions.jsonl/109396 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 184
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
11280,
5295,
368,
341,
286,
1077,
264,
25,
51460,
1857,
98879,
16,
21,
929,
29,
4035,
310,
7486,
20703,
8373,
7,
16,
701,
4329,
7,
20,
24,
701,
2240,
11,
4329,
7,
18,
21,
19,
26169,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_translate_slice() {
// zero len
let good_data = vec![1u8, 2, 3, 4, 5];
let data: Vec<u8> = vec![];
assert_eq!(0x1 as *const u8, data.as_ptr());
let addr = good_data.as_ptr() as *const _ as u64;
let config = Config::default();
let memory_map... | rust_cleaned_test_functions.jsonl/69883 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2312
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66381,
26488,
368,
341,
286,
442,
7168,
2422,
198,
286,
1077,
1661,
1769,
284,
7486,
20703,
16,
84,
23,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
286,
1077,
821,
25,
11312,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_region_collection_seek_region() {
let mut cluster = new_node_cluster(0, 3);
let (tx, rx) = channel();
cluster
.sim
.wl()
.post_create_coprocessor_host(Box::new(move |id, host| {
let p = RegionInfoAccessor::new(host);
tx.send((id, p)).u... | rust_cleaned_test_functions.jsonl/120375 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 287
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20627,
25019,
74473,
20627,
368,
341,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
220,
18,
626,
262,
1077,
320,
3998,
11,
19111,
8,
284,
5496,
543,
262,
10652,
198,
286,
659,
147... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_learner_respond_vote() -> Result<()> {
let l = default_logger();
let mut n1 = new_test_learner_raft(1, vec![1, 2], vec![3], 10, 1, new_storage(), &l);
n1.become_follower(1, INVALID_ID);
n1.reset_randomized_election_timeout();
let mut n3 = new_test_learner_raft(3, vec![1, 2],... | rust_cleaned_test_functions.jsonl/30346 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 441
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
93595,
4918,
3511,
54360,
368,
1464,
5714,
71698,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
1077,
5206,
308,
16,
284,
501,
4452,
62,
93595,
62,
2944,
7,
16,
11,
7486,
20703,
16,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_drained_created_account() {
let GenesisConfigInfo {
mut genesis_config,
mint_keypair,
..
} = create_genesis_config_with_leader(sol_to_lamports(100.), &Pubkey::new_unique(), 42);
genesis_config.rent = Rent::default();
activate_al... | rust_cleaned_test_functions.jsonl/29014 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1569
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26680,
2627,
27288,
13500,
368,
341,
286,
1077,
40788,
2648,
1731,
341,
310,
5206,
59366,
5332,
345,
310,
28337,
3097,
12670,
345,
310,
54538,
286,
335,
284,
1855,
16322,
13774,
5332,
6615,
79991,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_poll_async_delayed_ops() {
run_in_task(|cx| {
let (mut isolate, dispatch_count) = setup(Mode::Async);
js_check(isolate.execute(
"setup2.js",
r#"
let nrecv = 0;
Deno.core.setAsyncHandler(1, (buf) => {
nrecv++;
});
"#,... | rust_cleaned_test_functions.jsonl/970 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 785
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40002,
28346,
22198,
291,
21959,
368,
341,
262,
1598,
1243,
12184,
22428,
25844,
91,
341,
414,
1077,
320,
6984,
42123,
11,
6845,
3180,
8,
284,
6505,
3189,
534,
486,
6525,
626,
414,
6994,
7200,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_ccsds_parser_push_bytes() {
let mut parser = CcsdsParser::new();
parser.recv_slice(&[0x1F,0xFF,0xFF,0xFF,0x00,0x03,0xFF,0xFF]);
assert_eq!(parser.current_status(), CcsdsParserStatus::NotEnoughBytesPacketLength);
assert_eq!(parser.pull_packet(), None);
parser.recv_sli... | rust_cleaned_test_functions.jsonl/105742 | {
"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,
28955,
82,
5356,
18517,
14218,
12524,
368,
972,
262,
1077,
5206,
6729,
284,
356,
4837,
5356,
6570,
486,
931,
1647,
262,
6729,
40433,
26488,
2099,
58,
15,
87,
16,
37,
11,
15,
9264,
11,
15,
9264... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_single_term_with_float() {
test_parse_query_to_ast_helper("abc:1.1", "\"abc\":\"1.1\"");
test_parse_query_to_ast_helper("a.b.c:1.1", "\"a.b.c\":\"1.1\"");
test_parse_query_to_ast_helper("a\\ b\\ c:1.1", "\"a b c\":\"1.1\"");
} | rust_cleaned_test_functions.jsonl/64419 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 153
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19487,
17464,
6615,
17586,
368,
341,
286,
1273,
21039,
5738,
2346,
48019,
10418,
445,
13683,
25,
16,
13,
16,
497,
15898,
13683,
23488,
16,
13,
16,
88385,
286,
1273,
21039,
5738,
2346,
48019,
10418... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_zip_composes() {
let h1 = hlist![1, "1", 1.0];
let h2 = hlist![2, "2", 2.0];
let h3 = hlist![3, "3", 3.0];
let zipped = h1.zip(h2).zip(h3);
assert_eq!(
zipped,
hlist![((1, 2), 3), (("1", "2"), "3"), ((1.0, 2.0), 3.0)],
);
... | rust_cleaned_test_functions.jsonl/41580 | {
"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,
42131,
2965,
8285,
368,
341,
286,
1077,
305,
16,
284,
305,
1607,
20703,
16,
11,
330,
16,
497,
220,
16,
13,
15,
935,
286,
1077,
305,
17,
284,
305,
1607,
20703,
17,
11,
330,
17,
497,
220,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_asn1_too_short_signature() {
assert!(Signature::from_asn1(&[]).is_err());
assert!(Signature::from_asn1(&[SEQUENCE_TAG]).is_err());
assert!(Signature::from_asn1(&[SEQUENCE_TAG, 0x00]).is_err());
assert!(Signature::from_asn1(&[SEQUENCE_TAG, 0x03, INTEGER_TAG, 0x01, ... | rust_cleaned_test_functions.jsonl/31928 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 172
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11898,
77,
16,
2346,
78,
16673,
39859,
368,
341,
286,
2060,
10297,
25088,
486,
1499,
11898,
77,
16,
2099,
1294,
568,
285,
9266,
1423,
286,
2060,
10297,
25088,
486,
1499,
11898,
77,
16,
2099,
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_cast_range_int_max() {
assert_eq!(isize::MAX.to_int(), Some(isize::MAX as isize));
assert_eq!(isize::MAX.to_i8(), None);
assert_eq!(isize::MAX.to_i16(), None);
assert_eq!(isize::MAX.to_i64(), Some(isize::MAX as i64));
assert_eq!(isize::MAX.to... | rust_cleaned_test_functions.jsonl/25356 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 493
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5303,
9698,
4042,
6345,
368,
341,
286,
2060,
10714,
10297,
285,
551,
486,
10586,
2389,
4042,
1507,
220,
4329,
9623,
551,
486,
10586,
438,
91373,
1106,
286,
2060,
10714,
10297,
285,
551,
486,
10586... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_timeseries() {
use super::TimeUnit;
let start = Epoch::from_gregorian_utc_at_midnight(2017, 1, 14);
let end = Epoch::from_gregorian_utc_at_noon(2017, 1, 14);
let step = TimeUnit::Hour * 2;
let mut count = 0;
let time_series = TimeSeries::exclusive(start, end, step);
... | rust_cleaned_test_functions.jsonl/17793 | {
"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,
22353,
4699,
368,
341,
262,
990,
2256,
486,
1462,
4562,
280,
262,
1077,
1191,
284,
87379,
486,
1499,
1889,
1580,
22090,
84259,
3752,
43733,
9287,
7,
17,
15,
16,
22,
11,
220,
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... | 3 |
#[test]
fn test_split_vfio_option() {
assert_eq!(
split_vfio_option("0000:01:00.0=02/01"),
Some(("0000:01:00.0", "02/01"))
);
assert_eq!(split_vfio_option("0000:01:00.0=02/01=rubbish"), None);
assert_eq!(split_vfio_option("0000:01:00.0"), None);
} | rust_cleaned_test_functions.jsonl/66441 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 179
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
2273,
69,
815,
9672,
368,
341,
286,
2060,
10714,
33673,
310,
6718,
2273,
69,
815,
9672,
445,
15,
15,
15,
15,
25,
15,
16,
25,
15,
15,
13,
15,
28,
15,
17,
14,
15,
16,
4461,
310,
432... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_load_collection() {
let mut collection = setup_collection();
collection.set().unwrap();
let create_data = collection.data.clone().unwrap();
// Cleanup stored data to make sure load work
collection.data = json!({}).into();
collection.load().unwrap... | rust_cleaned_test_functions.jsonl/63498 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 171
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12411,
25019,
368,
341,
286,
1077,
5206,
4426,
284,
6505,
25019,
543,
286,
4426,
980,
1005,
15454,
543,
286,
1077,
1855,
1769,
284,
4426,
2196,
15997,
1005,
15454,
1428,
286,
442,
53512,
9768,
821... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_version() {
let version: SystemVersion =
serde_json::from_str(r#""not a real version number""#).unwrap();
assert_eq!(version, SystemVersion::Opaque("not a real version number".to_owned()));
let version: SystemVersion = serde_json::from_str(r#""1.2.... | rust_cleaned_test_functions.jsonl/126051 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 180
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
9050,
9438,
368,
341,
286,
1077,
2319,
25,
739,
5637,
4035,
310,
61570,
9455,
486,
1499,
2895,
2601,
2,
3014,
1921,
264,
1931,
2319,
1372,
3014,
2,
568,
15454,
543,
286,
2060,
10714,
1029... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_after_importing_wallet_success() {
settings::set_defaults();
settings::set_config_value(settings::CONFIG_ENABLE_TEST_MODE, "false");
let wallet_name = "test_init_after_importing_wallet_success";
settings::set_config_value(settings::CONFIG_WALLET_NAME,wallet_n... | rust_cleaned_test_functions.jsonl/19805 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 780
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6137,
19844,
18434,
287,
62308,
18632,
368,
341,
286,
5003,
486,
746,
42290,
543,
286,
5003,
486,
746,
5332,
3142,
23369,
486,
24652,
14379,
11641,
8414,
11,
330,
3849,
797,
286,
1077,
15085,
1269... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_initialize_bad_recent_blockhash_state_fail() {
let nonce_address = Pubkey::new_unique();
let nonce_account = nonce_account::create_account(1_000_000).into_inner();
#[allow(deprecated)]
let blockhash_id = sysvar::recent_blockhashes::id();
process_in... | rust_cleaned_test_functions.jsonl/106224 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 556
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
40889,
34199,
62361,
7113,
8296,
4387,
22121,
368,
341,
286,
1077,
39676,
6744,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
39676,
13500,
284,
39676,
13500,
486,
3182,
13500,
7,
16,
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_relay_avrcp_ends() -> Result<(), Error> {
let mut exec = fasync::Executor::new().expect("executor needed");
let (pubisher_requests, avrcp_requests, _stop_sender, relay_fut) = setup_media_relay(None)?;
pin_mut!(relay_fut);
let res = exec.run_until_stalled(&mut r... | rust_cleaned_test_functions.jsonl/45973 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 466
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
6651,
26173,
1287,
79,
90729,
368,
1464,
5714,
68843,
4600,
29,
341,
286,
1077,
5206,
3883,
284,
282,
7692,
486,
25255,
486,
931,
1005,
17119,
445,
80787,
4362,
3071,
286,
1077,
320,
9585,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_force_leader_on_healthy_region() {
let mut cluster = new_node_cluster(0, 5);
cluster.cfg.raft_store.raft_base_tick_interval = ReadableDuration::millis(30);
cluster.cfg.raft_store.raft_election_timeout_ticks = 5;
cluster.cfg.raft_store.raft_store_max_leader_lease = ReadableDuratio... | rust_cleaned_test_functions.jsonl/6007 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 567
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40739,
79991,
4470,
62,
37028,
20627,
368,
341,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
220,
20,
317,
262,
10652,
30481,
13,
2944,
14809,
13,
2944,
7651,
43612,
20541,
284,
445... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fixed_size_list_array_builder_empty() {
let values_builder = Int32Array::builder(5);
let mut builder = FixedSizeListBuilder::new(values_builder, 3);
let arr = builder.finish();
assert_eq!(0, arr.len());
assert_eq!(0, builder.len());
} | rust_cleaned_test_functions.jsonl/30985 | {
"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,
37839,
2368,
2019,
3858,
28532,
15124,
368,
341,
286,
1077,
2750,
28532,
284,
1333,
18,
17,
1857,
486,
17850,
7,
20,
317,
286,
1077,
5206,
7363,
284,
20149,
1695,
852,
3297,
486,
931,
20103,
285... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_concurrent() {
let runtime = Builder::new_current_thread().enable_all().build().unwrap();
runtime.block_on(async move {
let pool = Arc::new(WorkerPool::<Message, Response, Processor>::new(
4,
Duration::from_millis(1000),
))... | rust_cleaned_test_functions.jsonl/37996 | {
"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,
3382,
3231,
368,
341,
286,
1077,
15592,
284,
20626,
486,
931,
11080,
10814,
1005,
12552,
5705,
1005,
5834,
1005,
15454,
1428,
286,
15592,
15697,
4470,
18285,
3271,
341,
310,
1077,
7314,
284,
19689,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_qtime_chrono() {
let chrono_time = NaiveTime::from_hms(10, 30, 50);
let qtime: QTime = chrono_time.into();
let actual_chrono_time: NaiveTime = qtime.into();
assert_eq!((10, 30, 50, 0), qtime.get_h_m_s_ms());
assert_eq!(chrono_time, actual_chrono_time);
} | rust_cleaned_test_functions.jsonl/45521 | {
"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,
8976,
1678,
4138,
2248,
78,
368,
341,
262,
1077,
80372,
3009,
284,
12812,
533,
1462,
486,
1499,
1523,
1011,
7,
16,
15,
11,
220,
18,
15,
11,
220,
20,
15,
317,
262,
1077,
2804,
1678,
25,
1207,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_key_too_long() {
let line = "a".repeat(8193);
assert_eq!(line.parse::<KeyEntry>().unwrap_err(), ParseKeyError::KeyTooLong);
} | rust_cleaned_test_functions.jsonl/31213 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 81
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3097,
2346,
78,
17799,
368,
341,
286,
1077,
1555,
284,
330,
64,
3263,
30624,
7,
23,
16,
24,
18,
317,
286,
2060,
10714,
10297,
1056,
4632,
27638,
1592,
5874,
10483,
15454,
9266,
1507,
14775,
1592... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_timeout_query_tcp() {
env_logger::try_init().ok();
let mut io_loop = Runtime::new().unwrap();
let addr: SocketAddr = ("203.0.113.0", 53)
.to_socket_addrs()
.unwrap()
.next()
.unwrap();
let (stream, sender) =
TcpClientStream::<TokioTc... | rust_cleaned_test_functions.jsonl/33948 | {
"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,
20537,
5738,
45562,
368,
341,
262,
6105,
27413,
486,
1539,
6137,
1005,
562,
543,
262,
1077,
5206,
6399,
17198,
284,
10954,
486,
931,
1005,
15454,
1428,
1066,
262,
1077,
10789,
25,
20954,
13986,
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_peer_stream_start_success() {
let mut exec = fasync::TestExecutor::new().expect("failed to create an executor");
let (remote, mut profile_request_stream, _, peer) = setup_peer_test();
let remote_seid = 2_u8.try_into().unwrap();
let codec_params = ServiceCapabil... | rust_cleaned_test_functions.jsonl/91780 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1117
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45159,
12673,
4906,
18632,
368,
341,
286,
1077,
5206,
3883,
284,
282,
7692,
486,
2271,
25255,
486,
931,
1005,
17119,
445,
16091,
311,
1855,
458,
31558,
3071,
286,
1077,
320,
18147,
11,
5206,
5526,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_partitioned_index_filters() {
let path = tempdir_with_prefix("_rust_rocksdb_set_cache_and_index");
let mut opts = DBOptions::new();
let mut cf_opts = ColumnFamilyOptions::new();
opts.create_if_missing(true);
let mut block_opts = BlockBasedOptions::new();
// See https://gi... | rust_cleaned_test_functions.jsonl/34098 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 442
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43840,
291,
3560,
22481,
368,
341,
262,
1077,
1815,
284,
2730,
3741,
6615,
13974,
16975,
35788,
26608,
14553,
1999,
2602,
11529,
8378,
3560,
797,
262,
1077,
5206,
12185,
284,
5952,
3798,
486,
931,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_union() {
let got = parse!(
r#"
union createhow4 switch (createmode4 mode) {
case GUARDED4:
fattr4 createattrs;
case EXCLUSIVE4:
verifier4 createverf;
};"#
);
assert_eq!(got.name, "createhow4");
assert_eq!(got.default,... | rust_cleaned_test_functions.jsonl/7406 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 586
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51621,
368,
341,
286,
1077,
2684,
284,
4715,
33673,
310,
435,
2,
698,
197,
73924,
1855,
5158,
19,
3398,
320,
837,
37246,
534,
19,
3856,
8,
341,
298,
2722,
45272,
934,
11490,
19,
510,
464,
1166... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_raster_direct_creation_and_clear_in_memory() {
let info = ImageInfo::new((2, 2), ColorType::RGBA8888, AlphaType::Unpremul, None);
assert_eq!(8, info.min_row_bytes());
let mut bytes: [u8; 8 * 2] = Default::default();
{
let mut canvas = Canvas::from... | rust_cleaned_test_functions.jsonl/125497 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 295
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
2300,
32871,
46163,
8378,
21811,
1243,
19195,
368,
972,
286,
1077,
3546,
284,
4654,
1731,
486,
931,
1188,
17,
11,
220,
17,
701,
3478,
929,
486,
58927,
23,
23,
23,
23,
11,
24708,
929,
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_get_header_and_dicom_tags_no_columns() {
let mut header = vec!["foo", "bar", "baz"];
let mut dicom_tags = vec!["qux", "quux", "quuz"];
get_header_and_dicom_tags(&mut header, &mut dicom_tags, None).unwrap();
assert_eq!(header, vec!["foo", "bar", "baz"]);
... | rust_cleaned_test_functions.jsonl/76511 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 191
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
8757,
8378,
39154,
316,
16333,
6536,
22590,
368,
341,
286,
1077,
5206,
4247,
284,
7486,
0,
1183,
7975,
497,
330,
2257,
497,
330,
42573,
6332,
286,
1077,
5206,
21249,
316,
16333,
284,
7486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fetch_hdu_name() {
duplicate_test_file(|filename| {
let mut f = FitsFile::open(filename).unwrap();
let hdu = f.hdu("TESTEXT").unwrap();
assert_eq!(hdu.name(&mut f).unwrap(), "TESTEXT".to_string());
});
} | rust_cleaned_test_functions.jsonl/119000 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 147
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11803,
1523,
1054,
1269,
368,
341,
286,
22513,
4452,
2458,
22428,
8404,
91,
341,
310,
1077,
5206,
282,
284,
78245,
1703,
486,
2508,
10961,
568,
15454,
543,
310,
1077,
305,
1054,
284,
282,
860,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_emphasis_pattern() {
let output = inline_parse(&String::from("*hoge*"));
assert_eq!(output, String::from(r#"<em class="flav-md-em">hoge</em>"#));
} | rust_cleaned_test_functions.jsonl/22204 | {
"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,
22504,
54149,
21260,
368,
341,
310,
1077,
2550,
284,
7381,
21039,
2099,
703,
486,
1499,
29592,
71,
40532,
9,
4010,
310,
2060,
10714,
10297,
3006,
11,
923,
486,
1499,
2601,
2,
22476,
336,
536,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_case_1() {
let input = "mask = XXXXXXXXXXXXXXXXXXXXXXXXXXXXX1XXXX0X
mem[8] = 11
mem[7] = 101
mem[8] = 0";
let memory = apply_mask_to_inputs(input);
assert_eq!(2, memory.len());
assert_eq!(&101, memory.get(&7).unwrap());
assert_eq!(&64, memory.get(&8).unwra... | rust_cleaned_test_functions.jsonl/90591 | {
"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,
19096,
62,
16,
368,
341,
286,
1077,
1946,
284,
330,
11258,
284,
19975,
61516,
61516,
61516,
6148,
16,
23830,
15,
55,
198,
10536,
58,
23,
60,
284,
220,
16,
16,
198,
10536,
58,
22,
60,
284,
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_bad_sig() {
verify_signature("", &jwk_from_tezos_key("edpkvRWhuk5cLe5vwR7TGfSJxVLmVDk5og45WAhsAAvfqQXmYKNPve").unwrap(), "edsigtk2FRtmFKJR125SZH3vRNgv6DNm4HqjBdzb736GptFRbj4Zj9fuURJQeaPyaDWT8QYv4w8scSPyTRXKSoeffpXGeagyW9G").unwrap()
} | rust_cleaned_test_functions.jsonl/76522 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 160
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34199,
29252,
368,
341,
262,
10146,
39859,
19814,
609,
73,
50522,
5673,
528,
10125,
436,
3097,
445,
291,
20819,
85,
49,
1639,
3101,
20,
66,
2304,
20,
34431,
49,
22,
76787,
69,
97489,
87,
30698,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_multi_const() {
let segments = PathParser::new("/hello/world").parse().unwrap();
assert_eq!(format!("{:?}", segments), r#"[ConstPart("hello"), ConstPart("world")]"#);
} | rust_cleaned_test_functions.jsonl/63586 | {
"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,
21039,
25133,
13610,
368,
341,
286,
1077,
20632,
284,
7933,
6570,
486,
931,
4283,
14990,
78892,
1827,
6400,
1005,
15454,
543,
286,
2060,
10714,
10297,
2243,
88928,
25,
52652,
20632,
701,
435,
2,
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 |
#[test]
fn test_fn_precedence_in_where_clause() {
let sig = quote! {
fn f<G>()
where
G: FnOnce() -> i32 + Send,
{
}
};
let fun = syn::parse2::<ItemFn>(sig).unwrap();
let where_clause = fun.decl.generics.where_clause.as_ref().unwrap();
assert_e... | rust_cleaned_test_functions.jsonl/36689 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 368
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15246,
10442,
1998,
763,
1243,
36814,
57530,
368,
341,
1066,
262,
1077,
8366,
284,
12641,
0,
341,
286,
5168,
282,
59727,
18949,
286,
1380,
198,
310,
479,
25,
50182,
12522,
368,
1464,
600,
18,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_generic_list_set() {
let gil = Python::acquire_gil();
let py = gil.python();
let list = PyCell::new(py, GenericList { items: vec![] }).unwrap();
py_run!(py, list, "list.items = [1, 2, 3]");
assert!(list
.borrow()
.items
.iter()
.zip(&[1u32, 2... | rust_cleaned_test_functions.jsonl/46922 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 203
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41232,
2019,
2602,
368,
341,
262,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
262,
1077,
4510,
284,
342,
321,
43193,
1428,
262,
1077,
1140,
284,
5355,
3599,
486,
931,
46827,
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_eval_literals() {
let state = Rc::new(RefCell::new(init_gc()));
assert_eq!(JsType::JsNum(5.0f64), eval_string("5.0;\n", state.clone()).unwrap().0.t);
assert_eq!(JsType::JsNum(0.0f64), eval_string("0.0;\n", state.clone()).unwrap().0.t);
assert_eq!(JsType::JsUndef, ... | rust_cleaned_test_functions.jsonl/118084 | {
"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,
21296,
49643,
368,
341,
286,
1077,
1584,
284,
81463,
486,
931,
7,
3945,
3599,
486,
931,
38250,
49423,
7392,
286,
2060,
10714,
10297,
30480,
929,
486,
30480,
4651,
7,
20,
13,
15,
69,
21,
19,
70... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mapper() {
let mut builder = RomBuilder::new();
assert_eq!(builder.build_rom().mapper(), 0x00u8);
builder.set_mapper(0x0Au8);
assert_eq!(builder.build_rom().mapper(), 0x0Au8);
builder.set_mapper(0xF0u8);
assert_eq!(builder.build_rom().map... | rust_cleaned_test_functions.jsonl/104410 | {
"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,
76664,
368,
972,
286,
1077,
5206,
7363,
284,
11774,
3297,
486,
931,
1647,
286,
2060,
10714,
10297,
17850,
13239,
81383,
1005,
38076,
1507,
220,
15,
87,
15,
15,
84,
23,
3079,
286,
7363,
980,
7666... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_box_slice_writer() {
let mut writer = Cursor::new(vec![0u8; 9].into_boxed_slice());
assert_eq!(writer.position(), 0);
assert_eq!(writer.write(&[0]).unwrap(), 1);
assert_eq!(writer.position(), 1);
assert_eq!(writer.write(&[1, 2, 3]).unwrap(), 3);
as... | rust_cleaned_test_functions.jsonl/4220 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 353
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10194,
26488,
28908,
368,
341,
286,
1077,
5206,
6916,
284,
28067,
486,
931,
25592,
20703,
15,
84,
23,
26,
220,
24,
936,
18122,
10194,
291,
26488,
1423,
286,
2060,
10714,
10297,
18189,
6187,
1507,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_wait_duration_is_capped() {
let config = config_generator();
let mut timer = MockTimer::new();
// The timer should be capped at 1 hour. The MockTimer will assert if it's asked to wait
// a different amount of time.
timer.expect(Duration::from_secs(1 * 60 ... | rust_cleaned_test_functions.jsonl/104623 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 861
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18760,
25454,
6892,
666,
5677,
368,
341,
286,
1077,
2193,
284,
2193,
25813,
543,
286,
1077,
5206,
9021,
284,
14563,
10105,
486,
931,
543,
286,
442,
576,
9021,
1265,
387,
60146,
518,
220,
16,
646... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_invalid_get() {
let (mut sender, receiver) = UnixStream::pair().unwrap();
let mut connection = HttpConnection::new(receiver);
sender
.write_all(http_request("GET", "/mmds", Some("body")).as_bytes())
.unwrap();
assert!(connection.try_read().... | rust_cleaned_test_functions.jsonl/106565 | {
"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,
31433,
3062,
368,
341,
286,
1077,
320,
6984,
4646,
11,
13964,
8,
284,
46995,
3027,
486,
12670,
1005,
15454,
543,
286,
1077,
5206,
3633,
284,
4823,
4526,
486,
931,
78126,
317,
286,
4646,
198,
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... | 2 |
#[test]
fn test_machine() {
let mut factory = MockLoop::new(());
let m = M(10);
let mut value = None;
Machine::wakeup(m, &mut factory.scope(1)).wrap(|x| value = Some(x));
assert_eq!(value, Some(M(11)));
} | rust_cleaned_test_functions.jsonl/24454 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 125
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38695,
368,
341,
286,
1077,
5206,
8633,
284,
14563,
14620,
486,
931,
7,
1423,
286,
1077,
296,
284,
386,
7,
16,
15,
317,
286,
1077,
5206,
897,
284,
2240,
280,
286,
12960,
486,
86,
62744,
1255,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_subtract_ristretto() {
// identity
let identity = PodRistrettoPoint(RistrettoPoint::identity().compress().to_bytes());
let point = PodRistrettoPoint([
210, 174, 124, 127, 67, 77, 11, 114, 71, 63, 168, 136, 113, 20, 141, 228, 195, 254,
232, 229,... | rust_cleaned_test_functions.jsonl/15618 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1058
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
5228,
2144,
1710,
380,
2122,
983,
368,
341,
286,
442,
9569,
198,
286,
1077,
9569,
284,
16821,
49,
380,
2122,
983,
2609,
2785,
380,
2122,
983,
2609,
486,
16912,
1005,
38360,
1005,
983,
1252... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_add_setter() {
let mut a = Ts {jaf: 4, field_1: 0, field_2: String::from("hello")};
a.set_field_1(14);
assert_eq!(a.field_1, 14);
} | rust_cleaned_test_functions.jsonl/24666 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 85
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
2602,
465,
368,
341,
262,
1077,
5206,
264,
284,
25076,
314,
73,
2577,
25,
220,
19,
11,
2070,
62,
16,
25,
220,
15,
11,
2070,
62,
17,
25,
923,
486,
1499,
445,
14990,
899,
2440,
262,
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_debug_impl() {
let secret_key = SecretKey::generate();
let initial_state = HmacSha256::new(&secret_key);
let debug = format!("{:?}", initial_state);
let expected = "HmacSha256 { _state: Hmac { working_hasher: [***OMITTED***], opad_hasher: [***OMITT... | rust_cleaned_test_functions.jsonl/63000 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 203
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15446,
21007,
368,
341,
310,
1077,
6234,
3097,
284,
8599,
1592,
486,
19366,
543,
310,
1077,
2856,
4387,
284,
472,
11948,
62316,
17,
20,
21,
486,
931,
2099,
20474,
3097,
317,
310,
1077,
7390,
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_iltag_serialize() {
let mut writer = VecWriter::new();
let tag = DummyTag::new(15, 4);
assert!(tag.serialize(writer.as_writer()).is_ok());
assert_eq!(writer.as_slice(), &[0x0F, 0x00, 0x01, 0x02, 0x03]);
// Explicity tag
let mut writer = VecWriter::new();
let tag = ... | rust_cleaned_test_functions.jsonl/25689 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 369
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
2963,
351,
88686,
368,
341,
262,
1077,
5206,
6916,
284,
11312,
6492,
486,
931,
1428,
262,
1077,
4772,
284,
50567,
5668,
486,
931,
7,
16,
20,
11,
220,
19,
317,
262,
2060,
10297,
4578,
33969... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_session2_domain() -> Result<(), Error> {
let mut exec = fasync::Executor::new().expect("executor needed");
let domain = Some("domain://test".to_string());
let (pubisher_requests, avrcp_requests, _stop_sender, relay_fut) =
setup_media_relay(domain.clone())?;
... | rust_cleaned_test_functions.jsonl/45978 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 355
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12316,
17,
20111,
368,
1464,
5714,
68843,
4600,
29,
341,
286,
1077,
5206,
3883,
284,
282,
7692,
486,
25255,
486,
931,
1005,
17119,
445,
80787,
4362,
3071,
286,
1077,
7947,
284,
4329,
445,
12204,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_nfc_chars() {
macro_rules! t {
($input: expr, $expected: expr) => {
assert_eq!($input.nfc_chars().collect::<String>(), $expected.into_string());
}
}
t!("abc", "abc");
t!("\u1e0b\u01c4", "\u1e0b\u01c4");
t!("\u2026", ... | rust_cleaned_test_functions.jsonl/56857 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 423
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
8316,
37418,
368,
341,
286,
18072,
21407,
0,
259,
341,
310,
1711,
1355,
25,
15169,
11,
400,
7325,
25,
15169,
8,
589,
341,
394,
2060,
10714,
0,
699,
1355,
1253,
8316,
37418,
1005,
17384,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ip_address_config() {
let test_config = create_test_config_no_paths();
let ipconfig = IpAddress {
dhcp_client: Some(false),
cidr_address: Some(CidrAddress {
ip: NetIpAddr("127.0.0.1".parse().unwrap()),
prefix_length: 32,... | rust_cleaned_test_functions.jsonl/83816 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1004
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
10385,
6744,
5332,
368,
341,
286,
1077,
1273,
5332,
284,
1855,
4452,
5332,
6536,
24152,
543,
286,
1077,
5997,
1676,
284,
35033,
4286,
341,
310,
85787,
8179,
25,
4329,
3576,
1326,
310,
32141,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_div() {
let vals = vec![
("2", "1", "2"),
("2e1", "1", "20"),
("1", "2", "0.5"),
("1", "2e-2", "5e1"),
("5", "4", "1.25"),
("5", "4", "125e-2"),
("100", "5", "20"),
("-50", "5", "-10"),
... | rust_cleaned_test_functions.jsonl/75814 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 517
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16237,
368,
341,
286,
1077,
28356,
284,
7486,
90515,
310,
3489,
17,
497,
330,
16,
497,
330,
17,
4461,
310,
3489,
17,
68,
16,
497,
330,
16,
497,
330,
17,
15,
4461,
310,
3489,
16,
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... | 2 |
#[test]
fn test_bytewise_carriage_return_is_not_word_boundary() {
new_ucmd!()
.args(&["-w6", "-s", "-b"])
.pipe_in("fizz\rbuzz\rfizzbuzz") // spell-checker:disable-line
.succeeds()
.stdout_is("fizz\rb\nuzz\rfi\nzzbuzz"); // spell-checker:disable-line
} | rust_cleaned_test_functions.jsonl/74358 | {
"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,
3710,
83,
24350,
26616,
8775,
12511,
6892,
7913,
13533,
54004,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
12,
86,
21,
497,
6523,
82,
497,
6523,
65,
14108,
286,
659,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_multipart() {
run_on(|| {
let (sender, payload) = create_stream();
let (bytes, headers) = create_simple_request_with_header();
sender.unbounded_send(Ok(bytes)).unwrap();
let mut multipart = Multipart::new(&headers, payload);
m... | rust_cleaned_test_functions.jsonl/43763 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1185
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
18204,
368,
341,
286,
1598,
4470,
79453,
341,
310,
1077,
320,
11644,
11,
7729,
8,
284,
1855,
12673,
543,
310,
1077,
320,
9651,
11,
7102,
8,
284,
1855,
30015,
7893,
6615,
8757,
1428,
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... | 9 |
#[test]
fn test_subprocesses() {
#[cfg(target_os="macos")]
{
// We need root permissions here to run this on OSX
if unsafe { libc::geteuid() } != 0 {
return;
}
}
// We used to not be able to create a sampler object if one of the child processes
// was in ... | rust_cleaned_test_functions.jsonl/11295 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 387
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
4630,
288,
368,
341,
262,
11506,
14072,
8637,
29387,
428,
11948,
436,
5422,
262,
341,
286,
442,
1205,
1184,
3704,
8541,
1588,
311,
1598,
419,
389,
87746,
198,
286,
421,
19860,
314,
42142,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parse_include_subdomains() {
let r: Raw = "max-age=15768000 ; includeSubDomains".into();
let h = Header::parse_header(&r);
assert_eq!(h.ok(), Some(StrictTransportSecurity { include_subdomains: true, max_age: 15768000u64 }));
} | rust_cleaned_test_functions.jsonl/58564 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
37878,
5228,
59621,
368,
341,
286,
1077,
435,
25,
23022,
284,
330,
2810,
42941,
28,
16,
20,
22,
21,
23,
15,
15,
15,
2587,
2924,
3136,
74713,
3263,
18122,
543,
286,
1077,
305,
284,
12104... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unbound_parameters_are_reused() {
let db = Connection::open_in_memory().unwrap();
let sql = "CREATE TABLE test (x TEXT, y TEXT)";
db.execute_batch(sql).unwrap();
let mut stmt = db
.prepare("INSERT INTO test (x, y) VALUES (:x, :y)")
.unwrap... | rust_cleaned_test_functions.jsonl/57178 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 337
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
10891,
18263,
56855,
1288,
2591,
368,
341,
286,
1077,
2927,
284,
11032,
486,
2508,
1243,
19195,
1005,
15454,
543,
286,
1077,
5704,
284,
330,
22599,
14363,
1273,
320,
87,
15762,
11,
379,
1576... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_coinbase_and_bip34() {
let block_hex = "0200000035ab154183570282ce9afc0b494c9fc6a3cfea05aa8c1add2ecc56490000000038ba3d78e4500a5a7570dbe61960398add4410d278b21cd9708e6d9743f374d544fc055227f1001c29c1ea3b0101000000010000000000000000000000000000000000000000000000000000000000000000fff... | rust_cleaned_test_functions.jsonl/116650 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 734
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75718,
3152,
8378,
880,
573,
18,
19,
368,
341,
1789,
286,
1077,
2504,
32655,
284,
330,
15,
17,
15,
15,
15,
15,
15,
15,
18,
20,
370,
16,
20,
19,
16,
23,
18,
20,
22,
15,
17,
23,
17,
346,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hour_24_clock_under_12() {
let context = build_context(Moment(Paris.ymd(2017, 04, 25).and_hms(9, 10, 11)));
let constraint = Hour::clock_24(11);
let walker = constraint.unwrap().to_walker(&context.reference, &context);
assert_eq!(Some(Interval::starting_at(Moment... | rust_cleaned_test_functions.jsonl/114668 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 628
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32292,
62,
17,
19,
23062,
58228,
62,
16,
17,
368,
341,
286,
1077,
2266,
284,
1936,
8467,
3189,
12913,
7,
59604,
13,
1600,
67,
7,
17,
15,
16,
22,
11,
220,
15,
19,
11,
220,
17,
20,
568,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_truncated_client_extension_is_detected() {
let chp = get_sample_clienthellopayload();
for ext in &chp.extensions {
let mut enc = ext.get_encoding();
println!("testing {:?} enc {:?}", ext, enc);
// the input
for l in 0..enc.len() {
as... | rust_cleaned_test_functions.jsonl/100972 | {
"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,
3547,
38007,
8179,
31035,
6892,
98876,
368,
341,
262,
1077,
521,
79,
284,
633,
17491,
8179,
14990,
19427,
1428,
262,
369,
1303,
304,
609,
331,
79,
48439,
341,
286,
1077,
5206,
3209,
284,
1303,
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... | 5 |
#[test]
fn test_try_from_message() {
let legacy_message_with_no_signers = LegacyMessage {
account_keys: vec![Pubkey::new_unique()],
..LegacyMessage::default()
};
assert_eq!(
SanitizedMessage::try_from(legacy_message_with_no_signers).err(),
... | rust_cleaned_test_functions.jsonl/119821 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 186
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
5673,
6462,
368,
341,
286,
1077,
19588,
6462,
6615,
6536,
11172,
388,
284,
37887,
2052,
341,
310,
2692,
12631,
25,
7486,
20703,
29162,
792,
486,
931,
21218,
73845,
310,
5241,
77415,
2052,
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_stft_pad_truncate_basic_2() {
_test_stft(10, 7, Some(2), None, None, PadMode::Truncate).unwrap();
} | rust_cleaned_test_functions.jsonl/104783 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 62
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1261,
723,
30290,
3547,
26900,
34729,
62,
17,
368,
341,
262,
716,
1944,
1261,
723,
7,
16,
15,
11,
220,
22,
11,
4329,
7,
17,
701,
2240,
11,
2240,
11,
25299,
3636,
486,
1282,
26900,
568,
15454... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_updates() -> Result<(), Box<dyn Error>> {
setup();
let client = JsonClient::new();
let updates = client.updates()?;
log::debug!("updates = {:?}", updates);
Ok(())
} | rust_cleaned_test_functions.jsonl/106543 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57829,
368,
1464,
5714,
68843,
8261,
92846,
4600,
2452,
341,
286,
6505,
1428,
286,
1077,
2943,
284,
8308,
2959,
486,
931,
543,
286,
1077,
8837,
284,
2943,
17652,
6394,
94136,
286,
1487,
486,
8349,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_str() {
let inputs = vec![
String::from("\"hello\""),
String::from("\"a\""),
String::from("\"\\\\\""),
];
let expected_tokens = inputs
.iter()
.map(|s| Token::new(TokenKind::STRING, s, 0, s.len()))
... | rust_cleaned_test_functions.jsonl/83956 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 350
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
2895,
368,
341,
286,
1077,
11127,
284,
7486,
90515,
310,
923,
486,
1499,
38915,
14990,
2105,
4461,
310,
923,
486,
1499,
38915,
64,
2105,
4461,
310,
923,
486,
1499,
38915,
51007,
2105,
4461,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_cast_enum_as_time() {
test_none_with_ctx_and_extra(cast_enum_as_time);
let mut ctx = EvalContext::default();
let cs = vec![
(
EnumRef::new("20190916101112".as_bytes(), &1),
Time::parse(
&mut ctx,... | rust_cleaned_test_functions.jsonl/103221 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1677
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5303,
31054,
11898,
3009,
368,
341,
286,
1273,
31488,
6615,
15147,
8378,
31858,
1337,
559,
31054,
11898,
3009,
317,
286,
1077,
5206,
5635,
284,
58239,
1972,
486,
2258,
543,
286,
1077,
10532,
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... | 3 |
#[test]
fn test_query_and_then_custom_error_fails() -> Result<()> {
let db = checked_memory_handle();
let sql = "BEGIN;
CREATE TABLE foo(x INTEGER, y TEXT);
INSERT INTO foo VALUES(4, 'hello');
INSERT INTO foo VALUES(3, ... | rust_cleaned_test_functions.jsonl/113071 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 892
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
8378,
68367,
15875,
4096,
761,
6209,
368,
1464,
5714,
71698,
341,
310,
1077,
2927,
284,
10067,
19195,
10630,
543,
310,
1077,
5704,
284,
330,
37588,
280,
5180,
30776,
14363,
15229,
2075,
30381,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_keywords() {
let source = "and
class
else
for
fun
if
or
print
return
super
this
var
while"
.to_owned();
let scanner = Scanner::new();
assert_eq!(
Ok(ve... | rust_cleaned_test_functions.jsonl/92094 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2393
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51354,
368,
341,
286,
1077,
2530,
284,
330,
437,
198,
286,
536,
198,
286,
770,
198,
286,
369,
198,
286,
2464,
198,
286,
421,
198,
286,
476,
198,
286,
1173,
198,
286,
470,
198,
286,
2256,
198... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_tags_and_categories() -> Result<()> {
let temp_dir = tempdir::TempDir::new(&format!(
"temp_rand_index_{}",
uuid::Uuid::new_v4().to_string()
))?;
let (posts, index) = build_random_posts_index(10, temp_dir.path())?;
let (mut tags, mut ca... | rust_cleaned_test_functions.jsonl/67718 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 554
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
16333,
8378,
27542,
368,
1464,
5714,
71698,
341,
286,
1077,
2730,
4334,
284,
2730,
3741,
486,
12151,
6184,
486,
931,
2099,
2243,
33673,
310,
330,
3888,
33864,
3560,
62,
6257,
756,
310,
16040... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_convert_timestamp_to_string() {
fn check_datetime_conversion(y: u32, m: u32, d: u32, h: u32, mi: u32, s: u32) {
let datetime = chrono::NaiveDate::from_ymd(y as i32, m, d).and_hms(h, mi, s);
let dt = Local.from_utc_datetime(&datetime);
let res = convert_timestamp_to_string(d... | rust_cleaned_test_functions.jsonl/43803 | {
"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,
34910,
23073,
2346,
3904,
368,
341,
262,
5168,
1779,
28943,
64132,
7021,
25,
575,
18,
17,
11,
296,
25,
575,
18,
17,
11,
294,
25,
575,
18,
17,
11,
305,
25,
575,
18,
17,
11,
9497,
25,
575,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_waypoint_li_verification() {
let empty_li = LedgerInfo::new(BlockInfo::empty(), HashValue::zero());
assert!(Waypoint::new(&empty_li).is_err()); // no validator set in empty LI
let li = LedgerInfo::new(
BlockInfo::new(
1,
10,
... | rust_cleaned_test_functions.jsonl/17488 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 350
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48936,
2768,
50450,
84245,
368,
341,
286,
1077,
4287,
50450,
284,
70306,
1731,
486,
931,
55243,
1731,
486,
3194,
1507,
6531,
1130,
486,
14154,
1423,
286,
2060,
10297,
35054,
2768,
486,
931,
2099,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_openwall_test_vectors() {
let tests = openwall_test_vectors();
let mut output = [0u8; 24];
for test in tests.iter() {
bcrypt(test.cost, &test.salt[..], &test.input[..], &mut output[..]);
assert!(output[0..23] == test.output[..]);
}
} | rust_cleaned_test_functions.jsonl/99227 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 159
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11311,
16431,
4452,
49158,
368,
341,
286,
1077,
7032,
284,
1787,
16431,
4452,
49158,
543,
286,
1077,
5206,
2550,
284,
508,
15,
84,
23,
26,
220,
17,
19,
935,
286,
369,
1273,
304,
7032,
19471,
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... | 2 |
#[test]
fn test_scalar_add() {
fn check(x: &BigUint, y: &BigUint, z: &BigUint) {
let (x, y, z) = (x.clone(), y.clone(), z.clone());
assert_unsigned_scalar_op!(x + y == z);
}
for elm in SUM_TRIPLES.iter() {
let (a_vec, b_vec, c_vec) = *elm;
let a = BigUint::from_slice... | rust_cleaned_test_functions.jsonl/114162 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 266
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41652,
2891,
368,
341,
262,
5168,
1779,
2075,
25,
609,
15636,
21570,
11,
379,
25,
609,
15636,
21570,
11,
1147,
25,
609,
15636,
21570,
8,
341,
286,
1077,
320,
87,
11,
379,
11,
1147,
8,
284,
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_normal_transfer() {
let mut status = MigrationStatus::None;
// None to Setup.
assert!(status.transfer(MigrationStatus::Setup).is_ok());
status = status.transfer(MigrationStatus::Setup).unwrap();
// Setup to Active.
assert!(status.transfer(Migrati... | rust_cleaned_test_functions.jsonl/88595 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 553
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13973,
35403,
368,
341,
286,
1077,
5206,
2639,
284,
21248,
2522,
486,
4064,
401,
286,
442,
2240,
311,
18626,
624,
286,
2060,
10297,
2829,
49428,
3189,
5033,
2522,
486,
21821,
568,
285,
19817,
1423... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_welcome_commit_process() {
let (creator_kp, creator_secret) = get_fake_keypackage();
let (to_be_added, to_be_added_secret) = get_fake_keypackage();
let (mut creator_group, adds, commit, welcome) = GroupAux::init_group(
creator_kp,
creator_secret,
... | rust_cleaned_test_functions.jsonl/25583 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 470
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1670,
5717,
36346,
11305,
368,
341,
286,
1077,
320,
32398,
4698,
79,
11,
19919,
21962,
8,
284,
633,
56881,
3097,
1722,
543,
286,
1077,
320,
983,
21263,
37653,
11,
311,
21263,
37653,
21962,
8,
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_detect_static_or_dynamic_property() {
use azul_css::{CssProperty, StyleTextAlignmentHorz};
use css_parser::InvalidValueErr;
assert_eq!(
determine_static_or_dynamic_css_property(CssPropertyType::TextAlign, " center "),
Ok(CssDeclaration::Static(CssProperty::Text... | rust_cleaned_test_functions.jsonl/79849 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1260
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
56457,
25360,
8734,
45992,
16638,
368,
972,
262,
990,
12376,
360,
25924,
22964,
40275,
3052,
11,
11913,
1178,
7033,
39601,
89,
15414,
262,
990,
15877,
18517,
486,
7928,
1130,
7747,
463,
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_header_deserialisation_raises_error_if_hash_changed() {
let nonce = vec![1,2,3,4,5];
let salt = _get_test_salt();
let header = Header::new(1, "TEST_ENCRYPTION_METHOD", &nonce, salt);
let mut serialised_header = header.serialise().unwrap();
let index = ser... | rust_cleaned_test_functions.jsonl/106125 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 319
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8757,
15768,
2848,
7923,
88840,
4096,
11119,
8950,
25213,
368,
341,
286,
1077,
39676,
284,
7486,
20703,
16,
11,
17,
11,
18,
11,
19,
11,
20,
935,
286,
1077,
12021,
284,
716,
455,
4452,
92280,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_receiving_router_solicitation_validity_check() {
let config = get_dummy_config::<Ipv6Addr>();
let src_ip = Ipv6Addr::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 168, 0, 10]);
let src_mac = [10, 11, 12, 13, 14, 15];
let options = vec![NdpOption::SourceLinkLayerAd... | rust_cleaned_test_functions.jsonl/16141 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1502
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
46344,
55587,
643,
7762,
7556,
8337,
487,
7200,
368,
341,
286,
1077,
2193,
284,
633,
60321,
5332,
27638,
80656,
21,
13986,
3913,
286,
1077,
2286,
10385,
284,
358,
30168,
21,
13986,
486,
931,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_write_u32() {
fn get_written(num: u32) -> Vec<u8> {
let mut buf = io::Cursor::new(Vec::new());
buf.write_u32(num).unwrap();
buf.into_inner()
}
assert_eq!(get_written(0x0), vec![0, 0, 0, 0]);
assert_eq!(get_written(0x1), vec![0,... | rust_cleaned_test_functions.jsonl/76521 | {
"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,
9165,
7300,
18,
17,
368,
341,
286,
5168,
633,
72403,
8068,
25,
575,
18,
17,
8,
1464,
11312,
34837,
23,
29,
341,
310,
1077,
5206,
6607,
284,
6399,
486,
14543,
486,
931,
49923,
486,
931,
1423,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_chain_6() {
let config1 = r#"
{
"inbounds": [
{
"protocol": "socks",
"address": "127.0.0.1",
"port": 1086
}
],
"outbounds": [
{
"protocol": "chain",
... | rust_cleaned_test_functions.jsonl/95208 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2056
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6068,
30583,
62,
21,
368,
341,
262,
1077,
2193,
16,
284,
435,
2,
698,
262,
341,
286,
330,
258,
34019,
788,
2278,
310,
341,
394,
330,
17014,
788,
330,
13199,
82,
756,
394,
330,
4995,
788,
330... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_uint256() {
assert_eq!(BIGGEST_UINT.bits(), 256);
assert!(
BIGGEST_UINT.checked_add(&Uint256::from(1u32)).is_none(),
"should return None adding 1 to biggest"
);
assert!(
BIGGEST_UINT.checked_add(&Uint256::from(0u32)).is_some(),
"should return Some... | rust_cleaned_test_functions.jsonl/118527 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 559
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15807,
17,
20,
21,
368,
341,
262,
2060,
10714,
10297,
67017,
81757,
27241,
38440,
1507,
220,
17,
20,
21,
317,
262,
2060,
33673,
286,
36854,
81757,
27241,
29101,
2891,
2099,
21570,
17,
20,
21,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_implied_am() {
let mut cpu = setup(0x0000, false, 0x08, None);
cpu.regset_mut().set_accumulator(0x1A);
let result = implied_am(&mut cpu);
assert_eq!(result.ok(), Some(ValueOnly(0x1A)));
assert_eq!(cpu.pc(), 0x0000);
} | rust_cleaned_test_functions.jsonl/26572 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 144
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17895,
3440,
22880,
368,
341,
286,
1077,
5206,
17319,
284,
6505,
7,
15,
87,
15,
15,
15,
15,
11,
895,
11,
220,
15,
87,
15,
23,
11,
2240,
317,
286,
17319,
7031,
746,
29523,
1005,
746,
75837,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fifo_line_writer() {
let log_file_temp =
TempFile::new().expect("Failed to create temporary output logging file.");
let good_file = log_file_temp.as_path().to_path_buf();
let maybe_fifo = open_file_nonblock(&good_file);
assert!(maybe_fifo.is_ok());
... | rust_cleaned_test_functions.jsonl/4582 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 237
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
56590,
6528,
28908,
368,
341,
286,
1077,
1487,
2458,
11771,
4035,
310,
19944,
1703,
486,
931,
1005,
17119,
445,
9408,
311,
1855,
13340,
2550,
8392,
1034,
7320,
286,
1077,
1661,
2458,
284,
1487,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.