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_is_mate_with_partial_state_repeat_move_kinds_no_mate_with_kaku_occupied_self_sente() {
let kinds:Vec<KomaKind> = vec![ SKaku, SKakuN ];
let positions:Vec<(u32,u32)> = vec![
(0,4),(4,0),(4,8),(8,4)
];
let mvs:Vec<(u32,u32)> = vec![
(2,2),(6,2),(6,6),(2,6)
];
let occ_positi... | rust_cleaned_test_functions.jsonl/72976 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 753
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
717,
349,
6615,
52068,
4387,
41975,
17134,
4698,
8673,
6536,
717,
349,
6615,
4698,
23557,
62,
40356,
25637,
643,
6817,
368,
972,
10217,
12829,
25,
10050,
28239,
7786,
10629,
29,
284,
7486,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_label() {
match label().easy_parse(".hello") {
Ok((lab, _)) => assert_eq!(lab, String::from("hello")),
Err(_) => assert!(false),
}
match label().easy_parse("._1_la2_52d_4s21j5v2ns_2n3sh_3917d_ncj224b") {
Ok((lab, _)) => assert_eq!(
... | rust_cleaned_test_functions.jsonl/103366 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 806
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6106,
368,
341,
286,
2432,
2383,
1005,
45022,
21039,
5680,
14990,
899,
341,
310,
7622,
1188,
14380,
11,
716,
593,
589,
2060,
10714,
10297,
14380,
11,
923,
486,
1499,
445,
14990,
30154,
310,
15495,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_destroy_userdata() -> Result<()> {
struct MyUserdata(Arc<()>);
impl UserData for MyUserdata {}
let rc = Arc::new(());
let lua = Lua::new();
lua.globals().set("userdata", MyUserdata(rc.clone()))?;
assert_eq!(Arc::strong_count(&rc), 2);
// should destroy all object... | rust_cleaned_test_functions.jsonl/40496 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 194
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18066,
59315,
368,
1464,
5714,
71698,
341,
262,
2036,
3017,
1474,
691,
4346,
1287,
71698,
626,
262,
11605,
71294,
369,
3017,
1474,
691,
10086,
262,
1077,
10192,
284,
19689,
486,
931,
5065,
626,
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... | 5 |
#[test]
fn test_from_string() {
assert_eq!(LsColors::default(), LsColors::from_string(&String::new()));
let result = LsColors::from_string(
&String::from("rs=0:di=03;34:ln=01;36:*.foo=01;35:*README=33"));
assert_eq!(Colour::Blue.italic(), result.directory);
assert_eq!(Colour::Cyan.bold... | rust_cleaned_test_functions.jsonl/90577 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 215
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
3904,
368,
341,
262,
2060,
10714,
10297,
43,
82,
13108,
486,
2258,
1507,
444,
82,
13108,
486,
1499,
3904,
2099,
703,
486,
931,
25138,
262,
1077,
1102,
284,
444,
82,
13108,
486,
1499,
3904,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_used_headers() {
let input = r#"
{
"used_headers": [{ "name": "foo/bar.h" }],
"current_target": "//foo:bar"
}
"#;
let ir = deserialize_ir(input.as_bytes()).unwrap();
let expected = FlatIR {
used_headers: vec![Hea... | rust_cleaned_test_functions.jsonl/45461 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 294
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27803,
26719,
368,
341,
286,
1077,
1946,
284,
435,
2,
698,
286,
341,
310,
330,
2591,
26719,
788,
18466,
330,
606,
788,
330,
7975,
49513,
860,
1,
29043,
310,
330,
3231,
11123,
788,
35574,
7975,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_struct() {
let mut m = TestFmtJsonWellKnownTypes::new();
m.mut_struct_value().fields.insert("ab".to_owned(), {
let mut v = Value::new();
v.set_number_value(3.0);
v
});
test_json_print_parse_message("{\"structValue\": {\"ab\": 3.0}}", &m);
} | rust_cleaned_test_functions.jsonl/49810 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 142
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15126,
368,
341,
262,
1077,
5206,
296,
284,
3393,
93322,
5014,
11395,
48206,
4173,
486,
931,
543,
262,
296,
744,
332,
15126,
3142,
1005,
9007,
7030,
445,
370,
3263,
983,
51973,
1507,
341,
286,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_assembly() {
use functional::*;
let a = black_box(arr![i32; 1, 3, 5, 7]);
let b = black_box(arr![i32; 2, 4, 6, 8]);
let c = (&a).zip(b, |l, r| l + r);
let d = a.fold(0, |a, x| a + x);
assert_eq!(c, arr![i32; 3, 7, 11, 15]);
assert_eq!(... | rust_cleaned_test_functions.jsonl/122381 | {
"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,
11898,
5642,
368,
341,
286,
990,
15629,
79304,
286,
1077,
264,
284,
3691,
10194,
10939,
20703,
72,
18,
17,
26,
220,
16,
11,
220,
18,
11,
220,
20,
11,
220,
22,
2558,
286,
1077,
293,
284,
3691... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_persist_checkpoint_builder_others() {
let pckpt_orig =
part_ckpt!("table_1", "partition_1", {1 => (10, 20), 2 => (5, 15), 3 => (15, 25)});
let mut builder = PersistCheckpointBuilder::new(pckpt_orig.clone());
builder.register_other_partition(
&part... | rust_cleaned_test_functions.jsonl/6753 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 289
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
4975,
55208,
28532,
14179,
2985,
368,
341,
286,
1077,
281,
68175,
35328,
4035,
310,
949,
62,
68175,
17223,
2005,
62,
16,
497,
330,
40998,
62,
16,
497,
314,
16,
589,
320,
16,
15,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hash() {
assert_ne!(hash(FloatOrd(0.0f64)), hash(FloatOrd(-0.0f64)));
assert_ne!(hash(FloatOrd(0.0f32)), hash(FloatOrd(-0.0f32)));
assert_eq!(hash(FloatOrd(-0.0f64)), hash(FloatOrd(-0.0f64)));
assert_eq!(hash(FloatOrd(0.0f32)), hash(FloatOrd(0.0f32)));
ass... | rust_cleaned_test_functions.jsonl/56699 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 462
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
368,
341,
286,
2060,
13925,
10297,
8296,
57178,
24621,
7,
15,
13,
15,
69,
21,
19,
5731,
5175,
57178,
24621,
4080,
15,
13,
15,
69,
21,
19,
4945,
286,
2060,
13925,
10297,
8296,
57178,
2462... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_multiple_patterns() {
let mut grok = Grok::empty();
grok.insert_definition("YEAR", r"(\d\d){1,2}");
grok.insert_definition("MONTH", r"\b(?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May|Jun(?:e)?|Jul(?:y)?|Aug(?:ust)?|Sep(?:tember)?|Oct(?:ober)?|Nov(?:ember)?|Dec(?:... | rust_cleaned_test_functions.jsonl/117569 | {
"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,
45233,
64923,
368,
341,
286,
1077,
5206,
10487,
74,
284,
17888,
74,
486,
3194,
543,
286,
10487,
74,
7030,
31698,
445,
87201,
497,
435,
1,
11520,
67,
34487,
6098,
16,
11,
17,
20305,
286,
10487,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_target_description_custom_empty() {
block_on(test_fetch_target_description(
"custom-empty".to_string(),
TargetDescription::from_slice_with_custom(
"target with empty custom metadata".as_bytes(),
&[HashAlgorithm::Sha256],
... | rust_cleaned_test_functions.jsonl/25472 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 207
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11803,
11123,
11448,
15875,
15124,
368,
341,
286,
2504,
4470,
8623,
11803,
11123,
11448,
1006,
310,
330,
9163,
39433,
3263,
983,
3904,
3148,
310,
13483,
5009,
486,
1499,
26488,
6615,
15875,
1006,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sub() {
assert_eq!(u5(1) - u5(1), u5(0));
assert_eq!(u5(3) - u5(2), u5(1));
assert_eq!(i1(-1) - i1(-1) , i1(0));
assert_eq!(i7::MIN - i7::MIN , i7(0));
assert_eq!(i7(4) - i7(-3), i7(7));
assert_eq!(i7(-4) - i7(3), i7(-7));
assert_eq!(i7(-3... | rust_cleaned_test_functions.jsonl/112533 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 225
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
368,
341,
286,
2060,
10714,
10297,
84,
20,
7,
16,
8,
481,
575,
20,
7,
16,
701,
575,
20,
7,
15,
1106,
286,
2060,
10714,
10297,
84,
20,
7,
18,
8,
481,
575,
20,
7,
17,
701,
575,
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_get_decoders() {
// supported encodings
create_and_check_decoder::<Int32Type>(Encoding::PLAIN, None);
create_and_check_decoder::<Int32Type>(Encoding::DELTA_BINARY_PACKED, None);
create_and_check_decoder::<Int32Type>(Encoding::DELTA_LENGTH_BYTE_ARRAY, None);
... | rust_cleaned_test_functions.jsonl/38503 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 548
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
13783,
52498,
368,
341,
286,
442,
7248,
3209,
58335,
198,
286,
1855,
8378,
7200,
49843,
27638,
1072,
18,
17,
929,
2235,
14690,
486,
90889,
11,
2240,
317,
286,
1855,
8378,
7200,
49843,
27638,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_handler_error_cases() {
let mem = GuestMemory::new(&[(GuestAddress(0), 0x10000)]).unwrap();
let (mut h, _txq, _rxq) = default_test_netepollhandler(&mem, TestMutators::default());
// RX rate limiter events should error since the limiter is not blocked.
// Validate... | rust_cleaned_test_functions.jsonl/84699 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 391
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10183,
4096,
41427,
368,
341,
286,
1077,
1833,
284,
26215,
10642,
486,
931,
2099,
9697,
37804,
4286,
7,
15,
701,
220,
15,
87,
16,
15,
15,
15,
15,
7252,
568,
15454,
543,
286,
1077,
320,
6984,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_array_module() -> Result<()> {
let db = Connection::open_in_memory()?;
array::load_module(&db)?;
let v = vec![1i64, 2, 3, 4];
let values: Vec<Value> = v.into_iter().map(Value::from).collect();
let ptr = Rc::new(values);
{
let mut stmt ... | rust_cleaned_test_functions.jsonl/76875 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 425
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
10750,
368,
1464,
5714,
71698,
341,
286,
1077,
2927,
284,
11032,
486,
2508,
1243,
19195,
94136,
286,
1334,
486,
1078,
10750,
2099,
1999,
89720,
286,
1077,
348,
284,
7486,
20703,
16,
72,
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... | 7 |
#[test]
fn test_derive_serialize_proc_macro() {
assert_expand(
"serde_derive",
"Serialize",
"1.0",
r"struct Foo {}",
include_str!("fixtures/test_serialize_proc_macro.txt"),
);
} | rust_cleaned_test_functions.jsonl/72669 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 124
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35345,
533,
88686,
24436,
58810,
368,
341,
262,
2060,
67875,
1006,
286,
330,
47024,
35345,
533,
756,
286,
330,
15680,
756,
286,
330,
16,
13,
15,
756,
286,
435,
80575,
33428,
4687,
756,
286,
2924... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_isaac64_new_uninitialized() {
// Compare the results from initializing `IsaacRng` with
// implementation when used uninitialized.
// first block.
let mut rng = Isaac64Rng::seed_from_u64(0);
let mut results = [0u64; 16];
for i in r... | rust_cleaned_test_functions.jsonl/5538 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 480
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
64705,
21,
19,
5921,
4907,
36161,
368,
341,
286,
442,
23768,
279,
3059,
504,
57060,
1565,
3872,
64705,
49,
968,
63,
448,
8945,
286,
442,
8129,
979,
1483,
97287,
624,
1789,
286,
442,
1156,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_hidden_file_attribute() {
use std::os::windows::fs::OpenOptionsExt;
let te = TestEnv::new(DEFAULT_DIRS, DEFAULT_FILES);
const FILE_ATTRIBUTE_HIDDEN: u32 = 2;
fs::OpenOptions::new()
.create(true)
.write(true)
.attributes(FILE_ATTRIBUTE_HIDDEN)
... | rust_cleaned_test_functions.jsonl/10863 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 235
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26739,
2458,
16791,
368,
341,
262,
990,
1460,
486,
436,
486,
27077,
486,
3848,
486,
5002,
3798,
6756,
401,
262,
1077,
1013,
284,
3393,
14359,
486,
931,
43175,
90560,
11,
11955,
48010,
626,
1066,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_no_contribution_to_bankrupt_pool() {
new_test_ext().execute_with(|| {
set_block_1();
setup_workers(1);
setup_pool_with_workers(1, &[1]); // pid = 0
assert_ok!(PhalaStakePool::contribute(
Origin::signed(1),
0,
100 * DOLLARS
));
assert_ok!(PhalaStakePool::... | rust_cleaned_test_functions.jsonl/60465 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 456
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
3382,
31140,
2346,
35733,
6585,
15709,
368,
341,
298,
8638,
4452,
9927,
1005,
10257,
6615,
79453,
341,
571,
8196,
7113,
62,
16,
543,
571,
84571,
43557,
7,
16,
317,
571,
84571,
15709,
6615,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_unified_disabled() {
// Allow invalid yatp config when yatp is not used.
let unified = UnifiedReadPoolConfig {
min_thread_count: 0,
max_thread_count: 0,
};
assert!(unified.validate().is_err());
let storage = StorageReadPoolConfig::d... | rust_cleaned_test_functions.jsonl/30859 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 612
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
1870,
51401,
368,
341,
286,
442,
26530,
8318,
131454,
79,
2193,
979,
131454,
79,
374,
537,
1483,
624,
286,
1077,
42690,
284,
72434,
4418,
10551,
2648,
341,
310,
1308,
10814,
3180,
25,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_progress_resume_by_heartbeat_resp() {
let l = default_logger();
let mut raft = new_test_raft(1, vec![1, 2], 5, 1, new_storage(), &l);
raft.become_candidate();
raft.become_leader();
raft.mut_prs().get_mut(2).unwrap().paused = true;
raft.step(new_message(1, 1, MessageType:... | rust_cleaned_test_functions.jsonl/19082 | {
"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,
27200,
58132,
3710,
62,
72471,
35160,
368,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
1077,
5206,
52455,
284,
501,
4452,
62,
2944,
7,
16,
11,
7486,
20703,
16,
11,
220,
17,
1125,
220,
20,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lazy_query_7() {
let date = NaiveDate::from_ymd(2021, 3, 5);
let dates = [
NaiveDateTime::new(date, NaiveTime::from_hms(12, 0, 0)),
NaiveDateTime::new(date, NaiveTime::from_hms(12, 1, 0)),
NaiveDateTime::new(date, NaiveTime::from_hms(12, 2, 0)),
NaiveDateT... | rust_cleaned_test_functions.jsonl/124 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 573
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49646,
5738,
62,
22,
368,
341,
262,
1077,
2400,
284,
12812,
533,
1916,
486,
1499,
62,
1600,
67,
7,
17,
15,
17,
16,
11,
220,
18,
11,
220,
20,
317,
262,
1077,
12713,
284,
2278,
286,
12812,
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_string_dictionary_builder_with_existing_dictionary() {
let dictionary = StringArray::from(vec![None, Some("def"), Some("abc")]);
let key_builder = PrimitiveBuilder::<Int8Type>::new(6);
let mut builder =
StringDictionaryBuilder::new_with_dictionary(key_builder... | rust_cleaned_test_functions.jsonl/31002 | {
"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,
3904,
42605,
28532,
6615,
62630,
42605,
368,
341,
286,
1077,
10997,
284,
923,
1857,
486,
1499,
25592,
20703,
4064,
11,
4329,
445,
750,
3975,
4329,
445,
13683,
899,
10149,
286,
1077,
1376,
28532,
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_from_receiver() {
let (tx, rx) = channel();
tx.send("whale".to_string());
let mut f = Future::from_receiver(rx);
assert_eq!(f.get(), "whale".to_string());
} | rust_cleaned_test_functions.jsonl/12166 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 108
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
65691,
368,
341,
286,
1077,
320,
3998,
11,
19111,
8,
284,
5496,
543,
286,
9854,
5219,
445,
1312,
1574,
3263,
983,
3904,
1423,
286,
1077,
5206,
282,
284,
12498,
486,
1499,
65691,
75279,
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 |
#[test]
fn test_drain_inclusive_out_of_bounds() {
let mut v = vec![1, 2, 3, 4, 5];
v.drain(5..=5);
} | rust_cleaned_test_functions.jsonl/24426 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 65
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26680,
466,
1243,
8336,
6068,
3575,
36878,
368,
341,
262,
1077,
5206,
348,
284,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
262,
348,
950,
29093,
7,
20,
496,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_panic_tags() {
let pos_t = get::<Pos>();
let kind = pos_t.get_kind();
let pos_t = TaggedType::new(&pos_t, kind, Box::new(PanicDrop(42)));
assert_eq!(pos_t.get_tagged_data(), Some(&PanicDrop(42)));
} | rust_cleaned_test_functions.jsonl/101714 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
31270,
16333,
368,
341,
262,
1077,
1133,
528,
284,
633,
27638,
4859,
3913,
262,
1077,
3093,
284,
1133,
528,
670,
33162,
543,
262,
1077,
1133,
528,
284,
12353,
3556,
929,
486,
931,
2099,
966... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_exploded_window_function() -> Result<()> {
let df = fruits_cars();
let out = df
.clone()
.lazy()
.sort("fruits", false)
.select(vec![
col("fruits"),
col("B")
.shift(1)
.over(vec![col("fruits")])
... | rust_cleaned_test_functions.jsonl/22411 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 625
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2702,
500,
6737,
12571,
9174,
368,
1464,
5714,
71698,
341,
262,
1077,
6764,
284,
25322,
666,
1561,
1428,
262,
1077,
700,
284,
6764,
198,
286,
659,
19982,
741,
286,
659,
49013,
741,
286,
659,
686... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_units_mm() {
let vm = &mut VM::new();
vm.set_source("0.3E mm");
vm.evaluate_input();
assert_eq!(vm.last_error(), None);
assert_eq!(vm.f_stack().len(), 1);
let t = vm.f_stack().pop();
assert!(double_value_check(t, 0.000_3));
} | rust_cleaned_test_functions.jsonl/29586 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 163
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28345,
35599,
368,
341,
286,
1077,
10995,
284,
609,
6984,
17792,
486,
931,
543,
286,
10995,
980,
10347,
445,
15,
13,
18,
36,
9465,
797,
286,
10995,
36036,
5898,
543,
286,
2060,
10714,
10297,
733... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sort_stability() {
for len in (2..25).chain(500..510) {
for _ in 0..10 {
let mut counts = [0; 10];
// the second item represents which occurrence of that
// will occur in sorted order.
let mut v: ... | rust_cleaned_test_functions.jsonl/73343 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 534
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18435,
1261,
2897,
368,
341,
262,
369,
2422,
304,
320,
17,
496,
17,
20,
568,
8819,
7,
20,
15,
15,
496,
20,
16,
15,
8,
341,
286,
369,
716,
304,
220,
15,
496,
16,
15,
341,
310,
1077,
5206,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_memory() {
let memory = "backend=memory";
storage(memory).unwrap();
let memory = "backend=memory;extra=stuff";
assert!(storage(memory).is_err());
} | rust_cleaned_test_functions.jsonl/32308 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 94
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19195,
368,
341,
286,
1077,
4938,
284,
330,
20942,
28,
17269,
876,
286,
5819,
63230,
568,
15454,
1428,
286,
1077,
4938,
284,
330,
20942,
28,
17269,
26,
15460,
28,
57304,
876,
286,
2060,
10297,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_find_magnitude_of_added_snailfish_numbers() {
// given
let input = "[[[0,[5,8]],[[1,7],[9,6]]],[[4,[1,2]],[[1,4],2]]]\r\n\
[[[5,[2,8]],4],[5,[[9,9],0]]]\r\n[6,[[[6,2],[5,6]],[[7,6],[4,7]]]]\r\n\
[[[6,[0,7]],[0,9]],[4,[9,[9,0... | rust_cleaned_test_functions.jsonl/60566 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 641
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
717,
34715,
3575,
37653,
28022,
604,
18170,
32964,
368,
341,
286,
442,
2661,
198,
286,
1077,
1946,
284,
10545,
15505,
15,
17259,
20,
11,
23,
60,
14955,
58,
16,
11,
22,
14955,
24,
11,
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_find_roots_linear() {
assert_eq!(find_roots_linear(0f32, 0f32), Roots::One([0f32]));
assert_eq!(find_roots_linear(2f64, 1f64), Roots::One([-0.5f64]));
assert_eq!(find_roots_linear(0f32, 1f32), Roots::No([]));
} | rust_cleaned_test_functions.jsonl/98048 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 134
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
26608,
2412,
40674,
368,
341,
286,
2060,
10714,
10297,
3903,
26608,
2412,
40674,
7,
15,
69,
18,
17,
11,
220,
15,
69,
18,
17,
701,
74587,
486,
3966,
2561,
15,
69,
18,
17,
14382,
286,
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_config_manager__config_dir_exists__success() -> TestResult {
let cm = ConfigManager {};
let (_config_dir, _tmp_dir) = set_and_create_config_dir()?;
let config_dir_exists = cm.config_dir_exists();
env::remove_var("HOME");
assert!(config_dir_exists);
... | rust_cleaned_test_functions.jsonl/81013 | {
"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,
5332,
12144,
563,
1676,
4334,
9766,
563,
5630,
368,
1464,
3393,
2077,
341,
286,
1077,
9961,
284,
5532,
2043,
9321,
286,
1077,
5453,
1676,
4334,
11,
716,
5173,
4334,
8,
284,
738,
8378,
8657,
5332... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_validate_max_gas_units_below_min() {
let (config, key) = config_builder::test_config();
let (vm_validator, mut rt) = TestValidator::new(&config);
let address = account_config::association_address();
let txn = transaction_test_helpers::get_test_signed_transaction(
address... | rust_cleaned_test_functions.jsonl/2298 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 316
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
6345,
82116,
28345,
82750,
7260,
368,
341,
262,
1077,
320,
1676,
11,
1376,
8,
284,
2193,
28532,
486,
1944,
5332,
543,
262,
1077,
320,
7338,
64959,
11,
5206,
16677,
8,
284,
3393,
14256,
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_try_into_ndarray1_0() {
let hw = RefCell::new(CpuHardware::new());
let src = Array::fill_f32(&hw, Shape::new([0]), 42.);
let dest = ndarray::Array1::<f32>::try_from(&src).unwrap();
assert_eq!(dest, ndarray::arr1(&[]));
} | rust_cleaned_test_functions.jsonl/73965 | {
"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,
53283,
45514,
43544,
1653,
16,
62,
15,
368,
341,
262,
1077,
31256,
284,
8550,
3599,
486,
931,
3025,
5584,
66862,
486,
931,
1423,
262,
1077,
2286,
284,
2910,
486,
7559,
761,
18,
17,
2099,
27827,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dominance_frontiers() {
let graph = create_test_graph();
let dominance_frontiers = graph.compute_dominance_frontiers(1).unwrap();
assert_eq!(
dominance_frontiers.get(&1).unwrap(),
&vec![].into_iter().collect()
);
assert_eq!(
... | rust_cleaned_test_functions.jsonl/1478 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 491
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
7970,
681,
22926,
4813,
368,
341,
286,
1077,
4771,
284,
1855,
4452,
14738,
543,
286,
1077,
43492,
22926,
4813,
284,
4771,
35347,
814,
7970,
681,
22926,
4813,
7,
16,
568,
15454,
1428,
286,
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_from_dec_lit() {
let d = Decimal::<2>::from_str("-17.5").unwrap();
assert_eq!(d.coeff, -1750);
} | rust_cleaned_test_functions.jsonl/12017 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 78
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
13783,
98399,
368,
341,
286,
1077,
294,
284,
26728,
27638,
17,
6831,
1499,
2895,
13645,
16,
22,
13,
20,
1827,
15454,
543,
286,
2060,
10714,
10297,
67,
86462,
11,
481,
16,
22,
20,
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 |
#[test]
fn test_accountsdb_add_root() {
morgan_logger::setup();
let paths = get_tmp_accounts_path!();
let db = AccountsDB::new(&paths.paths);
let key = Pubkey::default();
let account0 = Account::new(1, 0, 0, &key);
db.store(0, &[(&key, &account0)]);
db.ad... | rust_cleaned_test_functions.jsonl/49122 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55665,
1999,
2891,
12993,
368,
341,
286,
296,
8462,
27413,
486,
15188,
543,
286,
1077,
12716,
284,
633,
16125,
55665,
2638,
0,
543,
286,
1077,
2927,
284,
40655,
3506,
486,
931,
2099,
21623,
65345,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_arg_matches_unicode() {
let argv = vec!["lsd", "--icon-theme", "unicode"];
let matches = app::build().get_matches_from_safe(argv).unwrap();
assert_eq!(
Some(IconTheme::Unicode),
IconTheme::from_arg_matches(&matches)
);
} | rust_cleaned_test_functions.jsonl/17365 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 157
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
6057,
38344,
54662,
368,
341,
286,
1077,
10213,
284,
7486,
0,
1183,
4730,
67,
497,
14482,
1924,
33185,
497,
330,
24519,
6332,
286,
1077,
9071,
284,
906,
486,
5834,
1005,
455,
38344,
5673,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ref_middle() {
let mut cache = Cache::with_capacity(100);
let key1 = Key::Rid(RID(1));
let key2 = Key::Rid(RID(2));
let key3 = Key::Rid(RID(3));
let dbs = Box::new(DivBufShared::from(vec![0u8; 5]));
cache.insert(key1, dbs);
let dbs = Box::new(DivBufShared::from(ve... | rust_cleaned_test_functions.jsonl/90044 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 491
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
7793,
62580,
368,
341,
262,
1077,
5206,
6500,
284,
19479,
486,
4197,
35603,
7,
16,
15,
15,
317,
262,
1077,
1376,
16,
284,
5309,
486,
49,
307,
2785,
915,
7,
16,
1106,
262,
1077,
1376,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_truncating_serializer() {
// Test truncate front.
let body = vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
let ser =
TruncatingSerializer::new(Buf::new(body.clone(), ..), TruncateDirection::DiscardFront)
.into_verifying(true);
... | rust_cleaned_test_functions.jsonl/131784 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1383
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3547,
1347,
1095,
67441,
368,
341,
1789,
286,
442,
3393,
56772,
4065,
624,
23459,
286,
1077,
2487,
284,
7486,
20703,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
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_line_len_rope() {
use crate::commandline;
let (rope, s) = commandline::from_path(Some("./KJV.txt".to_string()));
assert_eq!(s, Some("./KJV.txt".to_string()));
let v = rope.line(0).as_str().unwrap_or("\n").trim().chars().collect::<Vec<char>>();
assert_eq!(v.len(), 66);
} | rust_cleaned_test_functions.jsonl/131723 | {
"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,
6528,
6043,
26608,
375,
368,
341,
262,
990,
17717,
486,
5631,
1056,
280,
262,
1077,
320,
299,
375,
11,
274,
8,
284,
3210,
1056,
486,
1499,
2638,
65405,
13988,
42,
77891,
3909,
3263,
983,
3904,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_delete_trackers_from_memory() {
let responder = init_responder(MockedServerQuery::Regular);
// Add user to the database
let user_id = get_random_user_id();
responder
.dbm
.lock()
.unwrap()
.store_user(user_id, &User... | rust_cleaned_test_functions.jsonl/55484 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 910
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11353,
28545,
388,
5673,
19195,
368,
341,
286,
1077,
64034,
284,
2930,
4918,
20328,
66436,
291,
5475,
2859,
486,
30404,
626,
286,
442,
2691,
1196,
311,
279,
4625,
198,
286,
1077,
1196,
842,
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_cond() {
expect_prog(r#"let a = 5; a == 5"#, Value::Boolean(true));
expect_prog(r#"let a = 5.0; a == 5.0"#, Value::Boolean(true));
expect_prog(r#"let a = 5.001; a >= 5"#, Value::Boolean(true));
expect_prog(r#"let a = 5.001; a <= 5"#, Value::Boolean(false));
} | rust_cleaned_test_functions.jsonl/77503 | {
"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,
24433,
368,
341,
262,
1720,
60390,
2601,
55543,
1149,
264,
284,
220,
20,
26,
264,
621,
220,
20,
57676,
11,
5162,
486,
6890,
3715,
1106,
262,
1720,
60390,
2601,
55543,
1149,
264,
284,
220,
20,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_add_to_trie() {
let mut builder = DictionaryBuilder::default();
builder.add_to_trie("abc", 0);
builder.add_to_trie("abc", 1);
builder.add_to_trie("abcd", 2);
assert!(builder.trie_keys["abc"].contains(&0));
assert!(builder.trie_keys["abc"].contains(&1));
assert!(builde... | rust_cleaned_test_functions.jsonl/134073 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 157
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
2346,
3547,
645,
368,
341,
262,
1077,
5206,
7363,
284,
10466,
3297,
486,
2258,
543,
262,
7363,
1364,
2346,
3547,
645,
445,
13683,
497,
220,
15,
317,
262,
7363,
1364,
2346,
3547,
645,
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_process_nonce_ix_no_acc_data_fail() {
assert_eq!(
process_nonce_instruction(&system_instruction::advance_nonce_account(
&Pubkey::default(),
&Pubkey::default()
)),
Err(InstructionError::InvalidAccountData),
);
... | rust_cleaned_test_functions.jsonl/73059 | {
"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,
11305,
48508,
62686,
6536,
17737,
1769,
22121,
368,
341,
286,
2060,
10714,
33673,
310,
1882,
48508,
54923,
2099,
8948,
54923,
486,
59320,
48508,
13500,
1006,
394,
609,
29162,
792,
486,
2258,
3148,
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 |
#[test]
fn test_to_packets_pinning() {
let recycler = PacketsRecycler::default();
for i in 0..2 {
let _first_packets = Packets::new_with_recycler(recycler.clone(), i + 1, "first one");
}
} | rust_cleaned_test_functions.jsonl/32597 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 116
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
63569,
620,
19770,
368,
341,
286,
1077,
1395,
10760,
284,
13795,
1415,
3820,
10760,
486,
2258,
543,
286,
369,
600,
304,
220,
15,
496,
17,
341,
310,
1077,
716,
3896,
63569,
284,
13795,
1415... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_get_item() {
let gil = Python::acquire_gil();
let py = gil.python();
let v = vec![2, 3, 5, 7];
let list = v.to_py_object(py);
assert_eq!(2, list.get_item(py, 0).extract::<i32>(py).unwrap());
assert_eq!(3, list.get_item(py, 1).extract::<i32>(py).unw... | rust_cleaned_test_functions.jsonl/4741 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 250
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
5634,
368,
341,
286,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
286,
1077,
4510,
284,
342,
321,
43193,
543,
286,
1077,
348,
284,
7486,
20703,
17,
11,
220,
18,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_random_access_skip() {
let xs = [1, 2, 3, 4, 5];
let empty: &[int] = [];
check_randacc_iter(xs.iter().skip(2), xs.len() - 2);
check_randacc_iter(empty.iter().skip(2), 0);
} | rust_cleaned_test_functions.jsonl/1030 | {
"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,
22644,
12759,
44830,
368,
341,
286,
1077,
11943,
284,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
286,
1077,
4287,
25,
44590,
396,
60,
284,
5907,
286,
1779,
33864,
4475... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_segment_postings_seek() -> crate::Result<()> {
let mut docs = vec![0];
for i in 0..1300 {
docs.push((i * i / 100) + i);
}
let mut block_postings = build_block_postings(&docs[..])?;
for i in &[0, 424, 10000] {
block_postings.se... | rust_cleaned_test_functions.jsonl/40751 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 327
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7113,
28061,
6333,
819,
74473,
368,
1464,
17717,
486,
2077,
71698,
341,
286,
1077,
5206,
26340,
284,
7486,
20703,
15,
935,
286,
369,
600,
304,
220,
15,
496,
16,
18,
15,
15,
341,
310,
26340,
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... | 4 |
#[test]
fn test_handle_polyline() {
let input_str = include_str!("../fixtures/input.polyline.txt").to_string();
assert_eq!(
handle_polyline(input_str, "5", 0.).unwrap(),
vec![
GridGeom::Line(Line::new((-120.2, 38.5), (-120.95, 40.7))),
Grid... | rust_cleaned_test_functions.jsonl/133000 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 226
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10630,
36133,
1056,
368,
341,
286,
1077,
1946,
2895,
284,
2924,
2895,
17223,
1244,
45247,
39990,
64581,
1056,
3909,
1827,
983,
3904,
543,
286,
2060,
10714,
33673,
310,
3705,
36133,
1056,
5384,
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... | 1 |
#[test]
fn test_custom_bounds() {
let mut map: SendMap = TypeMap::custom();
map.insert::<KeyType>(Value(10));
assert!(map.contains::<KeyType>());
map.remove::<KeyType>();
assert!(!map.contains::<KeyType>());
} | rust_cleaned_test_functions.jsonl/33446 | {
"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,
15875,
36878,
368,
341,
286,
1077,
5206,
2415,
25,
11000,
2227,
284,
3990,
2227,
486,
9163,
543,
286,
2415,
7030,
27638,
97964,
2235,
1130,
7,
16,
15,
1106,
286,
2060,
10297,
2186,
8786,
27638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_kr_definition1() {
use ast::DerivedDeclarator::{KRFunction, Pointer};
use ast::Statement::Compound;
use ast::TranslationUnit;
use ast::TypeSpecifier::{Char, Int};
use parser::translation_unit;
let env = &mut Env::new();
assert_eq!(
translation_unit("int main... | rust_cleaned_test_functions.jsonl/107585 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1176
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4698,
81,
31698,
16,
368,
341,
262,
990,
11763,
486,
67843,
1912,
12821,
850,
22964,
61884,
5152,
11,
21635,
2440,
262,
990,
11763,
486,
8636,
486,
43134,
280,
262,
990,
11763,
486,
24412,
4562,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cmp() {
assert_eq!(
parse("CMP RX0 5 10").unwrap().body,
vec![Node(
Statement::Operator(Node(
Operator::Cmp(
Node(RegisterRef::User(0), span(1, 5, 1, 8)),
Node(
... | rust_cleaned_test_functions.jsonl/118221 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 560
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35193,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
445,
93158,
28170,
15,
220,
20,
220,
16,
15,
1827,
15454,
1005,
2599,
345,
310,
7486,
20703,
1955,
1006,
394,
21756,
486,
18461,
22078,
1006,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_file_name_only() {
let query = "lib";
let line = "crates/extracted_fzy/src/lib.rs";
let (_, origin_indices) = fuzzy_indices_fzy(line, query).unwrap();
let (_, indices) = apply_fzy_on_file_line(line, query).unwrap();
assert_eq!(origin_indices, indices);
... | rust_cleaned_test_functions.jsonl/115950 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 151
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
1269,
18410,
368,
341,
286,
1077,
3239,
284,
330,
2740,
876,
286,
1077,
1555,
284,
330,
5082,
973,
14,
23493,
291,
761,
4246,
13437,
8194,
25638,
876,
286,
1077,
39464,
6238,
18333,
8,
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_verify_slice_with_hashes1() {
solana_logger::setup();
let zero = Hash::default();
let one = hash(zero.as_ref());
let two = hash(one.as_ref());
assert!(vec![][..].verify(&one)); // base case
assert!(vec![Entry::new_tick(1, &two)][..].verify(&one)); ... | rust_cleaned_test_functions.jsonl/1635 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 393
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35638,
26488,
6615,
91616,
16,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
7168,
284,
6531,
486,
2258,
543,
286,
1077,
825,
284,
5175,
13174,
2328,
5357,
7793,
1423,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_group_common_pairs() {
// Given
let bpe_pairs = generate_bpe_pair_vocab();
let test_tuples = [
(
vec![
"h".to_owned(),
"e".to_owned(),
"l".to_owned(),
"l".t... | rust_cleaned_test_functions.jsonl/13640 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1244
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6288,
21107,
36430,
368,
341,
286,
442,
286,
16246,
198,
286,
1077,
293,
375,
36430,
284,
6923,
880,
375,
14445,
52823,
1428,
286,
1077,
1273,
89269,
284,
2278,
310,
2399,
394,
7486,
90515,
503,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_get_version_jar_url() {
let manifest = VersionManifest::default();
let url = manifest
.find_version("20w48a")
.expect("Failed to find this version")
.jar_url()
.expect("Failed to find the version server jar");
assert_eq!(ur... | rust_cleaned_test_functions.jsonl/73540 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 211
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
9438,
5374,
277,
2903,
368,
341,
286,
1077,
14455,
284,
6079,
38495,
486,
2258,
1428,
286,
1077,
2515,
284,
14455,
198,
310,
659,
3903,
9438,
445,
17,
15,
86,
19,
23,
64,
1138,
310,
659,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_chunked() {
let req = TestRequest::default().finish();
assert!(!req.chunked().unwrap());
let req =
TestRequest::with_header(header::TRANSFER_ENCODING, "chunked").finish();
assert!(req.chunked().unwrap());
let req = TestRequest::default()
... | rust_cleaned_test_functions.jsonl/7652 | {
"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,
30539,
291,
368,
341,
286,
1077,
4232,
284,
3393,
1900,
486,
2258,
1005,
30150,
543,
286,
2060,
0,
3471,
2958,
47806,
291,
1005,
15454,
5231,
286,
1077,
4232,
4035,
310,
3393,
1900,
486,
4197,
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... | 1 |
#[test]
fn test_f_order() {
// even if the underlying memory order is different
let c = arr2(&[[1, 2, 3], [4, 5, 6]]);
let mut f = Array::zeros(c.dim().f());
f.assign(&c);
assert_eq!(f, c);
assert_eq!(f.shape(), c.shape());
assert_eq!(c.strides(), &[3, 1]);
assert_eq!(f.stri... | rust_cleaned_test_functions.jsonl/92620 | {
"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,
761,
7869,
368,
341,
1066,
262,
442,
1496,
421,
279,
16533,
4938,
1973,
374,
2155,
198,
262,
1077,
272,
284,
2890,
17,
2099,
15505,
16,
11,
220,
17,
11,
220,
18,
1125,
508,
19,
11,
220,
20,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_as_string(){
let json_value = from_str("\"dog\"").unwrap();
let json_str = json_value.as_string();
let expected_str = "dog";
assert_eq!(json_str, Some(expected_str));
} | rust_cleaned_test_functions.jsonl/6570 | {
"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,
11898,
3904,
3032,
286,
1077,
2951,
3142,
284,
504,
2895,
38915,
18457,
2105,
1827,
15454,
543,
286,
1077,
2951,
2895,
284,
2951,
3142,
5357,
3904,
543,
286,
1077,
3601,
2895,
284,
330,
18457,
876... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_size() {
// size of a pointer.
assert_eq!(
std::mem::size_of::<List<'_, i32>>(),
std::mem::size_of::<*const u8>()
);
} | rust_cleaned_test_functions.jsonl/17503 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 117
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2368,
368,
341,
9401,
41693,
262,
442,
1379,
315,
264,
7445,
624,
262,
2060,
10714,
33673,
286,
1460,
486,
10536,
486,
2141,
3575,
27638,
852,
18291,
6878,
600,
18,
17,
2452,
3148,
286,
1460,
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 |
#[test]
fn test_file_path_with_no_dir() {
let (dir, name, ext) = file_path_name_ext("image.png");
assert_eq!(dir, None);
assert_eq!(name, "image");
assert_eq!(ext, Some("png"));
} | rust_cleaned_test_functions.jsonl/5160 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 114
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
2638,
6615,
6536,
4334,
368,
341,
286,
1077,
320,
3741,
11,
829,
11,
1303,
8,
284,
1034,
2638,
1269,
9927,
445,
1805,
3508,
797,
286,
2060,
10714,
10297,
3741,
11,
2240,
317,
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,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_insert_overwrite() {
let mut m = HashMap::new();
assert!(m.insert(1i, 2i));
assert_eq!(*m.find(&1).unwrap(), 2);
assert!(!m.insert(1i, 3i));
assert_eq!(*m.find(&1).unwrap(), 3);
} | rust_cleaned_test_functions.jsonl/41861 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 133
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
15431,
4934,
368,
341,
286,
1077,
5206,
296,
284,
10528,
486,
931,
543,
286,
2060,
10297,
76,
7030,
7,
16,
72,
11,
220,
17,
72,
1106,
286,
2060,
10714,
0,
4071,
76,
2658,
2099,
16,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_serialize_move_resource_with_address_0x0() {
let res = MoveResource::try_from(annotated_move_struct(
"Values",
vec![(
identifier("address_0x0"),
AnnotatedMoveValue::Address(address("0x0")),
)],
))
.unwrap... | rust_cleaned_test_functions.jsonl/66275 | {
"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,
88686,
17134,
17962,
6615,
6744,
62,
15,
87,
15,
368,
341,
286,
1077,
592,
284,
14561,
4783,
486,
1539,
5673,
7,
3401,
657,
17134,
15126,
1006,
310,
330,
6227,
756,
310,
7486,
20703,
1006,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_node_merge_dist_isolation() {
let mut cluster = new_node_cluster(0, 3);
configure_for_merge(&mut cluster);
let pd_client = Arc::clone(&cluster.pd_client);
pd_client.disable_default_operator();
cluster.run();
cluster.must_put(b"k1", b"v1");
cluster.must_put(b"k3", b"... | rust_cleaned_test_functions.jsonl/27249 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1084
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5084,
20888,
16031,
6892,
34962,
368,
341,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
220,
18,
317,
262,
14411,
5478,
20888,
2099,
6984,
10652,
317,
262,
1077,
7744,
8179,
284,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cmpxchg() {
let context = Context::create();
let module = context.create_module("cmpxchg");
let void_type = context.void_type();
let fn_type = void_type.fn_type(&[], false);
let fn_value = module.add_function("", fn_type, None);
let entry = context.append_basic_block(fn_... | rust_cleaned_test_functions.jsonl/125179 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2068
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35193,
87,
65940,
368,
341,
262,
1077,
2266,
284,
9608,
486,
3182,
543,
262,
1077,
4688,
284,
2266,
2520,
10750,
445,
7293,
87,
65940,
3071,
262,
1077,
737,
1819,
284,
2266,
13,
1004,
1819,
543,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fs_repr_display() {
assert_eq!(
format!("{}", FsRepr([0xa296db59787359df, 0x8d3e33077430d318, 0xd1abf5c606102eb7, 0xcbc33ee28108f0])),
"0x00cbc33ee28108f0d1abf5c606102eb78d3e33077430d318a296db59787359df".to_string()
);
assert_eq!(
format!("{}", FsRepr([0x14cb0... | rust_cleaned_test_functions.jsonl/95521 | {
"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,
34470,
68535,
14825,
368,
341,
262,
2060,
10714,
33673,
286,
3561,
79878,
84619,
693,
649,
2561,
15,
9591,
17,
24,
21,
1999,
20,
24,
22,
23,
22,
18,
20,
24,
2940,
11,
220,
15,
87,
23,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_no_bytes_written() {
macro_rules! test1 {
( $( $n:expr ),* ) => {
{
$(
let mut s = String::new();
let c = s.write_formatted(&$n, &Locale::en).unwrap();
assert_eq!(c, 5);
)*
... | rust_cleaned_test_functions.jsonl/88482 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 998
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
12524,
72403,
368,
341,
262,
18072,
21407,
0,
1273,
16,
341,
286,
320,
4930,
400,
77,
96011,
6882,
9,
873,
589,
341,
310,
341,
394,
400,
1006,
503,
1077,
5206,
274,
284,
923,
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_test_execvp() {
assert_emscripten_output!(
"../../emtests/test_execvp.wasm",
"test_execvp",
vec![],
"../../emtests/test_execvp.out"
);
} | rust_cleaned_test_functions.jsonl/26655 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 109
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4452,
18430,
15260,
368,
341,
262,
2060,
22504,
2282,
268,
7645,
33673,
286,
10208,
336,
23841,
12697,
18430,
15260,
1418,
10530,
756,
286,
330,
1944,
18430,
15260,
756,
286,
7486,
20703,
1259,
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 |
#[test]
fn test_hit() {
let block = Rect {
x: 0,
y: 0,
width: 10,
height: 10,
};
assert!(block.hit(1, 1))
} | rust_cleaned_test_functions.jsonl/79775 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 96
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37697,
368,
341,
262,
1077,
2504,
284,
11920,
341,
286,
856,
25,
220,
15,
345,
286,
379,
25,
220,
15,
345,
286,
2374,
25,
220,
16,
15,
345,
286,
2608,
25,
220,
16,
15,
345,
262,
2605,
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 |
#[test]
fn test_sound_inheritance() {
let parent = SoundBuilder::new(BaseBuilder::new())
.with_radius(1.0)
.with_gain(2.0)
.with_status(Status::Paused)
.with_pitch(2.0)
.with_playback_time(Duration::from_secs(2))
.with_looping(true)... | rust_cleaned_test_functions.jsonl/11303 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 359
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37676,
1243,
62443,
368,
341,
286,
1077,
2681,
284,
14594,
3297,
486,
931,
22225,
3297,
486,
931,
2398,
310,
659,
4197,
28936,
7,
16,
13,
15,
340,
310,
659,
4197,
39925,
7,
17,
13,
15,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_error() {
assert_eq!(
rsix::io::Error::INVAL,
rsix::io::Error::from_raw_os_error(rsix::io::Error::INVAL.raw_os_error())
);
assert_eq!(rsix::io::Error::INVAL.raw_os_error(), libc::EINVAL);
} | rust_cleaned_test_functions.jsonl/71295 | {
"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,
4096,
368,
341,
262,
2060,
10714,
33673,
286,
10036,
941,
486,
815,
486,
1454,
486,
27842,
345,
286,
10036,
941,
486,
815,
486,
1454,
486,
1499,
16067,
29387,
4096,
17027,
941,
486,
815,
486,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_encoded_pointer_uleb128() {
let encoding =
constants::DwEhPe(constants::DW_EH_PE_absptr.0 | constants::DW_EH_PE_uleb128.0);
let expected_rest = [1, 2, 3, 4];
let input = Section::with_endian(Endian::Little)
.uleb(0x12_3456)
.appe... | rust_cleaned_test_functions.jsonl/9411 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 446
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
73069,
21425,
62,
1111,
65,
16,
17,
23,
368,
341,
286,
1077,
11170,
4035,
310,
18021,
486,
35,
86,
36,
71,
10197,
80368,
486,
54219,
2089,
39,
45784,
22885,
2154,
376,
13,
15,
760,
1802... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_asn() {
let buffer = std::fs::read("./testdata/GeoLite2-ASN-Test.mmdb").unwrap();
let reader = Reader::<ASN>::from_bytes(&buffer).unwrap();
{
let result = reader
.lookup(IpAddr::from_str("1.128.0.0").unwrap())
.unwrap();
... | rust_cleaned_test_functions.jsonl/37387 | {
"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,
11898,
77,
368,
341,
286,
1077,
4147,
284,
1460,
486,
3848,
486,
878,
13988,
92425,
14,
37344,
43844,
17,
12,
68134,
12,
2271,
37008,
1999,
1827,
15454,
543,
286,
1077,
6604,
284,
25166,
27638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compatible_wpa3_mixed_rsne() {
let mut a_rsne =
make_rsne(Some(cipher::CCMP_128), vec![cipher::CCMP_128], vec![akm::SAE, akm::PSK]);
a_rsne.rsn_capabilities = Some(RsnCapabilities(0).with_mgmt_frame_protection_cap(true));
assert_eq!(is_rsn_compatible(&a_rsne),... | rust_cleaned_test_functions.jsonl/113750 | {
"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,
2965,
37079,
1670,
6595,
18,
717,
3286,
47115,
811,
368,
341,
286,
1077,
5206,
264,
47115,
811,
4035,
310,
1281,
47115,
811,
65405,
1337,
10558,
486,
3706,
5781,
62,
16,
17,
23,
701,
7486,
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_hit_test() {
use crate::math::point;
use crate::path::Path;
let mut builder = Path::builder();
builder.begin(point(0.0, 0.0));
builder.line_to(point(1.0, 0.0));
builder.line_to(point(1.0, 1.0));
builder.line_to(point(0.0, 1.0));
builder.end(true);
builder.beg... | rust_cleaned_test_functions.jsonl/34465 | {
"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,
37697,
4452,
368,
341,
262,
990,
17717,
486,
10374,
486,
2768,
280,
262,
990,
17717,
486,
2343,
486,
1820,
401,
262,
1077,
5206,
7363,
284,
7933,
486,
17850,
543,
262,
7363,
6848,
20235,
7,
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_conversion() {
let projstring = "
proj=pipeline step proj=unitconvert xy_in=us-ft
xy_out=m step inv proj=lcc lat_0=32.1666666666667
lon_0=-116.25 lat_1=33.8833333333333 lat_2=32.7833333333333
x_0=2000000.0001016 y_0=500000.00010... | rust_cleaned_test_functions.jsonl/133385 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 482
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64132,
368,
341,
1789,
286,
1077,
21333,
917,
284,
6228,
310,
21333,
17385,
8790,
3019,
21333,
28,
3843,
14166,
30784,
1243,
28,
355,
93624,
715,
310,
30784,
6068,
27221,
3019,
1529,
21333,
40627,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_basic_double_ops() -> Result<(), Error> {
let mut info = Data::new();
info.apply(&create_numeric_property!(parent: ROOT_ID, id: 3, name: "value",
value: Number::DoubleT(42.0)))?;
assert!(info.apply(&add_number!(id: 3, value: Number::Do... | rust_cleaned_test_functions.jsonl/10358 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 684
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34729,
24598,
21959,
368,
1464,
5714,
68843,
4600,
29,
341,
286,
1077,
5206,
3546,
284,
2885,
486,
931,
543,
286,
3546,
13045,
2099,
3182,
29418,
16638,
10297,
3765,
25,
35736,
3450,
11,
877,
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... | 2 |
#[test]
fn test_cb_called_on_success() {
let result = call_callback(Ok(String::from("Heyahh"))).unwrap();
assert_eq!(ErrorCode::Success, result.0);
assert_eq!(String::from("Heyahh"), result.1);
} | rust_cleaned_test_functions.jsonl/12836 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16450,
27859,
4470,
18632,
368,
341,
286,
1077,
1102,
284,
1618,
12519,
7,
11578,
2242,
486,
1499,
445,
18665,
1466,
71,
2761,
568,
15454,
543,
286,
2060,
10714,
10297,
30748,
486,
7188,
11,
1102,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_scopes() {
let request = parse(br#"{"command":"scopes","arguments":{"frameId":1000},"type":"request","seq":12}"#);
assert_match!(
request,
ProtocolMessage::Request(Request {
command: Command::Known(RequestArguments::scopes(..)),
... | rust_cleaned_test_functions.jsonl/113326 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 397
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13171,
18523,
368,
341,
286,
1077,
1681,
284,
4715,
41237,
55543,
4913,
5631,
3252,
80925,
2198,
16370,
22317,
6763,
764,
788,
16,
15,
15,
15,
51193,
1313,
3252,
2035,
2198,
13262,
788,
16,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_memory_full_cause_of_raft_message() {
let mut cluster = new_server_cluster(0, 2);
let pd_client = cluster.pd_client.clone();
cluster.pd_client.disable_default_operator();
let r1 = cluster.run_conf_change();
cluster.must_put(b"k1", b"v1");
pd_client.must_add_peer(r1, new_... | rust_cleaned_test_functions.jsonl/29349 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 973
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19195,
16372,
666,
3454,
3575,
62,
2944,
6462,
368,
341,
262,
1077,
5206,
10652,
284,
501,
12015,
28441,
7,
15,
11,
220,
17,
317,
262,
1077,
7744,
8179,
284,
10652,
556,
67,
8179,
15997,
543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_eval_def_cfa_expression() {
let expr = [1, 2, 3, 4];
let cie = make_test_cie();
let ctx = UnwindContext::new();
let mut expected = ctx.clone();
expected.set_cfa(CfaRule::Expression(Expression(EndianSlice::new(
&expr,
LittleEndian,
... | rust_cleaned_test_functions.jsonl/9353 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 306
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
7844,
666,
3632,
28068,
368,
341,
286,
1077,
15169,
284,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
935,
286,
1077,
272,
645,
284,
1281,
4452,
666,
645,
543,
286,
1077,
5635,
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_from_structured() {
let record = Record {
timestamp: 72,
severity: StreamSeverity::Error,
arguments: vec![
Argument { name: "arg1".to_string(), value: Value::SignedInt(-23) },
Argument { name: PID_LABEL.to_string(), valu... | rust_cleaned_test_functions.jsonl/67974 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2592
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
15126,
3073,
368,
341,
286,
1077,
3255,
284,
13583,
341,
310,
11441,
25,
220,
22,
17,
345,
310,
29920,
25,
9203,
65594,
486,
1454,
345,
310,
5977,
25,
7486,
90515,
394,
13818,
314,
829,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_char_at_reverse() {
let s = "ศไทย中华Việt Nam";
let v = vec!['ศ','ไ','ท','ย','中','华','V','i','ệ','t',' ','N','a','m'];
let mut pos = s.len();
for ch in v.iter().rev() {
assert!(s.char_at_reverse(pos) == *ch);
pos -= ch.to_string().len();
... | rust_cleaned_test_functions.jsonl/2459 | {
"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,
9232,
3752,
43277,
368,
341,
286,
1077,
274,
284,
330,
123863,
125451,
100849,
35544,
124382,
29974,
876,
286,
1077,
348,
284,
7486,
0,
677,
123863,
1844,
49756,
1844,
35884,
1844,
34509,
1844,
1594... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_clean_multiple_zero_lamport_decrements_index_ref_count() {
solana_logger::setup();
let accounts = AccountsDb::new(Vec::new(), &ClusterType::Development);
let pubkey1 = solana_sdk::pubkey::new_rand();
let pubkey2 = solana_sdk::pubkey::new_rand();
let zero_... | rust_cleaned_test_functions.jsonl/6964 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 900
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19573,
45233,
19359,
907,
309,
403,
2259,
837,
1368,
3560,
7793,
3180,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
1428,
286,
1077,
9618,
284,
40655,
7994,
486,
931,
49923,
486,
931,
1507,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_collect_expr() -> Result<()> {
let mut accum: HashSet<String> = HashSet::new();
expr_to_column_names(
&Expr::Cast {
expr: Box::new(col("a")),
data_type: DataType::Float64,
},
&mut accum,
)?;
expr_... | rust_cleaned_test_functions.jsonl/33212 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 356
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68140,
21915,
368,
1464,
5714,
71698,
341,
286,
1077,
5206,
15421,
25,
18931,
3464,
29,
284,
18931,
486,
931,
543,
286,
15169,
2346,
8744,
9187,
1006,
310,
609,
16041,
486,
18714,
341,
394,
15169,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_cast() {
let b = bson!(u64::MAX);
assert_eq!(b.cast_i64(), -1);
let b = bson!(100u64);
assert_eq!(b.cast_i64(), 100i64);
} | rust_cleaned_test_functions.jsonl/86737 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 108
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5303,
368,
341,
286,
1077,
293,
284,
50980,
10297,
84,
21,
19,
486,
10586,
317,
286,
2060,
10714,
10297,
65,
35091,
5318,
21,
19,
1507,
481,
16,
317,
286,
1077,
293,
284,
50980,
10297,
16,
15,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_components_radio() {
// Make component
let mut component = Radio::default()
.background(Color::Blue)
.foreground(Color::Red)
.borders(Borders::default())
.title("C'est oui ou bien c'est non?", Alignment::Center)
.choices... | rust_cleaned_test_functions.jsonl/101080 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1110
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23258,
49740,
368,
341,
286,
442,
7405,
3692,
198,
286,
1077,
5206,
3692,
284,
13484,
486,
2258,
741,
310,
659,
6742,
15028,
486,
10331,
340,
310,
659,
34919,
15028,
486,
6033,
340,
310,
659,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stale_resolver() {
let mut suite = TestSuite::new(3);
let fp = "before_schedule_resolver_ready";
fail::cfg(fp, "pause").unwrap();
// Close previous connection and open a new one twice time
let region = suite.cluster.get_region(&[]);
let mut req = ChangeDataRequest::defa... | rust_cleaned_test_functions.jsonl/47405 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2089
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1261,
1574,
91578,
368,
341,
262,
1077,
5206,
16182,
284,
3393,
28000,
486,
931,
7,
18,
626,
262,
1077,
12007,
284,
330,
14801,
34530,
91578,
35456,
876,
262,
3690,
486,
14072,
17815,
11,
330,
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... | 8 |
#[test]
fn test_align() {
assert_eq!(align(0b1111, 1), 0b1111);
assert_eq!(align(0b1111, 2), 0b1110);
assert_eq!(align(0b1111, 4), 0b1100);
} | rust_cleaned_test_functions.jsonl/50746 | {
"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,
37015,
368,
341,
286,
2060,
10714,
10297,
6612,
7,
15,
65,
16,
16,
16,
16,
11,
220,
16,
701,
220,
15,
65,
16,
16,
16,
16,
317,
286,
2060,
10714,
10297,
6612,
7,
15,
65,
16,
16,
16,
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_from_string_m() {
let d: Duration = DurationString::try_from(String::from("1m")).unwrap().into();
assert_eq!(d, Duration::from_secs(60));
} | rust_cleaned_test_functions.jsonl/97547 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 83
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
3904,
717,
368,
341,
286,
1077,
294,
25,
21045,
284,
21045,
703,
486,
1539,
5673,
2242,
486,
1499,
445,
16,
76,
15197,
15454,
1005,
18122,
543,
286,
2060,
10714,
10297,
67,
11,
21045,
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 |
#[test]
fn test_integer() {
assert_eq!(
Variant::VSingle(5.1).divide(Variant::VInteger(2)).unwrap(),
Variant::VSingle(2.55)
);
} | rust_cleaned_test_functions.jsonl/84607 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 140
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31725,
368,
341,
394,
2060,
10714,
33673,
503,
39292,
486,
53,
10888,
7,
20,
13,
16,
568,
59394,
12410,
15341,
486,
53,
3486,
7,
17,
4579,
15454,
3148,
503,
39292,
486,
53,
10888,
7,
17,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_distinct_with_subquery() {
let expected_sql = "SELECT DISTINCT (SELECT $1 FROM \"test2\"), \"bar\" FROM \"test\"";
let query = Select::from_table("test")
.value(Select::from_table("test2").value(val!(1)))
.column(Column::new("bar"))
.distinct()... | rust_cleaned_test_functions.jsonl/6449 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 196
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16031,
7800,
6615,
5228,
1631,
368,
341,
286,
1077,
3601,
18063,
284,
330,
4858,
59086,
320,
4858,
400,
16,
4295,
7245,
1944,
17,
2105,
701,
7245,
2257,
2105,
4295,
7245,
1944,
95349,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vertical_filter_with_kernel_taller_than_image_does_not_panic() {
let image = gray_image!(
1, 4, 1;
4, 7, 4;
1, 4, 1);
let kernel = vec![1f32 / 10f32; 10];
black_box(vertical_filter(&image, &kernel));
} | rust_cleaned_test_functions.jsonl/35607 | {
"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,
61203,
8727,
6615,
26876,
528,
13956,
51613,
4954,
96374,
7913,
620,
31270,
368,
341,
286,
1077,
2168,
284,
17545,
4954,
33673,
310,
220,
16,
11,
220,
19,
11,
220,
16,
280,
310,
220,
19,
11,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_banking_stage_entries_only() {
solana_logger::setup();
let GenesisBlockInfo {
genesis_block,
mint_keypair,
..
} = create_genesis_block(10);
let bank = Arc::new(Bank::new(&genesis_block));
let start_hash = bank.last_block... | rust_cleaned_test_functions.jsonl/58828 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2146
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
32334,
35238,
26092,
18410,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
40788,
4713,
1731,
341,
310,
59366,
7113,
345,
310,
28337,
3097,
12670,
345,
310,
54538,
286,
335,
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... | 4 |
#[test]
fn test_sync_channel() {
let c = MainContext::new();
let l = MainLoop::new(Some(&c), false);
c.acquire();
let (sender, receiver) = MainContext::sync_channel(Priority::default(), 2);
let sum = Rc::new(RefCell::new(0));
let sum_clone = sum.clone();
... | rust_cleaned_test_functions.jsonl/5023 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 695
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23008,
14571,
368,
341,
286,
1077,
272,
284,
4697,
1972,
486,
931,
543,
286,
1077,
326,
284,
4697,
14620,
486,
931,
65405,
2099,
66,
701,
895,
626,
286,
272,
69627,
1428,
286,
1077,
320,
11644,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_mtu() {
// ser is a Serializer that will consume 1 byte of buffer space
fn test<S: Serializer + Clone>(ser: S) {
// Each of these tests encapsulates ser in a DummyPacketBuilder.
// Test that an MTU of 3 is OK.
assert!... | rust_cleaned_test_functions.jsonl/83355 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 818
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
24494,
368,
341,
286,
442,
1420,
374,
264,
58822,
429,
686,
24057,
220,
16,
4922,
315,
4147,
3550,
198,
286,
5168,
1273,
18858,
25,
58822,
488,
27913,
2235,
799,
25,
328,
8,
341,
310,
442... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cancel_push_frame_on_request_stream() {
test_wrong_frame_on_request_stream(&[0x3, 0x1, 0x5], Error::WrongStream);
} | rust_cleaned_test_functions.jsonl/10927 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 72
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28895,
14218,
8929,
4470,
7893,
12673,
368,
341,
286,
1273,
75198,
8929,
4470,
7893,
12673,
2099,
58,
15,
87,
18,
11,
220,
15,
87,
16,
11,
220,
15,
87,
20,
1125,
4600,
486,
29185,
3027,
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 |
#[test]
fn test_rpc_getnewaddress() {
let client = TestClient::default();
client.requests().expect(vec![
request! {
method: "getnewaddress",
params: ["maintain"],
response: "mmoXxKhAwnhtFiAMvxJ82CKCBia751mzfY"
},
]);
let addr = client.getnewadd... | rust_cleaned_test_functions.jsonl/82253 | {
"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,
60799,
3062,
931,
4995,
368,
341,
262,
1077,
2943,
284,
3393,
2959,
486,
2258,
543,
262,
2943,
67671,
1005,
17119,
25592,
90515,
286,
1681,
0,
341,
310,
1714,
25,
330,
455,
931,
4995,
756,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.