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_query_matches_capturing_error_nodes() {
allocations::record(|| {
let language = get_language("javascript");
let query = Query::new(
language,
"
(ERROR (identifier) @the-error-identifier) @the-error
",
)
.unwrap()... | rust_cleaned_test_functions.jsonl/25153 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 291
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
38344,
666,
2689,
1677,
4096,
14896,
368,
341,
262,
69642,
486,
8548,
79453,
341,
286,
1077,
4128,
284,
633,
29021,
445,
14073,
797,
286,
1077,
3239,
284,
11361,
486,
931,
1006,
310,
4128,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_shasher() {
test_struct!([shasher="SimpleHasher"]
{ [] x: u64 = 0x12345678 }
[(SimpleHasher, Djb2Hasher, 0x12345678_u64)]);
} | rust_cleaned_test_functions.jsonl/43897 | {
"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,
3712,
33767,
368,
341,
262,
1273,
15126,
0,
2561,
927,
33767,
428,
16374,
6370,
261,
7026,
338,
314,
3056,
856,
25,
575,
21,
19,
284,
220,
15,
87,
16,
17,
18,
19,
20,
21,
22,
23,
456,
338,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_safe_checkout_typechange_tree_to_blob_with_conflicting() -> BitResult<()> {
BitRepo::with_sample_repo_no_sym(|repo| {
let target = commit! {
foo
bar
dir < "changed to a file"
};
rmdir!(repo: "dir");
touch!(repo: "dir" < "cha... | rust_cleaned_test_functions.jsonl/62985 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 237
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34067,
68186,
1819,
3373,
11663,
2346,
45908,
6615,
16059,
78208,
368,
1464,
6495,
2077,
71698,
341,
262,
6495,
25243,
486,
4197,
17491,
37784,
6536,
26825,
22428,
23476,
91,
341,
286,
1077,
2169,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_sss() {
let s1 = String::from("hello");
let s2 = &s1;
, 3, 4, 5];
let slice = &a[1..3];
println!("{:?}", slice);
} | rust_cleaned_test_functions.jsonl/51242 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
778,
368,
341,
286,
1077,
274,
16,
284,
923,
486,
1499,
445,
14990,
797,
286,
1077,
274,
17,
284,
609,
82,
16,
280,
286,
1154,
220,
18,
11,
220,
19,
11,
220,
20,
935,
2303,
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 |
#[test]
fn test_fn_signature_no_params() {
let info = call_info(
r#"fn foo<T>() -> T where T: Copy + Display {}
fn bar() { foo(<|>); }"#,
);
assert!(info.parameters().is_empty());
assert_eq!(
info.label(),
r#"
fn foo<T>() -> T
where T: Copy + ... | rust_cleaned_test_functions.jsonl/55350 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 230
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15246,
39859,
6536,
6745,
368,
341,
286,
1077,
3546,
284,
1618,
3109,
1006,
310,
435,
55543,
8822,
15229,
3125,
13555,
1464,
350,
1380,
350,
25,
14540,
488,
10623,
5613,
8822,
3619,
368,
314,
1522... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_variable_with_positive_integer_value() {
#[derive(serde_derive::Serialize)]
struct Map {
num: usize,
};
let map = Map { num: 231 };
let var = Variable::from_serializable(&map).unwrap();
let json_string = serde_json::to_strin... | rust_cleaned_test_functions.jsonl/108396 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 186
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
14635,
6615,
54160,
31725,
3142,
368,
341,
286,
11506,
27098,
7,
47024,
35345,
533,
486,
15680,
5563,
286,
2036,
5027,
341,
310,
1629,
25,
22301,
345,
286,
3634,
286,
1077,
2415,
284,
5027,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_esc_key() {
assert_eq!(
parse_event(b"\x1B", false).unwrap(),
Some(InternalEvent::Event(Event::Key(KeyCode::Esc.into()))),
);
} | rust_cleaned_test_functions.jsonl/21318 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 106
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
92196,
3097,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
6748,
1883,
11934,
87,
16,
33,
497,
895,
568,
15454,
3148,
310,
4329,
7,
11569,
1556,
486,
1556,
30469,
486,
1592,
41040,
486,
36121,
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 |
#[test]
fn test_runtime() {
let code = vec![
Inst::PushArg(MemRef::PrimFunc(PrimFuncPtr::new("+", &PRIM_ADD))),
Inst::PushArg(MemRef::Const(SimpleDatum::Num(Number::new_int(1, 0)))),
Inst::PushArg(MemRef::Const(SimpleDatum::Num(Number::new_int(2, 0)))),
In... | rust_cleaned_test_functions.jsonl/82076 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 273
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33232,
368,
341,
286,
1077,
2038,
284,
7486,
90515,
310,
5984,
486,
16644,
2735,
3189,
336,
3945,
486,
66191,
9626,
7,
66191,
9626,
5348,
486,
931,
34973,
497,
609,
6480,
1791,
8581,
41749,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_typed_arena_drop_count() {
let counter = Cell::new(0);
{
let arena: TypedArena<DropCounter<'_>> = TypedArena::default();
for _ in 0..100 {
// Allocate something with drop glue to make sure it doesn't leak.
arena.alloc(DropCounter { count: &counter ... | rust_cleaned_test_functions.jsonl/41100 | {
"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,
528,
32501,
62,
30527,
29584,
3180,
368,
341,
262,
1077,
5546,
284,
13972,
486,
931,
7,
15,
317,
262,
341,
286,
1077,
24902,
25,
50554,
93937,
27,
19871,
14099,
18291,
62,
2452,
284,
50554,
9393... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dfinance_executor_allows_0x0() {
let _pool = ConstPool::new();
let text = r"
script {
fun main() {}
}";
execute_script(
MoveFile::with_content(script_path(), text),
vec![],
"dfinance",
"0x0",
vec![],
)
.unwrap();
... | rust_cleaned_test_functions.jsonl/43921 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 257
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
62675,
81207,
5705,
4241,
62,
15,
87,
15,
368,
341,
262,
1077,
716,
10285,
284,
24522,
10551,
486,
931,
1428,
262,
1077,
1467,
284,
435,
698,
262,
5316,
341,
286,
2464,
1887,
368,
5613,
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_template_with_decltype_and_with_auto() -> Result<()> {
let ir = ir_from_cc(
r#" #pragma clang lifetime_elision
template <typename T1, typename T2>
struct MyTemplate {
static decltype(auto) TemplatedAdd(T1 a, T2 b) { return a + b; }
... | rust_cleaned_test_functions.jsonl/37179 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 416
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8693,
6615,
35814,
1313,
8378,
6615,
27740,
368,
1464,
5714,
71698,
341,
262,
1077,
6216,
284,
6216,
5673,
28955,
1006,
286,
435,
55543,
671,
6015,
18260,
19031,
21602,
1816,
198,
310,
3811,
366,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_local_in_wide_port_is_synthesizable() {
let mut dev = MISOWidePort::<64, 16>::default();
dev.bus.from_controller.connect();
dev.bus.select.connect();
dev.bus.strobe.connect();
dev.bus.clock.connect();
dev.port_in.connect();
dev.strobe_in.connect();
dev.connect_all... | rust_cleaned_test_functions.jsonl/124344 | {
"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,
13564,
1243,
1670,
577,
8716,
6892,
51393,
6375,
8335,
368,
341,
262,
1077,
5206,
3483,
284,
67025,
3307,
577,
7084,
27638,
21,
19,
11,
220,
16,
21,
6831,
2258,
543,
262,
3483,
48067,
6387,
2160... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_offset_calculation() {
assert_eq!(calculate_offsets(128, 8, 15, 1, 4, 4 ), (8, 0, 128, 144, 148));
assert_eq!(calculate_offsets(3, 1, 2, 1, 1, 1 ), (1, 0, 3, 5, 6));
assert_eq!(calculate_offsets(6, 2, 12, 4, 24, 8), (8, 0, 8, 24, 48));
} | rust_cleaned_test_functions.jsonl/120906 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 166
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6917,
38241,
2914,
368,
341,
286,
2060,
10714,
10297,
35597,
56924,
7,
16,
17,
23,
11,
220,
23,
11,
220,
16,
20,
11,
220,
16,
11,
220,
19,
11,
220,
19,
6882,
320,
23,
11,
220,
15,
11,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_add_trans_listener() -> Result<(), String> {
let keypair = identity::ed25519::Keypair::generate();
let local_id = Address::from(identity::PublicKey::Ed25519(keypair.public()));
let mut chain = Blockchain::new(&keypair);
let transaction = Transaction::new(
... | rust_cleaned_test_functions.jsonl/47213 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 467
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
7965,
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,
2205,
842,
284,
917... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_part1() {
let lines = vec![
"1-3 a: abcde".to_owned(),
"1-3 b: cdefg".to_owned(),
"2-9 c: ccccccccc".to_owned(),
];
assert_eq!(part1(&lines), 2);
} | rust_cleaned_test_functions.jsonl/32253 | {
"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,
10495,
16,
368,
341,
286,
1077,
5128,
284,
7486,
90515,
310,
330,
16,
12,
18,
264,
25,
39022,
450,
3263,
983,
51973,
3148,
310,
330,
16,
12,
18,
293,
25,
272,
750,
70,
3263,
983,
51973,
3148... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_log() {
let handle = super::init_for_test();
debug!("debug message2.");
info!("info message.");
warn!("warn message.");
error!("error message.");
let handle2 = super::init_for_test();
assert_eq!(handle.level(), handle2.level());
ass... | rust_cleaned_test_functions.jsonl/49017 | {
"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,
5224,
368,
341,
286,
1077,
3705,
284,
2256,
486,
2327,
5478,
4452,
543,
286,
7390,
17223,
8349,
1943,
17,
7320,
286,
3546,
17223,
2733,
1943,
7320,
286,
8809,
17223,
33481,
1943,
7320,
286,
1465,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_run_fonts_hi_ansi_build() {
let c = RunFonts::new().hi_ansi("Arial");
let b = c.build();
assert_eq!(
str::from_utf8(&b).unwrap(),
r#"<w:rFonts w:hAnsi="Arial" />"#
);
} | rust_cleaned_test_functions.jsonl/117550 | {
"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,
14007,
71502,
47225,
62,
52067,
20801,
368,
341,
286,
1077,
272,
284,
6452,
55369,
486,
931,
1005,
6023,
62,
52067,
445,
24555,
797,
286,
1077,
293,
284,
272,
13239,
543,
286,
2060,
10714,
33673,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_break_lines_long() {
let mut test_string = String::with_capacity(100);
for _ in 0..200 {
test_string.push('#');
}
let lines = break_line(&test_string, 80);
let widths: Vec<usize> = lines
.iter()
.map(|s| UnicodeWidthStr... | rust_cleaned_test_functions.jsonl/109672 | {
"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,
39494,
18323,
17799,
368,
341,
286,
1077,
5206,
1273,
3904,
284,
923,
486,
4197,
35603,
7,
16,
15,
15,
317,
286,
369,
716,
304,
220,
15,
496,
17,
15,
15,
341,
310,
1273,
3904,
2552,
3515,
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_trait() {
ok("trait Foo {}");
err(
"trait Foo {} struct Foo {}",
pos(1, 14),
Msg::ShadowTrait("Foo".into()),
);
err(
"trait Foo {} class Foo {}",
pos(1, 14),
Msg::ShadowTrait("Foo".into()),
... | rust_cleaned_test_functions.jsonl/45237 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 288
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
78491,
368,
341,
286,
5394,
445,
29432,
33428,
4687,
797,
286,
1848,
1006,
310,
330,
29432,
33428,
4687,
2036,
33428,
4687,
756,
310,
1133,
7,
16,
11,
220,
16,
19,
1326,
310,
24205,
486,
23667,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_string_width_align_unicode() {
assert_eq!(string_width_align("äste", 3), "ä..");
assert_eq!(
string_width_align("wüsten äste", 10),
"wüsten ä.."
);
assert_eq!(
string_width_align("Jon Grythe Stødle", 19),
"Jon Grythe... | rust_cleaned_test_functions.jsonl/49111 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 198
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3904,
7927,
37015,
54662,
368,
341,
286,
2060,
10714,
10297,
917,
7927,
37015,
445,
2305,
5342,
497,
220,
18,
701,
330,
2305,
496,
797,
286,
2060,
10714,
33673,
310,
914,
7927,
37015,
445,
86,
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_dispatch_sync() {
let state = IsolateState::mock();
let snapshot = libdeno::deno_buf::empty();
let isolate = Isolate::new(snapshot, state, dispatch_sync);
tokio_util::init(|| {
isolate
.execute(
r#"
const m = new Uint8Array([4, 5, 6]);
... | rust_cleaned_test_functions.jsonl/16974 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 330
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42991,
23008,
368,
341,
262,
1077,
1584,
284,
2160,
33066,
1397,
486,
16712,
543,
262,
1077,
16295,
284,
3051,
5183,
78,
486,
5183,
78,
10363,
486,
3194,
543,
262,
1077,
42123,
284,
2160,
33066,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_out() {
let mem = &create_anon_guest_memory(&[(GuestAddress(0), 0x10000)], false).unwrap();
let mut queue = RequestVirtQueue::new(GuestAddress(0), &mem);
let request_header = RequestHeader::new(VIRTIO_BLK_T_OUT, 100);
queue.set_hdr_desc(0x1000, 0x1000, VIRT... | rust_cleaned_test_functions.jsonl/84868 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 525
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
6068,
368,
341,
286,
1077,
1833,
284,
609,
3182,
12008,
263,
62739,
19195,
2099,
9697,
37804,
4286,
7,
15,
701,
220,
15,
87,
16,
15,
15,
15,
15,
25035,
895,
568,
15454,
543,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_default_msg_format() {
use slog::Level;
let result = DefaultMsgFormat.to_string(
&record!(
Level::Info,
"",
&format_args!("Hello, world!"),
b!("key1" => "value1")
),
&o!("key2" => "value2").into(),
).expect("for... | rust_cleaned_test_functions.jsonl/134066 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 258
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9993,
6483,
8955,
368,
341,
262,
990,
34949,
486,
4449,
401,
262,
1077,
1102,
284,
7899,
6611,
4061,
2389,
3904,
1006,
286,
609,
8548,
33673,
310,
9395,
486,
1731,
345,
310,
8324,
310,
609,
2243... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_epoch_stale() {
let mut epoch = metapb::RegionEpoch::default();
epoch.set_version(10);
epoch.set_conf_ver(10);
let tbl = vec![
(11, 10, true),
(10, 11, true),
(10, 10, false),
(10, 9, false),
];
for... | rust_cleaned_test_functions.jsonl/6854 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 334
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20682,
1261,
1574,
368,
341,
286,
1077,
5206,
16342,
284,
2270,
391,
65,
486,
14091,
44338,
486,
2258,
543,
286,
16342,
980,
9438,
7,
16,
15,
317,
286,
16342,
980,
16059,
26042,
7,
16,
15,
626... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_dead_fork_invalid_last_tick() {
let res = check_dead_fork(|_keypair, bank| {
let blockhash = bank.last_blockhash();
let slot = bank.slot();
let hashes_per_tick = bank.hashes_per_tick().unwrap_or(0);
entries_to_test_shreds(
e... | rust_cleaned_test_functions.jsonl/11050 | {
"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,
53427,
761,
669,
31433,
12195,
43612,
368,
341,
286,
1077,
592,
284,
1779,
53427,
761,
669,
22428,
62,
792,
12670,
11,
6073,
91,
341,
310,
1077,
2504,
8296,
284,
6073,
9110,
7113,
8296,
543,
310... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_u16() {
for l in 0..100 {
for r in 0..=core::u16::MAX {
assert_eq!(r.wrapping_offset(l.diff(&r).expect("u16 addresses always have valid diffs")), l);
}
}
} | rust_cleaned_test_functions.jsonl/83549 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7300,
16,
21,
368,
341,
262,
369,
326,
304,
220,
15,
496,
16,
15,
15,
341,
286,
369,
435,
304,
220,
15,
496,
28,
2153,
486,
84,
16,
21,
486,
10586,
341,
310,
2060,
10714,
10297,
81,
81293,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_roundtrip_ppm() {
// 3x3 image that tries all the 0/255 RGB combinations
let buf: [u8; 27] = [
0, 0, 0,
0, 0, 255,
0, 255, 0,
0, 255, 255,
255, 0, 0,
255, 0, 255,
255, 255, ... | rust_cleaned_test_functions.jsonl/115605 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 668
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29896,
32981,
31600,
76,
368,
341,
286,
442,
220,
18,
87,
18,
2168,
429,
16297,
678,
279,
220,
15,
14,
17,
20,
20,
20978,
27459,
198,
286,
1077,
6607,
25,
508,
84,
23,
26,
220,
17,
22,
60,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_cast_real_as_json() {
let mut ctx = EvalContext::new(Arc::new(EvalConfig::default_for_test()));
let cases = vec![
(vec![Datum::F64(32.0001)], Some(Json::Double(32.0001))),
(vec![Datum::Null], None),
];
for (cols, exp) in cases {
... | rust_cleaned_test_functions.jsonl/2966 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 410
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5303,
15266,
11898,
9455,
368,
341,
286,
1077,
5206,
5635,
284,
58239,
1972,
486,
931,
4346,
1287,
486,
931,
10722,
831,
2648,
486,
2258,
5478,
4452,
7392,
286,
1077,
5048,
284,
7486,
90515,
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... | 3 |
#[test]
fn test_should_fail() {
fn f() { fail!(); }
let desc = TestDescAndFn {
desc: TestDesc {
name: StaticTestName("whatever"),
ignore: false,
should_fail: true
},
testfn: DynTestFn(|| f()),
};
... | rust_cleaned_test_functions.jsonl/61409 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 275
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43378,
22121,
368,
341,
286,
5168,
282,
368,
314,
3690,
0,
2129,
456,
286,
1077,
6560,
284,
3393,
11065,
3036,
24911,
341,
310,
6560,
25,
3393,
11065,
341,
394,
829,
25,
23105,
2271,
675,
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_datetime_parse_from_str() {
let ymdhms = |y,m,d,h,n,s| NaiveDate::from_ymd(y,m,d).and_hms(h,n,s);
assert_eq!(NaiveDateTime::parse_from_str("2014-5-7T12:34:56+09:30", "%Y-%m-%dT%H:%M:%S%z"),
Ok(ymdhms(2014, 5, 7, 12, 34, 56))); // ignore offset
assert_eq... | rust_cleaned_test_functions.jsonl/99636 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 610
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28943,
21039,
5673,
2895,
368,
341,
286,
1077,
379,
2277,
71,
1011,
284,
760,
88,
13086,
11991,
19806,
10128,
10671,
91,
12812,
533,
1916,
486,
1499,
62,
1600,
67,
7021,
13086,
11991,
568,
437,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_min_body_len() {
// Test that padding is added after the body of the packet whose minimum
// body length constraint requires it. A previous version of this code
// had a bug where padding was always added after the innermost body.
let body = &[1, 2];
// ... | rust_cleaned_test_functions.jsonl/131782 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 587
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7260,
14114,
6043,
368,
341,
286,
442,
3393,
429,
5300,
374,
3694,
1283,
279,
2487,
315,
279,
10151,
6693,
8028,
198,
286,
442,
2487,
3084,
21568,
7460,
432,
13,
362,
3681,
2319,
315,
419,
2038,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_type_question() {
compare(
r#"
grammar;
extern { enum Tok { "Hi" => Hi(..) } }
X = Y?;
Y = "Hi";
"#,
vec![("X", "::std::option::Option<Tok>"), ("Y", "Tok")],
)
} | rust_cleaned_test_functions.jsonl/50469 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 121
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1819,
28915,
368,
341,
262,
9429,
1006,
286,
435,
2,
698,
41094,
280,
262,
15637,
314,
7618,
21447,
314,
330,
13048,
1,
589,
21018,
56422,
8,
335,
456,
262,
1599,
284,
809,
37445,
262,
809,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_split_split_not_uninitialized() {
let stake_lamports = 42;
let stake_address = solana_sdk::pubkey::new_rand();
let stake_account = AccountSharedData::new_data_with_space(
stake_lamports,
&just_stake(Meta::auto(&stake_address), stake_lamports),
... | rust_cleaned_test_functions.jsonl/31656 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 921
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
17052,
7913,
4907,
36161,
368,
341,
286,
1077,
18279,
907,
309,
3394,
284,
220,
19,
17,
280,
286,
1077,
18279,
6744,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_format_args_expand() {
check_expansion(
r#"
#[rustc_builtin_macro]
macro_rules! format_args {
($fmt:expr) => ({ /* compiler built-in */ });
($fmt:expr, $($args:tt)*) => ({ /* compiler built-in */ })
}
... | rust_cleaned_test_functions.jsonl/112676 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 364
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8955,
8384,
67875,
368,
341,
286,
1779,
14214,
10501,
1006,
310,
435,
2,
698,
310,
11506,
35788,
66,
73829,
58810,
921,
310,
18072,
21407,
0,
3561,
8384,
341,
394,
1711,
12501,
96011,
8,
589,
94... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_func_evaluation() {
let x = 2.0;
let x_name = Expr::symbol("x");
let y = 3.0;
let y_name = Expr::symbol("y");
let fn_name = Expr::symbol("test-func");
let fn_def = Expr::list(&[
Expr::symbol("fn"),
fn_name.clone()... | rust_cleaned_test_functions.jsonl/55387 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 688
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9596,
86505,
368,
341,
286,
1077,
856,
284,
220,
17,
13,
15,
280,
286,
1077,
856,
1269,
284,
28819,
486,
18785,
445,
87,
797,
286,
1077,
379,
284,
220,
18,
13,
15,
280,
286,
1077,
379,
1269,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_encrypt_decrypt() {
let plaintext = b"The quick brown fox was annoying".to_vec();
let key = GenericArray::from_slice(b"an example very very secret key.");
let cipher = Aes256Gcm::new(key);
let cipher_text = encrypt_bytes_integral_nonce(&cipher, plaintext.clone())... | rust_cleaned_test_functions.jsonl/5394 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 190
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66593,
80764,
368,
341,
286,
1077,
60847,
284,
293,
10022,
3974,
13876,
38835,
572,
29831,
3263,
983,
13251,
543,
286,
1077,
1376,
284,
21281,
1857,
486,
1499,
26488,
1883,
1,
276,
3110,
1602,
160... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_consensus_key_rotation() {
let mut swarm = TestEnvironment::new(5);
swarm.validator_swarm.launch();
// Load the node configs
let node_configs: Vec<_> = swarm
.validator_swarm
.config
.config_files
.iter()
.map(|config_path| NodeConfig::loa... | rust_cleaned_test_functions.jsonl/62887 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 654
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31971,
13626,
3097,
44813,
368,
341,
262,
1077,
5206,
60841,
284,
3393,
12723,
486,
931,
7,
20,
317,
262,
60841,
55110,
32581,
2178,
36452,
1428,
262,
442,
8893,
279,
2436,
42309,
198,
262,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_install_nested_paths_copy_file() {
let (at, mut ucmd) = at_and_ucmd!();
let file1 = "source_file";
let dir1 = "source_dir";
let dir2 = "target_dir";
at.mkdir(dir1);
at.mkdir(dir2);
at.touch(&format!("{}/{}", dir1, file1));
ucmd.arg(format!("{}/{}", dir1, file1))... | rust_cleaned_test_functions.jsonl/47032 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 233
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34245,
66279,
24152,
16096,
2458,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
1077,
1034,
16,
284,
330,
2427,
2458,
876,
262,
1077,
5419,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_suggestion_with_transpositions() {
assert_eq!(
suggestion_list("agr".intern(), &["arg".intern()], 5),
vec!["arg".intern()]
);
assert_eq!(
suggestion_list("214365879".intern(), &["123456789".intern()], 5),
vec!["123456789".in... | rust_cleaned_test_functions.jsonl/83030 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 181
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
42116,
6615,
7965,
27436,
368,
341,
286,
2060,
10714,
33673,
310,
23776,
2019,
445,
68305,
3263,
55444,
1507,
609,
1183,
858,
3263,
55444,
79558,
220,
20,
1326,
310,
7486,
0,
1183,
858,
3263,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_arithmetic_precedence_examples() {
assert_eq!(eval("1+3-2"), Ok(Value::Int(2)));
assert_eq!(eval("3+1*5"), Ok(Value::Int(8)));
assert_eq!(eval("2*3-5"), Ok(Value::Int(1)));
assert_eq!(eval("5-3/3"), Ok(Value::Int(4)));
assert_eq!(eval("5 / 4*2"), Ok(Value::Int(2)));
asser... | rust_cleaned_test_functions.jsonl/105339 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 371
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25842,
25922,
10442,
1998,
763,
45279,
368,
341,
262,
2060,
10714,
10297,
14170,
445,
16,
10,
18,
12,
17,
3975,
7622,
25346,
486,
1072,
7,
17,
4945,
262,
2060,
10714,
10297,
14170,
445,
18,
10,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_kubeconfig_path() {
let kubeconfig_location: PathBuf = kubeconfig_location_panic();
let kubeconfig_location: &str = kubeconfig_location.to_str().unwrap();
// Existing kubeconfig
let app: App = super::build_app();
let args_with_kubeconfig: Vec<&str> = vec!... | rust_cleaned_test_functions.jsonl/122954 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 657
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4698,
3760,
1676,
2638,
368,
341,
286,
1077,
80958,
1676,
13126,
25,
7933,
15064,
284,
80958,
1676,
13126,
620,
31270,
543,
286,
1077,
80958,
1676,
13126,
25,
609,
495,
284,
80958,
1676,
13126,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hash_g2() {
let mut rng = rand::thread_rng();
let msg: Vec<u8> = rng.sample_iter(&Standard).take(1000).collect();
let msg_end0: Vec<u8> = msg.iter().chain(b"end0").cloned().collect();
let msg_end1: Vec<u8> = msg.iter().chain(b"end1").cloned().collect();
a... | rust_cleaned_test_functions.jsonl/30569 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 239
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
1889,
17,
368,
341,
286,
1077,
5206,
28422,
284,
10382,
486,
4528,
66849,
543,
286,
1077,
3750,
25,
11312,
34837,
23,
29,
284,
28422,
23882,
11723,
2099,
19781,
568,
22769,
7,
16,
15,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_utf_16_decode() {
decode_utf_16le(b"", "");
decode_utf_16be(b"", "");
decode_utf_16le(b"\x61\x00\x62\x00", "\u{0061}\u{0062}");
decode_utf_16be(b"\x00\x61\x00\x62", "\u{0061}\u{0062}");
decode_utf_16le(b"\xFE\xFF\x00\x61\x00\x62", "\u{0061}\u{0062}");
... | rust_cleaned_test_functions.jsonl/86892 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1613
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39453,
62,
16,
21,
15227,
368,
341,
286,
16895,
39453,
62,
16,
21,
273,
1883,
56323,
14498,
286,
16895,
39453,
62,
16,
21,
1371,
1883,
56323,
50970,
286,
16895,
39453,
62,
16,
21,
273,
1883,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stdin_stdout_count() {
let input = build_ascii_block(521);
let mut output = String::from_utf8(input.clone()).unwrap();
output.truncate(256);
new_ucmd!()
.args(&["status=none", "count=2", "ibs=128"])
.pipe_in(input)
.run()
.no_stderr()
.stdo... | rust_cleaned_test_functions.jsonl/59377 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 173
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15656,
258,
67416,
3180,
368,
341,
262,
1077,
1946,
284,
1936,
50238,
7113,
7,
20,
17,
16,
317,
262,
1077,
5206,
2550,
284,
923,
486,
1499,
39453,
23,
5384,
15997,
6011,
15454,
543,
262,
2550,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_pool_pop_client_and_take_database_and_collection() {
let uri = Uri::new("mongodb://localhost:27017/").unwrap();
let pool = ClientPool::new(uri.clone(), None);
assert_eq!(pool.get_uri(), &uri);
// Pop a client and take database and collection
let client = pool.pop();
... | rust_cleaned_test_functions.jsonl/22217 | {
"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,
5921,
15709,
17061,
8179,
8378,
73261,
27341,
8378,
25019,
368,
341,
262,
1077,
13071,
284,
17226,
486,
931,
445,
37197,
1110,
8301,
25,
17,
22,
15,
16,
22,
14,
1827,
15454,
543,
262,
1077,
7314... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_boolean_array_agg() -> Result<()> {
let array = DFBooleanArray::new_from_slice(&vec![true, false, true]);
let value = [
array.sum()?,
array.max()?,
array.min()?,
array.arg_min()?,
array.arg_max()?,
];
let expected = [
DataValue::U... | rust_cleaned_test_functions.jsonl/19222 | {
"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,
46642,
3858,
83534,
368,
1464,
5714,
71698,
341,
262,
1077,
1334,
284,
43376,
6890,
1857,
486,
931,
5673,
26488,
2099,
4083,
20703,
1866,
11,
895,
11,
830,
10149,
262,
1077,
897,
284,
2278,
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... | 7 |
#[test]
fn test_set_mmio_bus() {
let (_, mut vcpu, _) = setup_vcpu(0x1000);
assert!(vcpu.mmio_bus.is_none());
vcpu.set_mmio_bus(devices::Bus::new());
assert!(vcpu.mmio_bus.is_some());
} | rust_cleaned_test_functions.jsonl/99240 | {
"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,
2602,
35599,
815,
25418,
368,
341,
286,
1077,
39464,
5206,
348,
16475,
11,
27439,
284,
6505,
2273,
16475,
7,
15,
87,
16,
15,
15,
15,
317,
286,
2060,
10297,
85,
16475,
37008,
815,
25418,
2079,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_publish() {
let packet = Publish {
dup: false,
qospid: QosPid::from_u8u16(2, 10),
retain: true,
topic_name: "asdf",
payload: &['h' as u8, 'e' as u8, 'l' as u8, 'l' as u8, 'o' as u8],
}
.into();
assert_decode_slice!(Packet::Publish(_), ... | rust_cleaned_test_functions.jsonl/59348 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 186
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58779,
368,
341,
262,
1077,
10151,
284,
23499,
341,
286,
22737,
25,
895,
345,
286,
2804,
4785,
307,
25,
1207,
436,
32339,
486,
1499,
7300,
23,
84,
16,
21,
7,
17,
11,
220,
16,
15,
1326,
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_replace() {
use crate::hash;
#[derive(Debug)]
struct Foo(&'static str, i32);
impl PartialEq for Foo {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl Eq for Foo {}
impl hash::Hash ... | rust_cleaned_test_functions.jsonl/24145 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 437
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10633,
368,
341,
286,
990,
17717,
486,
8296,
401,
286,
11506,
27098,
42618,
5563,
286,
2036,
33428,
2099,
6,
1978,
607,
11,
600,
18,
17,
626,
286,
11605,
55039,
369,
33428,
341,
310,
5168,
8939,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_enum() {
#[derive(Debug, PartialEq, Valuable, Serialize)]
enum E {
Unit,
Newtype(u8),
Tuple(u8, u8),
Struct { f: u8 },
}
// TODO:
// - valuable treats unit variant as an empty tuple variant
// - serde treats unit variant as unit variant
... | rust_cleaned_test_functions.jsonl/44221 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 797
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31054,
368,
341,
262,
11506,
27098,
42618,
11,
55039,
11,
4104,
13128,
11,
39900,
5563,
262,
7618,
468,
341,
286,
7954,
345,
286,
1532,
1313,
8154,
23,
1326,
286,
24622,
8154,
23,
11,
575,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sine_large_buffer() {
let mut signal = Sine::new(2.0, 8);
let mut buffer = vec![0.0;10];
let _ = signal.write_buffer(&mut buffer);
let _ = signal.write_buffer(&mut buffer);
assert_approx_eq!(buffer[0], 0.0, 1e-5f32);
assert_approx_eq!(buffer[1], -1... | rust_cleaned_test_functions.jsonl/93722 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 243
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
482,
45228,
7776,
368,
341,
286,
1077,
5206,
8286,
284,
328,
482,
486,
931,
7,
17,
13,
15,
11,
220,
23,
317,
286,
1077,
5206,
4147,
284,
7486,
20703,
15,
13,
15,
26,
16,
15,
935,
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_check_payer_balances_distribute_stakes_single_payer() {
let fees = 10_000;
let fees_in_sol = lamports_to_sol(fees);
let alice = Keypair::new();
let test_validator = TestValidator::with_custom_fees(alice.pubkey(), fees, None);
let url = test_validator.rpc_u... | rust_cleaned_test_functions.jsonl/50197 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2091
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
620,
1135,
56441,
3020,
814,
80133,
1261,
2050,
19487,
620,
1135,
368,
341,
286,
1077,
12436,
284,
220,
16,
15,
62,
15,
15,
15,
280,
286,
1077,
12436,
1243,
53668,
284,
31603,
3394,
2346,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_retain() {
let mut v = ArrayVec::from([0; 8]);
for (i, elt) in v.iter_mut().enumerate() {
*elt = i;
}
v.retain(|_| true);
assert_eq!(&v[..], &[0, 1, 2, 3, 4, 5, 6, 7]);
v.retain(|elt| {
*elt /= 2;
*elt % 2 == 0
});
assert_eq!(&v[..], &[0, 0... | rust_cleaned_test_functions.jsonl/36773 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 223
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21695,
466,
368,
341,
262,
1077,
5206,
348,
284,
2910,
10050,
486,
1499,
2561,
15,
26,
220,
23,
2558,
262,
369,
320,
72,
11,
54139,
8,
304,
348,
19471,
29523,
1005,
76569,
368,
341,
286,
353,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_try_from_alogithm_id() {
assert_eq!(
HashingAlgorithm::try_from(TPM2_ALG_SHA1).unwrap(),
HashingAlgorithm::Sha1
);
assert_eq!(
HashingAlgorithm::try_from(TPM2_ALG_SHA256).unwrap(),
HashingAlgorithm::Sha256
);
... | rust_cleaned_test_functions.jsonl/41502 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 730
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
5673,
8418,
538,
410,
76,
842,
368,
341,
286,
2060,
10714,
33673,
310,
6531,
287,
27847,
486,
1539,
5673,
4140,
8795,
17,
8912,
38,
38096,
16,
568,
15454,
3148,
310,
6531,
287,
27847,
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_real_any_value() {
let test_cases = vec![
(vec![], None),
(vec![Real::from(1.2_f64)], Some(Real::from(1.2_f64))),
(
vec![Real::from(1.2_f64), Real::from(2.3_f64)],
Some(Real::from(1.2_f64)),
),
(
... | rust_cleaned_test_functions.jsonl/59408 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 474
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15266,
37248,
3142,
368,
341,
286,
1077,
1273,
41427,
284,
7486,
90515,
310,
320,
4083,
0,
12995,
2240,
1326,
310,
320,
4083,
20703,
12768,
486,
1499,
7,
16,
13,
17,
761,
21,
19,
25035,
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_take_nonpod_by_ptr_in_method() {
let hdr = indoc! {"
#include <cstdint>
#include <memory>
struct Bob {
uint32_t a;
};
#include <cstdint>
class A {
public:
A() {};
uint32_t take_bob(const Bob* a) const... | rust_cleaned_test_functions.jsonl/9743 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 541
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73261,
21637,
39073,
3710,
4348,
1243,
9032,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
286,
671,
997,
366,
96975,
397,
286,
671,
997,
366,
17269,
397,
286,
2036,
14261,
341,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_encoder_valid() {
let mut e = UTF_16BE.encoder();
assert_feed_ok!(e, "\u0000\
\u0001\u0002\u0004\u0008\
\u0010\u0020\u0040\u0080\
\u0100\u0200\u0400\u0800\
\u1000\u2000... | rust_cleaned_test_functions.jsonl/15675 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1671
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39068,
8337,
368,
341,
286,
1077,
5206,
384,
284,
20076,
62,
16,
21,
11594,
69042,
543,
286,
2060,
42390,
19817,
10297,
68,
11,
2917,
84,
15,
15,
15,
15,
5661,
999,
1124,
84,
15,
15,
15,
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_assembler_flag_ops() {
test_case(&["ADX B, A"], &[0x003a]);
test_case(&["SBX B, A"], &[0x003b]);
test_case(&["STI B, A"], &[0x003e]);
test_case(&["STD B, A"], &[0x003f]);
} | rust_cleaned_test_functions.jsonl/44762 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11898,
35401,
10933,
21959,
368,
341,
262,
1273,
19096,
2099,
1183,
83172,
425,
11,
362,
7914,
44590,
15,
87,
15,
15,
18,
64,
2558,
262,
1273,
19096,
2099,
1183,
16680,
55,
425,
11,
362,
7914,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bit_field_clear() {
assert_eq!(bit_field_clear(0xFFFF_FFFF, 0, 0), 0xFFFF_FFFE);
assert_eq!(bit_field_clear(0xFFFF_FFFF, 31, 31), 0x7FFF_FFFF);
assert_eq!(bit_field_clear(0xFFFF_FFFF, 31, 0), 0x0000_0000);
assert_eq!(bit_field_clear(0xFFFF_FFFF, 10, 8), 0xFFFF_F8F... | rust_cleaned_test_functions.jsonl/50754 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 171
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13996,
5013,
21811,
368,
341,
286,
2060,
10714,
10297,
4489,
5013,
21811,
7,
15,
14384,
1400,
31203,
11,
220,
15,
11,
220,
15,
701,
220,
15,
14384,
1400,
79094,
317,
286,
2060,
10714,
10297,
448... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_field_type() {
let test = Foo;
let _: AtomicUsize = test.field1();
let _: AtomicUsize = test.field2();
let _: AtomicUsize = test.field3();
let _: AtomicUsize = test.field4();
let _: AtomicUsize = test.field5();
let _: AtomicUsize = test.fie... | rust_cleaned_test_functions.jsonl/2279 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 469
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5013,
1819,
368,
341,
286,
1077,
1273,
284,
33428,
280,
286,
1077,
58536,
30316,
52,
2141,
284,
1273,
16454,
16,
543,
286,
1077,
58536,
30316,
52,
2141,
284,
1273,
16454,
17,
543,
286,
1077,
585... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_escaping() {
let query = Timestamp::Hours(11)
.into_query("wea, ther=")
.add_field("temperature", 82)
.add_field("\"temp=era,t ure\"", r#"too"\\hot"#)
.add_field("float", 82.0)
.add_tag("location", "us-midwest")
.add... | rust_cleaned_test_functions.jsonl/40010 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 376
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
42480,
368,
341,
286,
1077,
3239,
284,
32758,
486,
23235,
7,
16,
16,
340,
310,
659,
18122,
5738,
445,
896,
64,
11,
8962,
428,
340,
310,
659,
718,
5013,
445,
34558,
497,
220,
23,
17,
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_mock_vm_different_senders() {
let amount = 100;
let mut txns = vec![];
for i in 0..10 {
txns.push(encode_mint_transaction(gen_address(i), amount));
}
let outputs = MockVM::execute_block(txns.clone(), &MockStateView)
.expect("MockVM should not fail to start");... | rust_cleaned_test_functions.jsonl/99279 | {
"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,
34134,
39008,
82741,
13565,
388,
368,
341,
262,
1077,
3311,
284,
220,
16,
15,
15,
280,
262,
1077,
5206,
9854,
4412,
284,
7486,
0,
15078,
262,
369,
600,
304,
220,
15,
496,
16,
15,
341,
286,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_flattening() {
check_highlighting(
r##"
fn fixture(ra_fixture: &str) {}
fn main() {
fixture(r#"
trait Foo {
fn foo() {
println!("2 + 2 = {}", 4);
}
}"#
);
}"##
.trim(),
expect_file!["./test_data/highligh... | rust_cleaned_test_functions.jsonl/5122 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 209
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5081,
1587,
6019,
368,
341,
262,
1779,
74546,
287,
1006,
286,
435,
565,
698,
8822,
12507,
82034,
74409,
25,
609,
495,
8,
10086,
8822,
1887,
368,
341,
262,
12507,
2601,
2,
698,
286,
17567,
33428,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_twos_comp_apd_primitive() {
fn inner_inner<P>(i: P, i_be_bytes: &mut [u8])
where
P: Into<Numeric> + TryFrom<Numeric> + Eq + PartialEq + std::fmt::Debug + Copy,
{
use std::convert::TryInto;
let mut e = [0; Numeric::TWOS_COMPLEMENT_BYTE_WIDTH];
e[Numeric... | rust_cleaned_test_functions.jsonl/22110 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2134
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54178,
436,
18177,
21093,
67,
84087,
368,
341,
262,
5168,
9179,
34345,
21604,
2235,
72,
25,
393,
11,
600,
21263,
12524,
25,
609,
6984,
508,
84,
23,
2546,
262,
1380,
198,
286,
393,
25,
31645,
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_update_old() {
let mut crds = Crds::default();
let val = CrdsValue::new_unsigned(CrdsData::ContactInfo(ContactInfo::default()));
assert_eq!(crds.insert(val.clone(), 0), Ok(None));
assert_eq!(crds.insert(val.clone(), 1), Err(CrdsError::InsertFailed));
asser... | rust_cleaned_test_functions.jsonl/94330 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 172
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
21108,
368,
341,
286,
1077,
5206,
1560,
5356,
284,
4553,
5356,
486,
2258,
543,
286,
1077,
1044,
284,
4553,
5356,
1130,
486,
931,
67830,
3025,
81,
5356,
1043,
486,
8732,
1731,
99102,
1731,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ani() {
let mut state = State8080::empty_state();
state.memory = vec![0xe6, 0x0f];
state.a = 0x3a;
emulate_8080_op(&mut state);
assert_eq!(state.a, 0x0a);
} | rust_cleaned_test_functions.jsonl/7785 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 123
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
5559,
368,
341,
286,
1077,
5206,
1584,
284,
3234,
23,
15,
23,
15,
486,
3194,
4387,
543,
286,
1584,
36611,
284,
7486,
20703,
15,
8371,
21,
11,
220,
15,
87,
15,
69,
935,
286,
1584,
5849,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_literal_strings() {
let parsed_data = common::get_file_content_parsed(PARENT_FOLDER, "literal.ura").unwrap();
assert_eq!(parsed_data, get_expected_literal());
} | rust_cleaned_test_functions.jsonl/11163 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 81
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34100,
33500,
368,
341,
262,
1077,
15676,
1769,
284,
4185,
486,
455,
2458,
7495,
75788,
5304,
28155,
33637,
11,
330,
35785,
13,
5690,
1827,
15454,
543,
262,
2060,
10714,
10297,
41030,
1769,
11,
63... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_source_distribution() {
let metadata =
get_metadata_for_distribution(Path::new("test-data/pyo3_mixed-2.1.1.tar.gz")).unwrap();
let expected: Vec<_> = [
("Metadata-Version", "2.1"),
("Name", "pyo3-mixed"),
("Version", "2.1.1"),
... | rust_cleaned_test_functions.jsonl/76448 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 400
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10347,
41465,
368,
341,
286,
1077,
11160,
4035,
310,
633,
22220,
5478,
41465,
33030,
486,
931,
445,
1944,
13945,
90834,
78,
18,
717,
3286,
12,
17,
13,
16,
13,
16,
28048,
20963,
15197,
15454,
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_column_writer_check_metadata() {
let page_writer = get_test_page_writer();
let props = Arc::new(WriterProperties::builder().build());
let mut writer = get_test_column_writer::<Int32Type>(page_writer, 0, 0, props);
writer.write_batch(&[1, 2, 3, 4], None, None).unwr... | rust_cleaned_test_functions.jsonl/54356 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 672
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8744,
28908,
7200,
22220,
368,
341,
286,
1077,
2150,
28908,
284,
633,
4452,
6129,
28908,
543,
286,
1077,
6914,
284,
19689,
486,
931,
7,
6492,
7903,
486,
17850,
1005,
5834,
1423,
286,
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_with_vars_unset_set() {
env::set_var("MY_VAR", "my_var");
let my_var_is_set = env::var("MY_VAR").unwrap();
assert_eq!(
my_var_is_set, "my_var",
"`MY_VAR` must be set to \"my_var`\"."
);
crate::with_vars(
vec![("MY_VAR",... | rust_cleaned_test_functions.jsonl/49890 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 507
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6615,
11168,
98109,
2602,
368,
341,
286,
6105,
486,
746,
4612,
445,
19159,
25750,
497,
330,
2408,
4612,
797,
286,
1077,
847,
4612,
6892,
2602,
284,
6105,
486,
947,
445,
19159,
25750,
1827,
15454,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_user_find_by_id() {
let pool = BDPool::new().unwrap();
let con = pool.get().unwrap();
let result = User::find_by_id(&con, 1).unwrap();
let expected = User {
id: 1,
email: "user_a@email.com".to_string(),
name: "user_a".to_string(),
password: "1464... | rust_cleaned_test_functions.jsonl/32733 | {
"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,
3317,
21814,
3710,
842,
368,
341,
262,
1077,
7314,
284,
425,
10298,
1749,
486,
931,
1005,
15454,
543,
262,
1077,
390,
284,
7314,
670,
1005,
15454,
1428,
262,
1077,
1102,
284,
2657,
486,
3903,
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_to_and_from_bytes_with_additional_bytes() -> Result<(), Error> {
let kp = SampiKeyPair::new();
let data = SampiData::String("Hello, World".to_string());
let s = kp.new_sampi().build(vec![data.clone()])?;
assert_eq!(s.data(), &vec![data]);
let mut bytes = s.to_bytes();
le... | rust_cleaned_test_functions.jsonl/67860 | {
"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,
2346,
8378,
5673,
12524,
6615,
81742,
12524,
368,
1464,
5714,
68843,
4600,
29,
341,
262,
1077,
60319,
284,
90174,
72,
1592,
12443,
486,
931,
543,
262,
1077,
821,
284,
90174,
72,
1043,
486,
703,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_validate_dynamic_offers_okay() {
assert_eq!(
validate_dynamic_offers(&vec![
fdecl::Offer::Protocol(fdecl::OfferProtocol {
dependency_type: Some(fdecl::DependencyType::Strong),
source: Some(fdecl::Ref::Self_(fdecl::SelfRe... | rust_cleaned_test_functions.jsonl/82026 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1512
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
45992,
13651,
388,
19817,
352,
368,
341,
286,
2060,
10714,
33673,
310,
9593,
45992,
13651,
388,
2099,
4083,
90515,
394,
282,
10005,
486,
39462,
486,
20689,
955,
10005,
486,
39462,
20689,
341,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_batch_values_only() {
test_read_batch_int32(16, &mut vec![0; 10], None, None); // < batch_size
test_read_batch_int32(16, &mut vec![0; 16], None, None); // == batch_size
test_read_batch_int32(16, &mut vec![0; 51], None, None); // > batch_size
} | rust_cleaned_test_functions.jsonl/64660 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 139
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
14534,
9146,
18410,
368,
341,
286,
1273,
6443,
14534,
4042,
18,
17,
7,
16,
21,
11,
609,
6984,
7486,
20703,
15,
26,
220,
16,
15,
1125,
2240,
11,
2240,
1215,
442,
366,
7162,
2368,
198,
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_app_builder_all_methods() {
let mut builder = AppBuilder::new();
builder.client_name("foo-test");
builder.redirect_uris("http://example.com");
builder.scopes(Scopes::read_all() | Scopes::write_all());
builder.website("https://example.com");
let app... | rust_cleaned_test_functions.jsonl/51206 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 346
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8191,
28532,
5705,
36084,
368,
341,
286,
1077,
5206,
7363,
284,
1845,
3297,
486,
931,
543,
286,
7363,
6581,
1269,
445,
7975,
16839,
797,
286,
7363,
24100,
64879,
285,
445,
1254,
1110,
8687,
905,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_first_write_commits_immediately() {
let written_value = VALUE2;
let mut executor = Executor::new_with_fake_time().expect("Failed to create executor");
let (stash_proxy, mut stash_stream) =
fidl::endpoints::create_proxy_and_stream::<StoreAccessorMarker>().unwr... | rust_cleaned_test_functions.jsonl/73802 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 526
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12978,
9165,
25149,
1199,
17895,
43187,
368,
341,
286,
1077,
5326,
3142,
284,
26827,
17,
280,
286,
1077,
5206,
31558,
284,
56032,
486,
931,
6615,
56881,
3009,
1005,
17119,
445,
9408,
311,
1855,
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_valid_link_file_with_backup() {
with_test_directories("unstow_test_valid_link_file_with_backup".as_ref(), |source: &PathBuf, target: &PathBuf| {
let source_file = add_file_to("file.txt", source.as_path()).unwrap();
let target_file = target.join("file.txt");
... | rust_cleaned_test_functions.jsonl/32413 | {
"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,
8337,
7233,
2458,
6615,
44710,
368,
341,
286,
448,
4452,
32871,
2433,
445,
359,
267,
363,
4452,
8337,
7233,
2458,
6615,
44710,
3263,
300,
7793,
1507,
760,
2427,
25,
609,
1820,
15064,
11,
2169,
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_dyn_keypairs_by_ref_compile() {
let foo = Foo {};
let bar = Bar {};
let xs: Vec<&dyn Signer> = vec![&foo, &bar];
assert_eq!(
xs.sign_message(b""),
vec![Signature::default(), Signature::default()],
);
let xs_ref: &[... | rust_cleaned_test_functions.jsonl/57152 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 269
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
69213,
3097,
77256,
3710,
7793,
74170,
368,
341,
286,
1077,
15229,
284,
33428,
9321,
286,
1077,
3619,
284,
4716,
9321,
286,
1077,
11943,
25,
11312,
52244,
43085,
7075,
261,
29,
284,
7486,
20703,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_request_response() {
let f = RequestResponse::builder(1234, 0)
.set_data(Bytes::from("Hello World"))
.set_metadata(Bytes::from("Foobar"))
.build();
try_codec(f);
} | rust_cleaned_test_functions.jsonl/41411 | {
"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,
7893,
9655,
368,
341,
262,
1077,
282,
284,
6145,
2582,
486,
17850,
7,
16,
17,
18,
19,
11,
220,
15,
340,
286,
659,
746,
1769,
76423,
486,
1499,
445,
9707,
4337,
5455,
286,
659,
746,
22220,
76... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_unsubscribe() {
// Unsubscribe should:
// - Remove the mesh entry for topic
// - Send UNSUBSCRIBE to all known peers
// - Call Leave
let topic_strings = vec![String::from("topic1"), String::from("topic2")];
let topics = topic_strings
.... | rust_cleaned_test_functions.jsonl/66879 | {
"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,
4907,
9384,
368,
341,
286,
442,
1230,
9384,
1265,
510,
286,
442,
481,
10783,
279,
11294,
4343,
369,
8544,
198,
286,
442,
481,
11000,
45983,
4493,
64640,
311,
678,
3881,
25029,
198,
286,
442,
481... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_gt_diff_num_digits_true() {
// Given:
let a = Counter::from(vec![9]);
let b = Counter::from(vec![0, 1]);
// Then:
assert!(b > a);
} | rust_cleaned_test_functions.jsonl/79529 | {
"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,
37479,
15850,
4273,
41432,
16082,
368,
341,
310,
442,
16246,
510,
310,
1077,
264,
284,
19735,
486,
1499,
25592,
20703,
24,
2558,
310,
1077,
293,
284,
19735,
486,
1499,
25592,
20703,
15,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_string_to_repo() {
let json = r#"["dam","website"]"#;
let repos: Repos = new(json).unwrap();
assert_eq!(repos, vec![
Repo{ repo_type: RepoType::Dam, sites: None },
Repo{ repo_type: RepoType::Website, sites: None },
]);
} | rust_cleaned_test_functions.jsonl/71245 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 159
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3904,
2346,
37784,
368,
341,
286,
1077,
2951,
284,
435,
55543,
1183,
15408,
2198,
19485,
1341,
57676,
280,
286,
1077,
45774,
25,
24286,
284,
501,
9304,
568,
15454,
543,
286,
2060,
10714,
10297,
68... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_which_relative_extension() {
// so test a relative path with an extension here.
let f = TestFixture::new();
let b = Path::new("b/bin").with_extension(env::consts::EXE_EXTENSION);
assert_eq!(_which(&f, &b).unwrap(), f.bins[3].canonicalize().unwrap());
} | rust_cleaned_test_functions.jsonl/13409 | {
"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,
62,
8206,
29286,
31035,
368,
341,
1066,
262,
442,
773,
1273,
264,
8674,
1815,
448,
458,
8894,
1588,
624,
262,
1077,
282,
284,
3393,
18930,
486,
931,
543,
262,
1077,
293,
284,
7933,
486,
931,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_array_param() {
assert_eq!(Reader::read("address[]").unwrap(), ParamType::Array(Box::new(ParamType::Address)));
assert_eq!(Reader::read("uint[]").unwrap(), ParamType::Array(Box::new(ParamType::Uint(256))));
assert_eq!(Reader::read("bytes[]").unwrap(), ParamType::Array(Box::new(ParamTy... | rust_cleaned_test_functions.jsonl/110634 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 182
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
3858,
4090,
368,
341,
197,
6948,
10714,
10297,
5062,
486,
878,
445,
4995,
1294,
1827,
15454,
1507,
6991,
929,
486,
1857,
67758,
486,
931,
7,
2001,
929,
486,
4286,
4945,
197,
6948,
10714,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_scans_boolean_operators() {
let mut scanner = Scanner::new(
"<?php
true ||
false &&
1 === 1 &&
$a <=> $b &&
2 !== 1;
2 <= 1;
2 >= 1;
2 ?? 1;
2 == 1;
2 != 1;... | rust_cleaned_test_functions.jsonl/52933 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 468
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13171,
596,
46642,
25634,
2973,
368,
341,
286,
1077,
5206,
20775,
284,
17170,
486,
931,
1006,
310,
40271,
1208,
198,
310,
830,
8244,
310,
895,
6561,
310,
220,
16,
2049,
220,
16,
6561,
310,
400,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_typo_len_offset() {
let data = vec![1, 2, 3, 4, 5, 6, 7, 8];
// half of the size of `data`
let half_size = data.len() / 2;
let slice = GrpcSlice::from(data.clone());
let buffer = GrpcByteBuffer::from(&slice);
let mut reader = GrpcByteBufferReader::... | rust_cleaned_test_functions.jsonl/50384 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 392
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42111,
78,
6043,
6917,
368,
341,
286,
1077,
821,
284,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
11,
220,
22,
11,
220,
23,
935,
286,
442,
4279,
315... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_audio_param_graph() {
let mut context = OfflineAudioContext::new(
1,
RENDER_QUANTUM_SIZE,
SampleRate(RENDER_QUANTUM_SIZE as u32),
);
{
let gain = context.create_gain();
gain.gain().set_value(0.5); // intrinsic value
gain.connect(&contex... | rust_cleaned_test_functions.jsonl/95486 | {
"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,
29688,
4090,
14738,
368,
341,
262,
1077,
5206,
2266,
284,
66370,
14755,
1972,
486,
931,
1006,
286,
220,
16,
345,
286,
91788,
16332,
2821,
2794,
4098,
345,
286,
19143,
11564,
43202,
35689,
16332,
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_iseq_action_around_closed_interval() {
for t in &[(1, 2), (-2, -1)] {
let mut seq = Seq::new();
println!("\nTesting {:?}", &t);
let (b1, b2): &(i32, i32) = t;
seq.open_interval(b1);
seq.close_interval(b... | rust_cleaned_test_functions.jsonl/112645 | {
"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,
62,
1064,
80,
7931,
62,
19454,
44697,
20541,
368,
341,
310,
369,
259,
304,
609,
9697,
16,
11,
220,
17,
701,
10293,
17,
11,
481,
16,
7252,
341,
394,
1077,
5206,
12981,
284,
23744,
486,
931,
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_tuple_vec() {
test_serialize(vec![
(123u64, 234u32, 999u16),
(123u64, 234u32, 999u16),
(123u64, 234u32, 999u16),
]);
} | rust_cleaned_test_functions.jsonl/73642 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 126
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21773,
13251,
368,
341,
286,
1273,
88686,
25592,
90515,
310,
320,
16,
17,
18,
84,
21,
19,
11,
220,
17,
18,
19,
84,
18,
17,
11,
220,
24,
24,
24,
84,
16,
21,
1326,
310,
320,
16,
17,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_eth_transfer_insufficient_balance_sim() {
let (aurora, mut signer, address) = initialize_evm_sim();
let nonce = signer.use_nonce();
let tx = test_utils::transfer(
Address([1; 20]),
INITIAL_BALANCE + INITIAL_BALANCE,
nonce.into(),
);
let signed_tx... | rust_cleaned_test_functions.jsonl/131053 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 414
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57757,
35403,
34386,
26683,
29396,
18314,
368,
341,
262,
1077,
320,
4110,
6215,
11,
5206,
70039,
11,
2621,
8,
284,
9468,
2204,
7338,
18314,
1428,
1066,
262,
1077,
39676,
284,
70039,
7397,
48508,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_illegal_request() {
let expr = ExprDefBuilder::aggr_func(ExprType::Avg, FieldTypeTp::Double) // Expect NewDecimal but give Real
.push_child(ExprDefBuilder::column_ref(0, FieldTypeTp::LongLong)) // FIXME: This type can be incorrect as well
.build();
AggrFnD... | rust_cleaned_test_functions.jsonl/86707 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 298
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26743,
6428,
7893,
368,
341,
286,
1077,
15169,
284,
28819,
2620,
3297,
486,
351,
901,
9596,
7,
16041,
929,
486,
39447,
11,
84614,
62241,
486,
7378,
8,
442,
32085,
1532,
11269,
714,
2968,
8800,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_delimiter_must_not_be_more_than_one_character() {
new_ucmd!()
.args(&["--delimiter", "sad"])
.fails()
.stderr_is("numfmt: the delimiter must be a single character");
} | rust_cleaned_test_functions.jsonl/46024 | {
"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,
18029,
17700,
717,
590,
7913,
21263,
36664,
51613,
11667,
40988,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
313,
58116,
497,
330,
82114,
14108,
286,
659,
59631,
741,
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 |
#[test]
fn test_in_network_region() {
let mut peer_storage = PeerStorage::new_indexed(HashmapDatabase::new()).unwrap();
let mut nodes = repeat_with(|| create_test_peer(PeerFeatures::COMMUNICATION_NODE, false, false))
.take(5)
.chain(repeat_with(|| create_test_peer(PeerFe... | rust_cleaned_test_functions.jsonl/84197 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 735
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
20966,
20627,
368,
341,
286,
1077,
5206,
14397,
23310,
284,
45147,
5793,
486,
931,
3560,
291,
7,
6370,
2186,
5988,
486,
931,
6011,
15454,
1428,
286,
1077,
5206,
7798,
284,
13153,
6615,
79453... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parsing_operand_parameters() {
let mut v = ZERO_BOUND_HEADER.to_vec();
v.append(&mut vec![0x47, 0x00, 0x04, 0x00]); // OpDecorate
v.append(&mut vec![0x05, 0x00, 0x00, 0x00]); // id 5
v.append(&mut vec![0x0b, 0x00, 0x00, 0x00]); // BuiltIn
v.append(&mut vec... | rust_cleaned_test_functions.jsonl/85739 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 525
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
28598,
69259,
18263,
368,
341,
286,
1077,
5206,
348,
284,
54593,
73644,
20330,
2389,
13251,
543,
286,
348,
2057,
2099,
6984,
7486,
20703,
15,
87,
19,
22,
11,
220,
15,
87,
15,
15,
11,
220,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hash_map_bad_index() {
let map: BpfHashMap = unsafe {
BpfHashMap::new(
"mymap",
std::mem::size_of::<u32>() as u32,
std::mem::size_of::<u64>() as u32,
1024,
)
.expect("Failed to create new ... | rust_cleaned_test_functions.jsonl/40489 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 452
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
5376,
34199,
3560,
368,
341,
286,
1077,
2415,
25,
425,
15897,
18497,
284,
19860,
341,
310,
425,
15897,
18497,
486,
931,
1006,
394,
330,
76,
1600,
391,
756,
394,
1460,
486,
10536,
486,
2141... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_all_parse0() {
let (input, _) = Filter::parse0(argv!["all"]).unwrap();
assert_eq!(input.len(), 1); // did not parse "all"
} | rust_cleaned_test_functions.jsonl/115954 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 81
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5705,
21039,
15,
368,
341,
286,
1077,
320,
1355,
11,
27439,
284,
12339,
486,
6400,
15,
15329,
0,
1183,
541,
45014,
15454,
543,
286,
2060,
10714,
10297,
1355,
19406,
1507,
220,
16,
1215,
442,
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 |
#[test]
fn test_hashmap_with_enum_key() {
use std::collections::HashMap;
use json;
#[derive(RustcEncodable, Eq, Hash, PartialEq, RustcDecodable, Debug)]
enum Enum {
Foo,
#[allow(dead_code)]
Bar,
}
let mut map = HashMap::new();
... | rust_cleaned_test_functions.jsonl/22761 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 295
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
2186,
6615,
31054,
3097,
368,
341,
286,
990,
1460,
486,
51137,
486,
18497,
280,
286,
990,
2951,
280,
286,
11506,
27098,
2785,
590,
66,
7408,
69129,
11,
33122,
11,
6531,
11,
55039,
11,
3378... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ip_to_cache() {
let keypair = Keypair::new();
let mut faucet = Faucet::new(keypair, None, None, None);
let ip = "127.0.0.1".parse().expect("create IpAddr from string");
assert_eq!(faucet.ip_cache.len(), 0);
faucet.add_ip_to_cache(ip);
assert_eq... | rust_cleaned_test_functions.jsonl/117722 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 203
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
10385,
2346,
11529,
368,
341,
286,
1077,
1376,
12670,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
5206,
71453,
284,
96362,
295,
486,
931,
4857,
12670,
11,
2240,
11,
2240,
11,
2240,
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_transaction_exonum_field_invalid_segwit_flag() {
let hex_tx = "6600000000101b651818fe3855d0d5d74de1cf72b56503c16f808519440e842b6a\
dc2dd570c4930100000000feffffff02deaa7b0000000000160014923904449829\
cd865cdfb72abdba0806ce9e489110270000000000002... | rust_cleaned_test_functions.jsonl/61859 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 542
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28884,
2702,
263,
372,
5013,
31433,
35325,
88519,
10933,
368,
341,
286,
1077,
12371,
17805,
284,
330,
21,
21,
15,
15,
15,
15,
15,
15,
15,
15,
16,
15,
16,
65,
21,
20,
16,
23,
16,
23,
1859,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dot_lookup_with_partial_as_field() -> TestResult {
let p = Polar::new();
p.load_str("f(x, y) if {a: y, b: y}.(x) > 0;")?;
p.register_constant(sym!("x"), term!(value!(op!(And))))?;
let mut q = p.new_query_from_term(term!(call!("f", [sym!("x"), sym!("y")])), false);... | rust_cleaned_test_functions.jsonl/63023 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 323
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30941,
27464,
6615,
52068,
11898,
5013,
368,
1464,
3393,
2077,
341,
286,
1077,
281,
284,
55896,
486,
931,
543,
286,
281,
5104,
2895,
445,
69,
2075,
11,
379,
8,
421,
314,
64,
25,
379,
11,
293,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.