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_decimal_null() {
let a = create_decimal_array(&[Some(8_887_000_000), None, Some(-8_887_000_000)]);
let b = create_decimal_array(&[Some(8_887_000_000), None, Some(-8_887_000_000)]);
test_equal(a.as_ref(), b.as_ref(), true);
let b = create_decimal_array(&[Some(8_88... | rust_cleaned_test_functions.jsonl/46955 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 270
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74429,
15162,
368,
341,
286,
1077,
264,
284,
1855,
74429,
3858,
2099,
58,
8373,
7,
23,
62,
23,
23,
22,
62,
15,
15,
15,
62,
15,
15,
15,
701,
2240,
11,
4329,
4080,
23,
62,
23,
23,
22,
62,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_block_impacted_by_ray() {
let mut map = chunk_map();
assert_eq!(
block_impacted_by_ray(&map, vec3(0.0, 65.0, 0.0), vec3(0.0, -1.0, 0.0), 5.0),
Some(RayImpact {
block: BlockPosition::new(0, 64, 0),
pos: position!(0.0, 65.0, ... | rust_cleaned_test_functions.jsonl/130412 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 680
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7113,
36788,
22167,
3710,
72690,
368,
341,
286,
1077,
5206,
2415,
284,
11879,
5376,
1428,
286,
2060,
10714,
33673,
310,
2504,
36788,
22167,
3710,
72690,
2099,
2186,
11,
7486,
18,
7,
15,
13,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_none_if_disabled() {
let expected = None;
let actual = ModuleRenderer::new("container")
// For a custom config
.config(toml::toml! {
[container]
disabled = true
})
// Run the module and collect the outp... | rust_cleaned_test_functions.jsonl/23794 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 199
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31488,
11119,
51401,
368,
341,
286,
1077,
3601,
284,
2240,
280,
286,
1077,
5042,
284,
13711,
11541,
486,
931,
445,
3586,
1138,
310,
442,
1752,
264,
2526,
2193,
198,
310,
659,
1676,
1155,
316,
75... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_format_parse() {
let fmt = "Hello, my name is %s and I'm %d years old";
let expected = Ok(CFormatString {
format_parts: vec![
(0, CFormatPart::Literal("Hello, my name is ".to_string())),
(
18,
CFo... | rust_cleaned_test_functions.jsonl/37690 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 994
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8955,
21039,
368,
341,
286,
1077,
8879,
284,
330,
9707,
11,
847,
829,
374,
1018,
82,
323,
358,
2776,
1018,
67,
1635,
2310,
876,
286,
1077,
3601,
284,
7622,
3025,
4061,
703,
341,
310,
3561,
332... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_full_profile() {
let base_path = expand_tilde(&PathBuf::from("~/data")).unwrap();
let last_offset_file = PathBuf::from("consumer.offset");
let profile_path = get_base_dir().join(PROFILE_FULL);
let profile_file = Config::load(&profile_path);
if let Err(err... | rust_cleaned_test_functions.jsonl/99223 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 830
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16372,
13789,
368,
341,
286,
1077,
2331,
2638,
284,
9225,
528,
34276,
2099,
1820,
15064,
486,
1499,
50919,
691,
15197,
15454,
543,
286,
1077,
1537,
6917,
2458,
284,
7933,
15064,
486,
1499,
445,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_vec143_2() -> Result<()> {
zebra_test::init();
let transaction = ZIP143_2.zcash_deserialize_into::<Transaction>()?;
let value = hex::decode("2f6e04963b4c0100")?.zcash_deserialize_into::<Amount<_>>()?;
let lock_script = Script(hex::decode("0153")?);
let i... | rust_cleaned_test_functions.jsonl/58441 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1282
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
16,
19,
18,
62,
17,
368,
1464,
5714,
71698,
341,
286,
1147,
50213,
4452,
486,
2327,
1428,
286,
1077,
7745,
284,
56674,
16,
19,
18,
62,
17,
3938,
41271,
15768,
9050,
45514,
27638,
8070,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_add_block_listener() -> Result<(), String> {
let keypair = identity::ed25519::Keypair::generate();
let block = Block::new(
HashDigest::new(b"Hello World!"),
1u128,
Vec::new(),
&keypair,
);
let mut chain = Blockchain:... | rust_cleaned_test_functions.jsonl/47214 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 427
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
7113,
46493,
368,
1464,
5714,
68843,
923,
29,
341,
286,
1077,
1376,
12670,
284,
9569,
486,
291,
17,
20,
20,
16,
24,
486,
6608,
1082,
1310,
486,
19366,
543,
286,
1077,
2504,
284,
8362,
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_fib2() {
test(vec![1, 1], vec![1, 1, 2, 3, 5, 8, 13, 21, 34, 55]);
} | rust_cleaned_test_functions.jsonl/47927 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 64
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
579,
17,
368,
341,
286,
1273,
25592,
20703,
16,
11,
220,
16,
1125,
7486,
20703,
16,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
20,
11,
220,
23,
11,
220,
16,
18,
11,
220,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_valid_cast_to_string_after_parse() {
init();
for (raw_schema, _) in VALID_EXAMPLES.iter() {
let schema = Schema::parse_str(raw_schema).unwrap();
Schema::parse_str(schema.canonical_form().as_str()).unwrap();
}
} | rust_cleaned_test_functions.jsonl/69026 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 122
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8337,
5303,
2346,
3904,
19844,
21039,
368,
341,
262,
2930,
543,
262,
369,
320,
1041,
25371,
11,
27439,
304,
43291,
4966,
18918,
50,
19471,
368,
341,
286,
1077,
10802,
284,
12539,
486,
6400,
2895,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_response_attestation_service_failure_no_retries() {
// build a faulty request
let service: AttestationService = AttestationService::new_with_retries(attestation_service::constants::ATTESTATION_SERVICE_URL, 0);
let quote = String::from("Wrong quote");
let as_respon... | rust_cleaned_test_functions.jsonl/124220 | {
"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,
9655,
13356,
63978,
12267,
43618,
6536,
1288,
4543,
368,
341,
286,
442,
1936,
264,
57571,
1681,
198,
286,
1077,
2473,
25,
2411,
1944,
367,
1860,
284,
2411,
1944,
367,
1860,
486,
931,
6615,
1288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nested_pattern_string_error() {
let tokens = util::tok::tokenize("\"not matched\"")
.into_iter()
.map(|t| t.1);
let err = nested::EParser::new()
.parse(tokens.into_iter())
.unwrap_err();
match err {
ParseError::UnrecognizedToken { token, expect... | rust_cleaned_test_functions.jsonl/27441 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 244
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66279,
21260,
3904,
4096,
368,
341,
262,
1077,
11211,
284,
4094,
486,
29594,
486,
5839,
551,
38915,
1921,
18054,
2105,
1138,
286,
659,
18122,
11723,
741,
286,
659,
2186,
22428,
83,
91,
259,
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... | 2 |
#[test]
fn test_bit_and() {
let cases = vec![
(Some(123), Some(321), Some(65)),
(Some(-123), Some(321), Some(257)),
(None, Some(1), None),
(Some(1), None, None),
(None, None, None),
];
for (lhs, rhs, expected) in cases {
... | rust_cleaned_test_functions.jsonl/29753 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 338
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13996,
8378,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
320,
8373,
7,
16,
17,
18,
701,
4329,
7,
18,
17,
16,
701,
4329,
7,
21,
20,
6965,
310,
320,
8373,
4080,
16,
17,
18,
701,
4329,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_code_with_tabwidth8() {
let mut reader = Reader::from_string("<<code>>", "1\t2\n1234567\t8\n12345678\t9");
reader.set_tabwidth(8);
let mut reader = Lexer::new(reader);
assert_tok(
&mut reader,
TokenKind::LitInt("1".into(), IntBase::Dec, In... | rust_cleaned_test_functions.jsonl/101130 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 737
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4136,
6615,
17344,
3098,
23,
368,
341,
286,
1077,
5206,
6604,
284,
25166,
486,
1499,
3904,
445,
2442,
1851,
2452,
497,
330,
16,
4955,
17,
1699,
16,
17,
18,
19,
20,
21,
22,
4955,
23,
1699,
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_execute_redeem_fails_with_unauthorized_vault() {
run_test(|| {
Redeem::get_redeem_request_from_id.mock_safe(|_| {
MockResult::Return(Ok(RedeemRequest {
vault: BOB,
opentime: 0,
amount_polka_btc: 0,
amount_btc... | rust_cleaned_test_functions.jsonl/26924 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 515
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44329,
1288,
450,
336,
761,
6209,
6615,
4907,
19084,
2273,
945,
368,
341,
262,
1598,
4452,
79453,
341,
286,
72131,
336,
486,
455,
1288,
450,
336,
7893,
5673,
842,
15068,
34067,
22428,
35395,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_line_number_format_regex_6() {
assert_eq!(
parse_line_number_format("__{nm:<3}@@---{np:_>4}**"),
vec![
LineNumberPlaceholderData {
prefix: "__",
placeholder: Some("nm"),
alignment_spec: So... | rust_cleaned_test_functions.jsonl/54576 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 465
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6528,
5500,
8955,
41832,
62,
21,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
6528,
5500,
8955,
58406,
90,
19638,
31252,
18,
92,
19191,
4421,
90,
6199,
22035,
29,
19,
92,
334,
4461,
310,
7486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_map_multicast_ip_to_ethernet_mac() {
let ipv4 = Ipv4Addr::new([224, 1, 1, 1]);
let mac = Mac::from(&MulticastAddr::new(ipv4).unwrap());
assert_eq!(mac, Mac::new([0x01, 0x00, 0x5e, 0x1, 0x1, 0x1]));
let ipv4 = Ipv4Addr::new([224, 129, 1, 1]);
let mac = Mac:... | rust_cleaned_test_functions.jsonl/19937 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 720
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5376,
26290,
35446,
10385,
2346,
57757,
13845,
22802,
368,
341,
286,
1077,
45475,
19,
284,
358,
30168,
19,
13986,
486,
931,
2561,
17,
17,
19,
11,
220,
16,
11,
220,
16,
11,
220,
16,
2558,
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_format_python() {
let mut logentry = LogEntry {
message: Annotated::new("hello, %s!".to_string().into()),
params: Annotated::new(Value::Array(vec![Annotated::new(Value::String(
"world".to_string(),
))])),
..LogEntry::default()
};
normalize... | rust_cleaned_test_functions.jsonl/84674 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 192
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8955,
55869,
368,
341,
262,
1077,
5206,
1487,
4085,
284,
2835,
5874,
341,
286,
1943,
25,
1527,
87029,
486,
931,
445,
14990,
11,
1018,
82,
92993,
983,
3904,
1005,
18122,
14702,
286,
3628,
25,
152... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_render_transformation_values() -> Result<(), Box<dyn std::error::Error>> {
let text =
"{{ camelcase values.full_name }},{{ constantcase values.full_name }},{{ kebabcase values.full_name }},{{ lowercase values.full_name }},{{ pascalcase values.full_name }},{{ snakecase values.full_name ... | rust_cleaned_test_functions.jsonl/74629 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 402
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22781,
7965,
1627,
9146,
368,
1464,
5714,
68843,
8261,
92846,
1460,
486,
841,
486,
1454,
2452,
341,
262,
1077,
1467,
4035,
414,
47219,
49152,
5638,
2750,
21534,
1269,
335,
2137,
2979,
6783,
5638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_all_operators() -> Result<()> {
let testdata = arrow_testdata_path();
let path = format!("{}/csv/aggregate_test_100.csv", testdata);
let options = CsvReadOptions::new().schema_infer_max_records(100);
let logical_plan = LogicalPlanBuilder::scan_csv(&path, options,... | rust_cleaned_test_functions.jsonl/15406 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 459
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5705,
25634,
2973,
368,
1464,
5714,
71698,
341,
286,
1077,
1273,
691,
284,
17921,
4452,
691,
2638,
543,
286,
1077,
1815,
284,
3561,
88928,
4472,
18104,
14,
59606,
4452,
62,
16,
15,
15,
11219,
49... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 9 |
#[test]
fn test_random_access_iterator() {
use iter::*;
let xs = [1, 2, 5, 10, 11];
let mut it = xs.iter();
assert_eq!(it.indexable(), 5);
assert_eq!(it.idx(0).unwrap(), &1);
assert_eq!(it.idx(2).unwrap(), &5);
assert_eq!(it.idx(4).unwrap(), &11);
... | rust_cleaned_test_functions.jsonl/75622 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 651
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22644,
12759,
13491,
368,
341,
286,
990,
5367,
56162,
286,
1077,
11943,
284,
508,
16,
11,
220,
17,
11,
220,
20,
11,
220,
16,
15,
11,
220,
16,
16,
935,
286,
1077,
5206,
432,
284,
11943,
19471... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_next_tabstop_remaining_mode_slash() {
assert_eq!(next_tabstop(&[1, 5], 0, &RemainingMode::Slash), 1);
assert_eq!(next_tabstop(&[1, 5], 3, &RemainingMode::Slash), 2);
assert_eq!(next_tabstop(&[1, 5], 6, &RemainingMode::Slash), 4);
} | rust_cleaned_test_functions.jsonl/54569 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 138
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11257,
17344,
9495,
59244,
7302,
11886,
988,
368,
341,
286,
2060,
10714,
10297,
3600,
17344,
9495,
2099,
58,
16,
11,
220,
20,
1125,
220,
15,
11,
609,
54745,
3636,
486,
88004,
701,
220,
16,
317,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_property() {
mock_mgp_once!(
mgp_vertex_get_property_context,
move |vertex, prop_name, memory, _| {
assert_eq!(vertex, null_mut());
assert_eq!(prop_name, c_str!("test").as_ptr());
assert_eq!(memory, null_mut());
mgp_error::MGP_E... | rust_cleaned_test_functions.jsonl/28520 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 296
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16638,
368,
341,
262,
7860,
717,
21888,
7630,
33673,
286,
13742,
79,
26611,
3062,
16638,
8467,
345,
286,
3271,
760,
12085,
11,
2004,
1269,
11,
4938,
11,
85137,
341,
310,
2060,
10714,
10297,
12085,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_exp() {
let mut interpreter = Interpreter::new();
let mut input = parse::parse_lua_source(
b"local a, b, c = nil, false, true
local d, e = 2, [[Hello]]
local f, g, h, i = not nil, not false, not true, not 5
local j, k = #... | rust_cleaned_test_functions.jsonl/118771 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1154
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
14214,
368,
341,
286,
1077,
5206,
39299,
284,
82493,
486,
931,
543,
286,
1077,
5206,
1946,
284,
4715,
486,
6400,
76013,
10347,
1006,
310,
293,
1,
2438,
264,
11,
293,
11,
272,
284,
2092,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_qname() {
let pre_name = PrefixedName::new("foo");
assert_eq!(pre_name.to_string(), "foo".to_string());
assert_eq!(pre_name.as_curie(), Some("[:foo]".to_string()));
assert_eq!(pre_name.as_qname(), Some("foo".to_string()));
let pre_name = PrefixedName:... | rust_cleaned_test_functions.jsonl/42259 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 267
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
8976,
606,
368,
341,
286,
1077,
855,
1269,
284,
42588,
3286,
675,
486,
931,
445,
7975,
797,
286,
2060,
10714,
10297,
1726,
1269,
2389,
3904,
1507,
330,
7975,
3263,
983,
3904,
1423,
286,
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_read_btf_type_array() {
let endianness = Endianness::default();
let data: &[u8] = &[
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
];
match un... | rust_cleaned_test_functions.jsonl/98488 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 310
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
880,
8935,
1819,
3858,
368,
341,
286,
1077,
835,
72,
82033,
284,
3972,
72,
82033,
486,
2258,
543,
286,
1077,
821,
25,
44590,
84,
23,
60,
284,
609,
9640,
310,
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... | 2 |
#[test]
fn test_open_line_string() {
let ls = line_string![(x: 0., y: 0.), (x: 1., y: 1.), (x:2., y: 2.)];
let want = vec![
Line::new(coord! { x: 0., y: 0. }, coord! { x: 1., y: 1. }),
Line::new(coord! { x: 1., y: 1. }, coord! { x: 2., y: 2. }),
];
assert_... | rust_cleaned_test_functions.jsonl/83533 | {
"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,
11311,
6528,
3904,
368,
341,
286,
1077,
19597,
284,
1555,
3904,
0,
9697,
87,
25,
220,
15,
2572,
379,
25,
220,
15,
24389,
320,
87,
25,
220,
16,
2572,
379,
25,
220,
16,
24389,
320,
87,
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... | 1 |
#[test]
fn test_rpc_simulate_transaction_panic_on_unfrozen_bank() {
let rpc = RpcHandler::start();
let bank = rpc.working_bank();
let recent_blockhash = bank.confirmed_last_blockhash();
let RpcHandler {
meta,
io,
mint_keypair,
..
... | rust_cleaned_test_functions.jsonl/6310 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 435
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60799,
18314,
6334,
28884,
620,
31270,
4470,
4907,
69,
42240,
35733,
368,
341,
286,
1077,
35596,
284,
79961,
3050,
486,
2468,
543,
286,
1077,
6073,
284,
35596,
18282,
287,
35733,
543,
286,
1077,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_http_request_chunked_payload_and_next_message() {
let mut buf = BytesMut::from(
"GET /test HTTP/1.1\r\n\
transfer-encoding: chunked\r\n\r\n",
);
let mut reader = MessageDecoder::<Request>::default();
let (req, pl) = reader.decode(&mut buf)... | rust_cleaned_test_functions.jsonl/22287 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 583
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25888,
7893,
30539,
291,
32813,
8378,
11257,
6462,
368,
341,
286,
1077,
5206,
6607,
284,
30024,
51440,
486,
1499,
1006,
310,
330,
3806,
608,
1944,
10130,
14,
16,
13,
16,
12016,
1699,
5661,
1797,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_random() {
// not sure how to test this aside from just getting some values
let _n : usize = random();
let _f : f32 = random();
let _o : Option<Option<i8>> = random();
let _many : ((),
(usize,
isize,
... | rust_cleaned_test_functions.jsonl/23586 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 280
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22644,
368,
341,
286,
442,
537,
2704,
1246,
311,
1273,
419,
15663,
504,
1101,
3709,
1045,
2750,
198,
286,
1077,
716,
77,
549,
22301,
284,
4194,
543,
286,
1077,
716,
69,
549,
282,
18,
17,
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_readoptions_max_bytes_for_level_multiplier() {
let mut cf_opts = ColumnFamilyOptions::new();
cf_opts.set_max_bytes_for_level_multiplier(8);
assert_eq!(cf_opts.get_max_bytes_for_level_multiplier(), 8);
} | rust_cleaned_test_functions.jsonl/34131 | {
"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,
6443,
2875,
6345,
12524,
5478,
8274,
51800,
368,
341,
262,
1077,
5206,
24111,
32354,
284,
9332,
15192,
3798,
486,
931,
543,
262,
24111,
32354,
980,
6345,
12524,
5478,
8274,
51800,
7,
23,
317,
262,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_wait_exit() {
let _m = crate::FORK_MTX.lock().expect("Mutex got poisoned by another test");
match unsafe{fork()}.expect("Error: Fork Failed") {
Child => unsafe { _exit(12); },
Parent { child } => {
assert_eq!(waitpid(child, None), Ok(WaitStatus::Exited(child, ... | rust_cleaned_test_functions.jsonl/102292 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 149
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18760,
16880,
368,
341,
262,
1077,
716,
76,
284,
17717,
486,
37,
10647,
1245,
22867,
21003,
1005,
17119,
445,
38099,
2684,
70498,
553,
2441,
1273,
3071,
1066,
262,
2432,
19860,
90,
44738,
368,
781... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_json_add_fields() {
let mut script = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
script.push("resources/tests/scripts");
let script_dir = script.clone();
script.push("json_parse.lua");
let config = ProgrammableFilterConfig {
... | rust_cleaned_test_functions.jsonl/41377 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 609
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
9455,
2891,
12132,
368,
341,
310,
1077,
5206,
5316,
284,
7933,
15064,
486,
1499,
16978,
17223,
34,
7581,
46,
25143,
91120,
8291,
4010,
310,
5316,
2552,
445,
12745,
62468,
39372,
797,
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... | 1 |
#[test]
fn test_bitwise_or() {
let bitmap1 = Bitmap::from(Buffer::from([0b01101010]));
let bitmap2 = Bitmap::from(Buffer::from([0b01001110]));
assert_eq!(
Bitmap::from(Buffer::from([0b01101110])),
(&bitmap1 | &bitmap2).unwrap()
);
} | rust_cleaned_test_functions.jsonl/118648 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 158
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13996,
4482,
8734,
368,
341,
286,
1077,
19746,
16,
284,
17533,
486,
1499,
55574,
486,
1499,
2561,
15,
65,
15,
16,
16,
15,
16,
15,
16,
15,
14382,
286,
1077,
19746,
17,
284,
17533,
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_publicationtype_fromstr() {
use std::str::FromStr;
assert_eq!(
PublicationType::from_str("Paperback").unwrap(),
PublicationType::Paperback
);
assert_eq!(
PublicationType::from_str("Hardback").unwrap(),
PublicationType::Hardback
);
assert_eq... | rust_cleaned_test_functions.jsonl/46241 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 608
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27074,
367,
1313,
5673,
495,
368,
341,
262,
990,
1460,
486,
495,
486,
3830,
2580,
280,
262,
2060,
10714,
33673,
286,
56894,
929,
486,
1499,
2895,
445,
30898,
1419,
1827,
15454,
3148,
286,
56894,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_tip_multi_deltas_success() {
let (mut db, _dir) = create_test_db();
let contract_address = [7u8; 32].into();
let key_type_a = Stype::Delta(1);
let dk_a = DeltaKey { contract_address, key_type: key_type_a };
let v_a = b"Enigma_a";
let key_typ... | rust_cleaned_test_functions.jsonl/48690 | {
"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,
3062,
48014,
25133,
814,
71906,
18632,
368,
341,
286,
1077,
320,
6984,
2927,
11,
716,
3741,
8,
284,
1855,
4452,
8685,
1428,
286,
1077,
5116,
6744,
284,
508,
22,
84,
23,
26,
220,
18,
17,
936,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_insert_too_large() {
let mut cl = Cmdline::new(4);
assert_eq!(cl.insert("hello", "world"), Err(Error::TooLarge));
assert_eq!(cl.insert("a", "world"), Err(Error::TooLarge));
assert_eq!(cl.insert("hello", "b"), Err(Error::TooLarge));
assert!(cl.insert("a", "... | rust_cleaned_test_functions.jsonl/29218 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 341
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
2346,
78,
45228,
368,
341,
286,
1077,
5206,
1185,
284,
40210,
1056,
486,
931,
7,
19,
317,
286,
2060,
10714,
10297,
564,
7030,
445,
14990,
497,
330,
14615,
3975,
15495,
37396,
486,
31246,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vextq_s8() {
unsafe {
let a: [i8; 16] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];
let b: [i8; 16] = [
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 31, 32,
];
let e: [i8; 16] = [4, 5, 6, 7, 8, 9, 10,... | rust_cleaned_test_functions.jsonl/33021 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 302
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
427,
80,
643,
23,
368,
341,
286,
19860,
341,
310,
1077,
264,
25,
508,
72,
23,
26,
220,
16,
21,
60,
284,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tokenize_short2() {
let mut tokenizer = Tokenizer::new().unwrap();
let tokens: Vec<&str> = tokenizer.tokenize_str("ここでは").unwrap();
assert_eq!(tokens, vec!["ここ", "で", "は"]);
} | rust_cleaned_test_functions.jsonl/61448 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 110
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86508,
16673,
17,
368,
341,
286,
1077,
5206,
45958,
284,
9660,
3135,
486,
931,
1005,
15454,
543,
286,
1077,
11211,
25,
11312,
52244,
495,
29,
284,
45958,
96790,
2895,
445,
125695,
76081,
1827,
154... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_sniffing() {
let mut modules = AsyncFunctionSignature::sniff_dart_signatures(TEST_DART_SRC)
.into_iter()
.sorted_by(|l, r| l.0.cmp(&r.0));
let (name, sigs) = modules.next().unwrap();
assert_eq!(name, "api2");
let mut sigs = sigs.into_iter(... | rust_cleaned_test_functions.jsonl/120155 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1292
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28022,
3092,
287,
368,
341,
286,
1077,
5206,
13454,
284,
21433,
5152,
25088,
486,
9613,
3092,
814,
471,
11172,
2789,
50320,
1557,
2992,
29409,
340,
310,
659,
18122,
11723,
741,
310,
659,
28298,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dead() {
let x = Cc::new(5);
let y = x.downgrade();
drop(x);
assert!(y.upgrade().is_none());
} | rust_cleaned_test_functions.jsonl/110849 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 88
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53427,
368,
341,
286,
1077,
856,
284,
356,
66,
486,
931,
7,
20,
317,
286,
1077,
379,
284,
856,
18148,
6937,
543,
286,
5943,
2075,
317,
286,
2060,
10297,
88,
17652,
6937,
1005,
285,
31488,
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 |
#[test]
fn test_find_self_refs() {
check(
r#"
struct Foo { bar: i32 }
impl Foo {
fn foo(self) {
let x = self$0.bar;
if true {
let _ = match () {
() => self,
};
}
}
}
"#,
expect![[r#"
self Sel... | rust_cleaned_test_functions.jsonl/60663 | {
"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,
21814,
25637,
60638,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
1235,
33428,
314,
3619,
25,
600,
18,
17,
555,
6383,
33428,
341,
262,
5168,
15229,
1193,
8,
341,
286,
1077,
856,
284,
656,
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_kafka_producer_success() {
let kafka: Kafka = Kafka::default();
assert_eq!(kafka_producer(kafka, TEST_BUFFER.to_string()), STREAM_SUCCESS);
} | rust_cleaned_test_functions.jsonl/81755 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 89
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4698,
21883,
2540,
28938,
18632,
368,
341,
286,
1077,
67852,
25,
57025,
284,
57025,
486,
2258,
543,
286,
2060,
10714,
10297,
74,
21883,
2540,
28938,
5969,
21883,
11,
13602,
14394,
2389,
3904,
11858,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_chmod_symlink_non_existing_file_recursive() {
let scene = TestScenario::new(util_name!());
let at = &scene.fixtures;
let non_existing = "test_chmod_symlink_non_existing_file_recursive";
let test_symlink = "test_chmod_symlink_non_existing_file_recursive_symlink";
let test_dir... | rust_cleaned_test_functions.jsonl/127214 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 736
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4138,
2593,
58530,
44243,
21637,
62630,
2458,
66242,
368,
341,
262,
1077,
6109,
284,
3393,
54031,
486,
931,
67811,
1269,
0,
1423,
262,
1077,
518,
284,
609,
22483,
67785,
18513,
401,
262,
1077,
247... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_value_of_trait() {
let build_version = format!("{} {}", cli::version(), cli::build_git_sha());
let matches = cli::make_app(&build_version).get_matches_from(vec![
"delivery",
"checkout",
"branch",
"--for",
"griffindor",
... | rust_cleaned_test_functions.jsonl/68782 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 585
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3142,
3575,
78491,
368,
341,
286,
1077,
1936,
9438,
284,
3561,
17223,
6257,
24689,
21348,
486,
4366,
1507,
21348,
486,
5834,
68801,
48836,
5231,
286,
1077,
9071,
284,
21348,
486,
6927,
8191,
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_json_as_decimal() {
test_none_with_ctx_and_extra(cast_json_as_decimal);
// TODO: add test case that make Decimal::from_str failed
let cs: Vec<(Json, bool, bool, Decimal)> = vec![
(
Json::from_i64(10).unwrap(),
false,
... | rust_cleaned_test_functions.jsonl/1988 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2208
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
11898,
74429,
368,
341,
286,
1273,
31488,
6615,
15147,
8378,
31858,
1337,
559,
9455,
11898,
74429,
626,
286,
442,
5343,
25,
912,
1273,
1142,
429,
1281,
26728,
486,
1499,
2895,
4641,
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_lint_duplicate_top_level_assign() {
let m = module(
r#"
load("file", "foo", "no3", "no4")
no1 = 1
no1 = 4
no1 += 8
foo = foo # Starlark reexport
no3 = no3
no3 = no3
no4 = no4 + 1
def no2(): pass
def no2():
x = 1
x += 1
return x
"#,
);
let mut res =... | rust_cleaned_test_functions.jsonl/87709 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 342
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
907,
396,
70434,
10426,
8274,
20688,
368,
341,
286,
1077,
296,
284,
4688,
1006,
310,
435,
2,
698,
1078,
445,
1192,
497,
330,
7975,
497,
330,
2152,
18,
497,
330,
2152,
19,
1138,
2152,
16,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_row_formatter_with_bytes_and_inodes() {
let options = Options {
columns: vec![Column::Size, Column::Itotal],
block_size: BlockSize::Bytes(100),
..Default::default()
};
let row = Row {
file: Some("/path/to/file".to_string()),... | rust_cleaned_test_functions.jsonl/110421 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 498
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8530,
73965,
6615,
12524,
8378,
1243,
2539,
368,
341,
286,
1077,
2606,
284,
14566,
341,
310,
8147,
25,
7486,
20703,
2933,
486,
1695,
11,
9332,
486,
2132,
2370,
1259,
310,
2504,
2368,
25,
8362,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bool() {
let tests = &[(true, "true"), (false, "false")];
test_encode_ok(tests);
test_pretty_encode_ok(tests);
} | rust_cleaned_test_functions.jsonl/29818 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 71
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
22159,
368,
341,
262,
1077,
7032,
284,
609,
9697,
1866,
11,
330,
1866,
3975,
320,
3849,
11,
330,
3849,
899,
935,
262,
1273,
11224,
19817,
8623,
82,
317,
262,
1273,
620,
21322,
11224,
19817... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_rejects_malformed_json() {
let json = json!({
"version": "1",
"content": [{
"host_match": "example.com",
"host_replacement": "example.com",
"path_prefix_match": "/test/",
"pa... | rust_cleaned_test_functions.jsonl/57423 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 804
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
583,
82,
717,
278,
10155,
9455,
368,
341,
286,
1077,
2951,
284,
2951,
0,
2262,
310,
330,
4366,
788,
330,
16,
756,
310,
330,
1796,
788,
18396,
394,
330,
3790,
10708,
788,
1060,
330,
8687,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compile_not_c() {
let compiled = bitwise::compile_not("C".to_string());
assert_eq!(compiled.len(), 1);
assert_eq!(compiled[0], 0b01011011);
} | rust_cleaned_test_functions.jsonl/100594 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 82
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74170,
7913,
666,
368,
341,
262,
1077,
19697,
284,
97970,
486,
20433,
7913,
445,
34,
3263,
983,
3904,
5231,
262,
2060,
10714,
10297,
50845,
19406,
1507,
220,
16,
317,
262,
2060,
10714,
10297,
5084... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_sample_and_hold_sync() {
let spec = "input x: UInt8\noutput y: UInt8 := x.hold().defaults(to: 0)";
assert_eq!(0, num_type_errors(spec));
} | rust_cleaned_test_functions.jsonl/110711 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 90
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17491,
8378,
65824,
23008,
368,
341,
286,
1077,
1398,
284,
330,
1355,
856,
25,
22275,
23,
1699,
3006,
379,
25,
22275,
23,
1669,
856,
860,
813,
1005,
26756,
12186,
25,
220,
15,
24023,
286,
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 |
#[test]
fn test_binary_point_vars_select() -> Result<(), PlonkError> {
test_binary_point_vars_select_helper::<FqEd354, Param254>()?;
test_binary_point_vars_select_helper::<FqEd377, Param377>()?;
test_binary_point_vars_select_helper::<FqEd381, Param381>()?;
test_binary_point_vars_... | rust_cleaned_test_functions.jsonl/33786 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 208
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31761,
6085,
11168,
13051,
368,
1464,
5714,
68843,
1818,
263,
74,
1454,
29,
341,
286,
1273,
31761,
6085,
11168,
13051,
10418,
27638,
37,
80,
2715,
18,
20,
19,
11,
6991,
17,
20,
19,
13555,
37445,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_single() {
match Variant::VLong(1).plus(Variant::VSingle(2.0)).unwrap() {
Variant::VSingle(result) => assert_eq!(result, 3.0),
_ => panic!("assertion failed"),
}
} | rust_cleaned_test_functions.jsonl/84548 | {
"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,
19487,
368,
341,
394,
2432,
39292,
486,
53,
6583,
7,
16,
568,
7138,
12410,
15341,
486,
53,
10888,
7,
17,
13,
15,
4579,
15454,
368,
341,
503,
39292,
486,
53,
10888,
4456,
8,
589,
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... | 2 |
#[test]
fn test_cdc_batch_size_limit() {
let mut suite = TestSuite::new(1);
// Prewrite
let start_ts = block_on(suite.cluster.pd_client.get_tso()).unwrap();
let mut m1 = Mutation::default();
let k1 = b"k1".to_vec();
m1.set_op(Op::Put);
m1.key = k1.clone();
m1.value = vec![0; 6 *... | rust_cleaned_test_functions.jsonl/90361 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1616
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
7628,
14534,
2368,
14763,
368,
341,
262,
1077,
5206,
16182,
284,
3393,
28000,
486,
931,
7,
16,
626,
262,
442,
393,
52473,
198,
262,
1077,
1191,
25023,
284,
2504,
4470,
89516,
40501,
556,
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... | 5 |
#[test]
fn test_tpu_send_transaction() {
let mint_keypair = Keypair::new();
let mint_pubkey = mint_keypair.pubkey();
let test_validator =
TestValidator::with_no_fees(mint_pubkey, None, SocketAddrSpace::Unspecified);
let rpc_client = Arc::new(RpcClient::new_with_commitment(
test_v... | rust_cleaned_test_functions.jsonl/64275 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 486
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
5584,
13565,
28884,
368,
341,
262,
1077,
28337,
3097,
12670,
284,
6569,
1082,
1310,
486,
931,
543,
262,
1077,
28337,
34014,
792,
284,
28337,
3097,
12670,
47773,
792,
543,
262,
1077,
1273,
649... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_type_of() -> Result<(), Box<EvalAltResult>> {
#[derive(Clone)]
struct TestStruct {
x: INT,
}
let mut engine = Engine::new();
#[cfg(not(feature = "only_i32"))]
assert_eq!(engine.eval::<String>("type_of(60 + 5)")?, "i64");
#[cfg(feature = "only_i32")]
ass... | rust_cleaned_test_functions.jsonl/53457 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 648
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1819,
3575,
368,
1464,
5714,
68843,
8261,
23835,
831,
26017,
2077,
2452,
341,
262,
11506,
27098,
65297,
5563,
262,
2036,
3393,
9422,
341,
286,
856,
25,
9221,
345,
262,
555,
262,
1077,
5206,
4712,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
#[test]
fn test_encode_response() {
let mut buf = [0; 1];
let response = NonSupportedCommandParams { cr_bit: true, non_supported_command: 8 };
let expected = [
0b00100011,
];
assert!(response.encode(&mut buf[..]).is_ok());
assert_eq!(buf, expected);
... | rust_cleaned_test_functions.jsonl/67134 | {
"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,
11224,
9655,
368,
341,
286,
1077,
5206,
6607,
284,
508,
15,
26,
220,
16,
935,
286,
1077,
2033,
284,
11581,
34636,
4062,
4870,
314,
1560,
13996,
25,
830,
11,
2477,
57885,
10811,
25,
220,
23,
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_lazy_partition_agg() {
let df = df! {
"foo" => &[1, 1, 2, 2, 3],
"bar" => &[1.0, 1.0, 2.0, 2.0, 3.0]
}
.unwrap();
let out = df
.lazy()
.groupby(vec![col("foo")])
.agg(vec![col("bar").mean()])
... | rust_cleaned_test_functions.jsonl/14683 | {
"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,
49646,
43840,
83534,
368,
341,
286,
1077,
6764,
284,
6764,
0,
341,
310,
330,
7975,
1,
589,
44590,
16,
11,
220,
16,
11,
220,
17,
11,
220,
17,
11,
220,
18,
1259,
310,
330,
2257,
1,
589,
4459... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_color_error() {
assert!(matches!(
EmbedBuilder::new().color(0).build().unwrap_err().kind(),
EmbedErrorType::ColorZero
));
assert!(matches!(
EmbedBuilder::new().color(u32::MAX).build().unwrap_err().kind(),
EmbedErrorType::Col... | rust_cleaned_test_functions.jsonl/50084 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 200
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6714,
4096,
368,
341,
286,
2060,
10297,
19914,
33673,
310,
37068,
3297,
486,
931,
1005,
3423,
7,
15,
568,
5834,
1005,
15454,
9266,
1005,
15314,
3148,
310,
37068,
1454,
929,
486,
1636,
17999,
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... | 2 |
#[test]
fn test_joint_val() {
use crate::iterable::dummy::Mat;
use ark_bls12_381::Fr;
let a = [
MatrixElement::EOL,
MatrixElement::Element((Fr::from(1u64), 1)),
MatrixElement::EOL,
MatrixElement::Element((Fr::from(2u64), 0)),
];
let b = [
MatrixEleme... | rust_cleaned_test_functions.jsonl/6890 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 512
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53158,
6189,
368,
341,
262,
990,
17717,
486,
2015,
480,
486,
31390,
486,
11575,
280,
262,
990,
55217,
880,
4730,
16,
17,
62,
18,
23,
16,
486,
22560,
401,
262,
1077,
264,
284,
2278,
286,
11631,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_data_descriptors() {
let value = vec![
UntaggedValue::row(indexmap! {
"h1".into() => Value::from("Ecuador")
}),
UntaggedValue::row(indexmap! {
"h2".into() => Value::from("Ecuador")
}),
UntaggedVal... | rust_cleaned_test_functions.jsonl/124315 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 478
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1769,
15768,
25705,
368,
341,
286,
1077,
897,
284,
7486,
90515,
310,
15098,
96476,
1130,
486,
651,
7195,
2186,
0,
341,
394,
330,
71,
16,
3263,
18122,
368,
589,
5162,
486,
1499,
445,
36,
49262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_41() {
assert_eq!(Solution::first_missing_positive(vec![2,2]), 1);
assert_eq!(Solution::first_missing_positive(vec![12,11,10,9,8,7,6,5,4,3,2]), 1);
assert_eq!(Solution::first_missing_positive(vec![2,2,2,2,2,2,2]), 1);
assert_eq!(Solution::first_missing_positiv... | rust_cleaned_test_functions.jsonl/75799 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 305
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
19,
16,
368,
972,
286,
2060,
10714,
10297,
36842,
486,
3896,
40447,
54160,
25592,
20703,
17,
11,
17,
9719,
220,
16,
736,
286,
2060,
10714,
10297,
36842,
486,
3896,
40447,
54160,
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_err_on_diff_nonce() {
let mut s = StreamXChaCha20Poly1305::new(&SecretKey::from(KEY), &Nonce::from([0u8; 24]));
let cipher1: [u8; 23] = [
252u8, 164u8, 0u8, 196u8, 27u8, 198u8, 8u8, 57u8, 216u8, 118u8, 134u8, 104u8, 156u8,
45u8, 71u8, 161u8, 199u8, 28u8, 7... | rust_cleaned_test_functions.jsonl/75566 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 281
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9266,
4470,
15850,
48508,
368,
341,
286,
1077,
5206,
274,
284,
9203,
55,
95971,
95971,
17,
15,
38164,
16,
18,
15,
20,
486,
931,
2099,
19773,
1592,
486,
1499,
37076,
701,
609,
90528,
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_pkcs8_encrypted() {
env_logger::init().unwrap_or(());
println!("test");
decode_secret_key(PKCS8_ENCRYPTED, Some(b"blabla")).unwrap();
} | rust_cleaned_test_functions.jsonl/76371 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 97
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33321,
4837,
23,
13781,
14026,
368,
341,
286,
6105,
27413,
486,
2327,
1005,
15454,
8734,
7,
1423,
286,
13751,
17223,
1944,
797,
286,
16895,
21962,
3097,
5304,
42,
6412,
23,
6300,
42917,
1479,
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 |
#[test]
fn test_noto_sans() {
run_test(
&TEST_DATA,
"harfbuzz/good-noto-sans.kn",
"noto/NotoSansKannada-Regular.ttf",
&[JOINER_GLYPH_INDEX],
80,
);
} | rust_cleaned_test_functions.jsonl/91182 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 224
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
2072,
643,
596,
368,
341,
394,
1598,
4452,
1006,
503,
609,
10033,
7896,
345,
503,
330,
12982,
10798,
8889,
4846,
1386,
29169,
78,
1331,
596,
5202,
77,
756,
503,
330,
1921,
78,
20290,
2072,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_global_overrides() {
// Take the lock so changing the environment doesn't cause races.
let _env_lock = ENV_LOCK.lock().unwrap();
// Test first that we can override each environment.
for env in &Environment::ALL {
env::set_var(CONFIG_ENV, env.to_string... | rust_cleaned_test_functions.jsonl/35253 | {
"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,
19296,
15431,
18245,
368,
341,
286,
442,
11778,
279,
5296,
773,
10018,
279,
4573,
3171,
944,
5240,
20588,
624,
286,
1077,
716,
3160,
9818,
284,
32791,
27661,
21003,
1005,
15454,
1428,
286,
442,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_insert_nodes() {
let pool = create_connection_pool_and_migrate();
let registry = DieselRegistry::new(pool);
registry
.insert_node(get_node_1())
.expect("Unable to insert node");
let node = registry
.fetch_node(&get_node_1().ide... | rust_cleaned_test_functions.jsonl/106287 | {
"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,
17678,
14896,
368,
341,
286,
1077,
7314,
284,
1855,
15866,
15709,
8378,
717,
34479,
543,
286,
1077,
19424,
284,
53794,
15603,
486,
931,
41838,
626,
286,
19424,
198,
310,
659,
4208,
5084,
5433,
508... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_read_bytes_mut_small() {
const INITIAL: &[u8] = b"abcdef";
let rbuf = Box::new(BytesMut::from(vec![0; 4]));
const EXPECT: &[u8] = b"cdef";
let mut f = tempfile().unwrap();
f.write_all(INITIAL).unwrap();
let mut aiocb = AioCb::from_boxed_mut_slice( f.as_raw_fd(),
... | rust_cleaned_test_functions.jsonl/90416 | {
"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,
6443,
12524,
29523,
31966,
368,
341,
262,
733,
56854,
25,
44590,
84,
23,
60,
284,
293,
1,
41202,
876,
262,
1077,
435,
5909,
284,
8261,
486,
931,
76423,
51440,
486,
1499,
25592,
20703,
15,
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_middleware() {
let mut srv = init_service(
App::new().service(
web::resource("/test")
.name("test")
.wrap(md)
.route(web::get().to(|| HttpResponse::Ok())),
),
);
let req = ... | rust_cleaned_test_functions.jsonl/4935 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 329
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
11603,
368,
341,
286,
1077,
5206,
43578,
284,
2930,
12267,
1006,
310,
1845,
486,
931,
1005,
7936,
1006,
394,
3482,
486,
9233,
4283,
1944,
1138,
503,
659,
606,
445,
1944,
1138,
503,
659,
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... | 2 |
#[test]
fn test_or_with_one_like_to_string() {
let name1 = _random_vector(10);
let value1 = _random_string(10);
let query = Operator::Or(
vec![
Operator::Like(
TagName::PlainTagName(name1.clone()),
TargetValue::Unencryp... | rust_cleaned_test_functions.jsonl/11914 | {
"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,
8734,
6615,
11667,
25535,
2346,
3904,
368,
341,
286,
1077,
829,
16,
284,
716,
11463,
12247,
7,
16,
15,
317,
286,
1077,
897,
16,
284,
716,
11463,
3904,
7,
16,
15,
626,
286,
1077,
3239,
284,
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_meta_in_external() {
assert_matches!(
from_json_value(
json!(
{"version": "1",
"content":
{"/meta/" : {},
"/": {
"meta/foo": "host-path"}
... | rust_cleaned_test_functions.jsonl/101414 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 349
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13381,
1243,
47432,
368,
341,
286,
2060,
38344,
33673,
310,
504,
9455,
3142,
1006,
394,
2951,
33673,
503,
5212,
4366,
788,
330,
16,
756,
3824,
330,
1796,
4660,
3824,
314,
3115,
5490,
11225,
549,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let rect = Rectangle::new(5.0, 10.0, 20.0, 30.0);
assert_eq!(rect.x, 5.0);
assert_eq!(rect.y, 10.0);
assert_eq!(rect.width, 20.0);
assert_eq!(rect.height, 30.0);
} | rust_cleaned_test_functions.jsonl/17814 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 138
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
368,
341,
286,
1077,
7608,
284,
19280,
486,
931,
7,
20,
13,
15,
11,
220,
16,
15,
13,
15,
11,
220,
17,
15,
13,
15,
11,
220,
18,
15,
13,
15,
626,
286,
2060,
10714,
10297,
2851,
1993,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_root_and_add_votes() {
let mut heaviest_subtree_fork_choice = setup_forks();
let stake = 100;
let (bank, vote_pubkeys) = bank_utils::setup_bank_and_vote_pubkeys(1, stake);
// Vote for slot 2
heaviest_subtree_fork_choice.add_votes(
[(vote_p... | rust_cleaned_test_functions.jsonl/85863 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 983
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
12993,
8378,
2891,
65116,
368,
341,
286,
1077,
5206,
566,
98362,
5228,
9344,
761,
669,
31936,
284,
6505,
761,
73302,
543,
286,
1077,
18279,
284,
220,
16,
15,
15,
280,
286,
1077,
320,
17033... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_too_large() {
// from playground
serialize_and_deserialize_uper(
8,
&[0x12],
&BasicConstrainedSmall {
abc: BitVec::from_all_bytes(vec![0x12]),
},
);
} | rust_cleaned_test_functions.jsonl/50179 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 128
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
78,
45228,
368,
341,
262,
442,
504,
41615,
198,
262,
24235,
8378,
15768,
9050,
62,
3466,
1006,
286,
220,
23,
345,
286,
44590,
15,
87,
16,
17,
1259,
286,
609,
15944,
1109,
57727,
25307,
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_remove_published_txs() {
let network = Network::LocalNet;
let consensus_constants = network.create_consensus_constants();
let tx1 = Arc::new(tx!(MicroTari(10_000), fee: MicroTari(50), inputs:2, outputs: 1).0);
let tx2 = Arc::new(tx!(MicroTari(10_000), fee: MicroTa... | rust_cleaned_test_functions.jsonl/27096 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1328
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
69524,
17805,
82,
368,
341,
286,
1077,
3922,
284,
8141,
486,
7319,
6954,
280,
286,
1077,
23869,
55642,
284,
3922,
2520,
31971,
13626,
55642,
543,
286,
1077,
9854,
16,
284,
19689,
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_rpc_get_version() {
let bob_pubkey = Pubkey::new_rand();
let (io, meta, ..) = start_rpc_handler_with_tx(&bob_pubkey);
let req = format!(r#"{{"jsonrpc":"2.0","id":1,"method":"getVersion"}}"#);
let res = io.handle_request_sync(&req, meta);
let expected = js... | rust_cleaned_test_functions.jsonl/20313 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 373
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60799,
3062,
9438,
368,
341,
286,
1077,
35192,
34014,
792,
284,
22611,
792,
486,
931,
33864,
543,
286,
1077,
320,
815,
11,
8823,
11,
5241,
8,
284,
1191,
60799,
10183,
6615,
17805,
2099,
47086,
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_get_trace() {
// Test getting a stack trace from a real running program using system Ruby
let cmd = RubyScript::new("./ci/ruby-programs/infinite.rb");
let pid = cmd.id() as Pid;
let mut getter = initialize(pid, true, None).unwrap();
std::thread::sleep(std:... | rust_cleaned_test_functions.jsonl/90833 | {
"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,
3062,
23575,
368,
341,
286,
442,
3393,
3709,
264,
5611,
11655,
504,
264,
1931,
4303,
2025,
1667,
1849,
23726,
198,
286,
1077,
5439,
284,
23726,
5910,
486,
931,
13988,
5855,
7382,
20028,
9838,
5077... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_access_indexed_object_returned_from_function_call() {
let b = ast::BaseNode::default();
let pkg =
Parser::new("f()[3]").parse_single_package("path".to_string(), "foo.flux".to_string());
let got = test_convert(pkg).unwrap();
let symbols = colle... | rust_cleaned_test_functions.jsonl/131383 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1046
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
12759,
3560,
291,
5314,
12511,
291,
5673,
9174,
13429,
368,
341,
286,
1077,
293,
284,
11763,
486,
3978,
1955,
486,
2258,
543,
286,
1077,
24793,
4035,
310,
21102,
486,
931,
445,
69,
10116,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compression() {
let client = TestClient::new();
let uncompressed =
b"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor \
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud \
exercitation ullamco laboris ... | rust_cleaned_test_functions.jsonl/87456 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 843
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2965,
4011,
368,
341,
262,
1077,
2943,
284,
3393,
2959,
486,
931,
543,
262,
1077,
92382,
4035,
286,
293,
1,
32783,
26342,
23655,
2444,
27212,
11,
35140,
57924,
30060,
11,
10923,
653,
79122,
18965,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_column_duration() {
let fields = vec![field_type(FieldTypeTp::Duration)];
let duration = Duration::parse(b"10:11:12", 0).unwrap();
let data = vec![Datum::Null, Datum::Dur(duration)];
test_colum_datum(fields, data);
} | rust_cleaned_test_functions.jsonl/24365 | {
"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,
8744,
25454,
368,
341,
286,
1077,
5043,
284,
7486,
20703,
2566,
1819,
57788,
929,
62241,
486,
12945,
12587,
286,
1077,
8090,
284,
21045,
486,
6400,
1883,
1,
16,
15,
25,
16,
16,
25,
16,
17,
497... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bank_parent_account_spend() {
let (genesis_config, mint_keypair) = create_genesis_config(2);
let key1 = Keypair::new();
let key2 = Keypair::new();
let parent = Arc::new(Bank::new(&genesis_config));
let tx =
system_transaction::transfer(&mint_k... | rust_cleaned_test_functions.jsonl/2579 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 305
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35733,
15960,
13500,
643,
3740,
368,
341,
286,
1077,
320,
77894,
5332,
11,
28337,
3097,
12670,
8,
284,
1855,
16322,
13774,
5332,
7,
17,
317,
286,
1077,
1376,
16,
284,
6569,
1082,
1310,
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_classes_1() {
check_output_default(
"class DevonshireCream {\n\
serveOn() {\n\
return \"Scones\";\n\
}\n\
}\n\
\n\
print DevonshireCream;",
"LoxClass(DevonshireCream)",
)... | rust_cleaned_test_functions.jsonl/111847 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 213
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16833,
62,
16,
368,
341,
286,
1779,
7645,
9993,
1006,
310,
330,
1040,
59334,
14909,
98781,
28152,
77,
5661,
2290,
8683,
1925,
368,
28152,
77,
5661,
338,
470,
7245,
50,
443,
288,
2105,
17882,
77,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_twiddle_all_0s() {
let mut to_test = [0; 8];
twiddle(&mut to_test);
assert_eq!(to_test, [0, 0, 0, 0, 0, 0, 0, 0]);
} | rust_cleaned_test_functions.jsonl/54021 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 97
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54178,
3310,
5705,
62,
15,
82,
368,
341,
286,
1077,
5206,
311,
4452,
284,
508,
15,
26,
220,
23,
935,
286,
4384,
3310,
2099,
6984,
311,
4452,
317,
286,
2060,
10714,
10297,
983,
4452,
11,
508,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_partial_isa_subclass_superclass() -> TestResult {
let p = Polar::new();
p.load_str(
r#"f(x: PostSubclass) if g(x);
g(_: Post);"#,
)?;
let mut q = p.new_query_from_term(term!(call!("f", [sym!("x")])), false);
let mut next_binding ... | rust_cleaned_test_functions.jsonl/63010 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 604
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
52068,
6892,
64,
5228,
1040,
38886,
1040,
368,
1464,
3393,
2077,
341,
286,
1077,
281,
284,
55896,
486,
931,
543,
286,
281,
5104,
2895,
1006,
310,
435,
55543,
69,
2075,
25,
3877,
3136,
1040,
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_kv_service() {
let (mut server, client) = new_kv_server();
server.start();
let uuid = Uuid::new_v4().as_bytes().to_vec();
let mut head = WriteHead::new();
head.set_uuid(uuid.clone());
let mut m = Mutation::new();
m.op = Mutation_OP::Put;
m.set_key(vec![1]);
... | rust_cleaned_test_functions.jsonl/127170 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 509
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
97066,
12267,
368,
341,
262,
1077,
320,
6984,
3538,
11,
2943,
8,
284,
501,
97066,
12015,
543,
262,
3538,
4962,
1428,
262,
1077,
16040,
284,
547,
2423,
486,
931,
2273,
19,
1005,
300,
12524,
1005,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_0217_example_2() {
let nums = vec![1, 2, 3, 4];
let result = false;
assert_eq!(Solution::contains_duplicate(nums), result);
} | rust_cleaned_test_functions.jsonl/47675 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 90
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
15,
17,
16,
22,
39304,
62,
17,
368,
341,
286,
1077,
10307,
284,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
935,
286,
1077,
1102,
284,
895,
401,
286,
2060,
10714,
10297,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_rent_eager_across_epoch_without_gap_under_multi_epoch_cycle() {
let leader_pubkey = solana_sdk::pubkey::new_rand();
let leader_lamports = 3;
let mut genesis_config =
create_genesis_config_with_leader(5, &leader_pubkey, leader_lamports).genesis_config;
... | rust_cleaned_test_functions.jsonl/2539 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1664
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
83127,
2204,
1409,
14718,
2128,
20682,
39904,
51790,
58228,
25133,
20682,
39079,
368,
341,
286,
1077,
7653,
34014,
792,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
7653,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_por_circuit_poseidon_base_2_private_root() {
test_por_circuit_private_root::<TreeBase<PoseidonHasher, U2>>(1_886);
} | rust_cleaned_test_functions.jsonl/108260 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 66
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
76628,
666,
37268,
33201,
90456,
7651,
62,
17,
26249,
12993,
368,
341,
262,
1273,
76628,
666,
37268,
26249,
12993,
27638,
6533,
3978,
21604,
960,
90456,
6370,
261,
11,
547,
17,
25526,
16,
62,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_remove() {
let mut pts = ::math::Points::new();
for x in 0u32 .. 10 {
for y in 0u32 .. 10 {
for z in 0 .. 10 {
pts.add(Vec3::new(x as f32, y as f32, z as f32));
}
}
}
let mut o = ::math::Octree::new();
for i in 1 .. pts.len() + 1 {
o.add(i as u32, &pts);
}
for i in 1 .... | rust_cleaned_test_functions.jsonl/80200 | {
"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,
2891,
18193,
368,
341,
10217,
5206,
29993,
284,
3504,
10374,
486,
11411,
486,
931,
543,
2023,
856,
304,
220,
15,
84,
18,
17,
5241,
220,
16,
15,
341,
197,
2023,
379,
304,
220,
15,
84,
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... | 6 |
#[test]
fn test_h2_content_length() {
use actix_http::http::{
header::{HeaderName, HeaderValue},
StatusCode,
};
let openssl = ssl_acceptor().unwrap();
let mut srv = TestServer::new(move || {
openssl
.clone()
.map_err(|e| println!("Openssl error: {... | rust_cleaned_test_functions.jsonl/102545 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1144
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1523,
17,
7495,
5118,
368,
341,
262,
990,
1160,
941,
25888,
486,
1254,
74843,
286,
4247,
22964,
4047,
675,
11,
12104,
1130,
1583,
286,
53403,
345,
262,
2605,
262,
1077,
80733,
284,
33537,
35728,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_clone_from_slice() {
#[derive(Clone, Debug, Eq, PartialEq)]
struct X(u32);
let s: &[X] = &[X(1), X(2), X(3)];
let r: Rc<[X]> = Rc::from(s);
assert_eq!(&r[..], s);
} | rust_cleaned_test_functions.jsonl/4673 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 141
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54742,
5673,
26488,
368,
341,
286,
11506,
27098,
65297,
11,
11091,
11,
33122,
11,
55039,
5563,
286,
2036,
1599,
8154,
18,
17,
626,
286,
1077,
274,
25,
44590,
55,
60,
284,
44590,
55,
7,
16,
701... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_deps_rec() {
let protos = protos();
let mut map = HashMap::new();
for proto in protos {
add_deps_rec(&proto, &proto, &mut map);
}
assert_eq!(map, {
let mut map = HashMap::new();
map.insert("a".into(), {
... | rust_cleaned_test_functions.jsonl/8977 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 691
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
76489,
7080,
368,
341,
286,
1077,
1724,
436,
284,
1724,
436,
543,
286,
1077,
5206,
2415,
284,
10528,
486,
931,
543,
286,
369,
18433,
304,
1724,
436,
341,
310,
912,
76489,
7080,
2099,
15110... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_idempotent_quickcheck_bug2() {
let mut m: TMap = Map::new();
m.apply(map::Op::Up {
dot: Dot::new(32, 5),
key: 0,
op: map::Op::Up {
dot: Dot::new(32, 5),
key: 0,
op: mvreg::Op::Put {
clock: VClock::new(),
... | rust_cleaned_test_functions.jsonl/61632 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 296
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
842,
3262,
63532,
82094,
2028,
73232,
17,
368,
341,
262,
1077,
5206,
296,
25,
350,
2227,
284,
5027,
486,
931,
1428,
262,
296,
13045,
9147,
486,
7125,
486,
2324,
341,
286,
12756,
25,
31262,
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_continuously_stream_transactions() {
// Create a new streaming service client and listener
let (streaming_service_client, streaming_service_listener) =
new_streaming_service_client_listener_pair();
// Note the request we expect to receive on the streaming service side
le... | rust_cleaned_test_functions.jsonl/125043 | {
"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,
68948,
65635,
12673,
68182,
368,
341,
262,
442,
4230,
264,
501,
16842,
2473,
2943,
323,
11446,
198,
262,
1077,
320,
4027,
287,
12267,
8179,
11,
16842,
12267,
46493,
8,
4035,
286,
501,
12673,
287,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_delete_index() {
let index_name = "test_delete_index";
let mut client = make_client();
clean_db(&mut client, index_name);
{
let result = client
.index(index_name, "test_type")
.with_doc(&TestDocument::new().with_int_fie... | rust_cleaned_test_functions.jsonl/69580 | {
"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,
11353,
3560,
368,
341,
286,
1077,
1922,
1269,
284,
330,
1944,
11353,
3560,
876,
286,
1077,
5206,
2943,
284,
1281,
8179,
1428,
286,
4240,
8685,
2099,
6984,
2943,
11,
1922,
1269,
317,
286,
341,
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_fold_comparison4() {
fold_same("[] == false"); // true
fold_same("[] == true"); // false
fold_same("[0] == false"); // true
fold_same("[0] == true"); // false
fold_same("[1] == false"); // false
fold_same("[1] == true"); // true
fold_same("({}) == false"); // false
... | rust_cleaned_test_functions.jsonl/122191 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 146
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
61187,
90797,
19,
368,
341,
262,
11555,
33574,
445,
1294,
621,
895,
5038,
442,
830,
198,
262,
11555,
33574,
445,
1294,
621,
830,
5038,
442,
895,
198,
262,
11555,
33574,
10937,
15,
60,
621,
895,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_raft_message_with_context() {
let mut msg_buf = BatchMessageBuffer::new(Arc::new(Config::default()));
for i in 0..2 {
let context_len = msg_buf.cfg.max_grpc_send_msg_len as usize;
let context = vec![0; context_len];
let mut msg = RaftMessa... | rust_cleaned_test_functions.jsonl/108725 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 494
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14218,
62,
2944,
6462,
6615,
8467,
368,
341,
286,
1077,
5206,
3750,
10363,
284,
33904,
2052,
4095,
486,
931,
4346,
1287,
486,
931,
33687,
486,
2258,
7392,
286,
369,
600,
304,
220,
15,
496,
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... | 3 |
#[test]
fn test_decode_invalid_transaction() {
// This transaction will not pass sanitization
let unsanitary_transaction = EncodedTransaction::Binary(
"ju9xZWuDBX4pRxX2oZkTjxU5jB4SSTgEGhX8bQ8PURNzyzqKMPPpNvWihx8zUe\
FfrbVNoAaEsNKZvGzAnTDy5bhNT9kt6KFCTBixpvrLCzg4M5UdFUQYr... | rust_cleaned_test_functions.jsonl/39011 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 390
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
31433,
28884,
368,
341,
286,
442,
1096,
7745,
686,
537,
1494,
19812,
2022,
198,
286,
1077,
6975,
276,
44806,
28884,
284,
10751,
6737,
8070,
486,
21338,
1006,
310,
330,
8613,
24,
87,
81756,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_building_and_parsing() {
let index = 4816;
let timestamp = 54658;
let prev = String::from("ngiurengoiurehgbiuergneoigjoierhg");
let sign_key = String::from("0000");
let content = String::from("Some string");
let new_block = BlockGen {
... | rust_cleaned_test_functions.jsonl/62815 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 411
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82397,
8378,
620,
28598,
368,
341,
286,
1077,
1922,
284,
220,
19,
23,
16,
21,
280,
286,
1077,
11441,
284,
220,
20,
19,
21,
20,
23,
280,
286,
1077,
7872,
284,
923,
486,
1499,
445,
968,
72,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_messages_update_status() {
let _setup = SetupMocks::init();
AgencyMockDecrypted::set_next_decrypted_response(constants::GET_MESSAGES_DECRYPTED_RESPONSE);
let status = CString::new("MS-103").unwrap().into_raw();
let json = CString::new(r#"[{"pairwiseDID":"QSrw8he... | rust_cleaned_test_functions.jsonl/35825 | {
"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,
23428,
8882,
4773,
368,
341,
286,
1077,
716,
15188,
284,
18626,
72577,
486,
2327,
1428,
286,
16379,
11571,
4900,
14026,
486,
746,
11257,
13783,
14026,
9655,
80368,
486,
3806,
69485,
2881,
42917,
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... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.