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_duplicate_files() -> Result<(), SourceBundleError> {
let writer = Cursor::new(Vec::new());
let mut bundle = SourceBundleWriter::start(writer)?;
bundle.add_file("bar.txt", &b"filecontents"[..], SourceFileInfo::default())?;
bundle.add_file("bar.txt", &b"otherconten... | rust_cleaned_test_functions.jsonl/51755 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 222
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70434,
10931,
368,
1464,
5714,
68843,
8748,
8409,
1454,
29,
341,
286,
1077,
6916,
284,
28067,
486,
931,
49923,
486,
931,
1423,
286,
1077,
5206,
12894,
284,
8748,
8409,
6492,
486,
2468,
38356,
8972... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_root_preserve() {
let scene = TestScenario::new(util_name!());
let result = scene.cmd("whoami").run();
if skipping_test_is_okay(&result, "whoami: cannot find name for user ID") {
return;
}
let user_name = String::from(result.stdout_str().trim());
assert!(!user_na... | rust_cleaned_test_functions.jsonl/26598 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 255
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12993,
32116,
5852,
368,
341,
262,
1077,
6109,
284,
3393,
54031,
486,
931,
67811,
1269,
0,
5231,
262,
1077,
1102,
284,
6109,
25724,
445,
14623,
10606,
1827,
6108,
543,
262,
421,
42659,
4452,
6892,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_tokenize_cjk_chars() {
// Given
let test_tuples = [
(
"[UNK]中华人民共和国 [PAD] asdf",
vec![
"[UNK]",
"中",
"华",
"人",
"民",
... | rust_cleaned_test_functions.jsonl/13626 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1316
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86508,
666,
41808,
37418,
368,
341,
286,
442,
286,
16246,
198,
286,
1077,
1273,
89269,
284,
2278,
310,
2399,
394,
10545,
31883,
60,
105492,
104773,
508,
43818,
60,
438,
2940,
756,
394,
7486,
90515... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_trima() {
let candles = RandomCandles::default();
let src: Vec<ValueType> = candles.take(300).map(|x| x.close).collect();
(1..255).for_each(|sma_length| {
let mut ma = TestingMethod::new(sma_length, &src[0]).unwrap();
let mut level2 = Vec::new();
src.iter().enumerate().for_each... | rust_cleaned_test_functions.jsonl/87171 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 435
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3547,
7523,
368,
341,
197,
10217,
51205,
284,
10612,
34,
20125,
486,
2258,
1428,
197,
10217,
2286,
25,
11312,
48325,
929,
29,
284,
51205,
40161,
7,
18,
15,
15,
568,
2186,
22428,
87,
91,
856,
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... | 3 |
#[test]
fn test_winding_number() {
let poly = [
Point2D::new(0.0, 0.0),
Point2D::new(5.0, 0.0),
Point2D::new(5.0, 5.0),
Point2D::new(0.0, 0.0),
];
// point on rectangle
assert_eq!(winding_number(&Point2D::new(5.0, 2.0), &poly), 0i32... | rust_cleaned_test_functions.jsonl/40385 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 279
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1670,
3961,
5500,
368,
341,
286,
1077,
9861,
284,
2278,
310,
5126,
17,
35,
486,
931,
7,
15,
13,
15,
11,
220,
15,
13,
15,
1326,
310,
5126,
17,
35,
486,
931,
7,
20,
13,
15,
11,
220,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_string() {
let s: ByteString = "hello".to_owned().into();
assert_eq!(&s, "hello");
let t: &str = s.as_ref();
assert_eq!(t, "hello");
} | rust_cleaned_test_functions.jsonl/65284 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 103
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
3904,
368,
341,
286,
1077,
274,
25,
95302,
284,
330,
14990,
3263,
983,
51973,
1005,
18122,
543,
286,
2060,
10714,
0,
2099,
82,
11,
330,
14990,
797,
286,
1077,
259,
25,
609,
495,
284,
274... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_writer_properties_builder() {
let props = WriterProperties::builder()
// file settings
.set_writer_version(WriterVersion::PARQUET_2_0)
.set_data_pagesize_limit(10)
.set_dictionary_pagesize_limit(20)
.set_write_batch_size(30)
... | rust_cleaned_test_functions.jsonl/56728 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1132
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28908,
25158,
28532,
368,
341,
286,
1077,
6914,
284,
29404,
7903,
486,
17850,
741,
310,
442,
1034,
5003,
198,
310,
659,
746,
28908,
9438,
7,
6492,
5637,
486,
16567,
5757,
1348,
62,
17,
62,
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_file() {
use io::stream::Disposer;
use memory::Heap;
use memory::StackBucket;
let mut heap = Heap::create();
let root_stack_bucket = StackBucket::create(&mut heap);
{
let root_page = Page::get(root_stack_bucket as usize);
let _r = Region::create_from_page(... | rust_cleaned_test_functions.jsonl/94369 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1212
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
368,
341,
262,
990,
6399,
486,
4027,
486,
4839,
20071,
280,
262,
990,
4938,
486,
27909,
280,
262,
990,
4938,
486,
4336,
36018,
280,
262,
1077,
5206,
17364,
284,
47307,
486,
3182,
543,
262,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
#[test]
fn test_spanned_macro() {
compare(
r#"
grammar;
extern { type Location = usize; enum Tok { "Foo" => Foo(..) } }
A = Spanned<"Foo">;
Spanned<T> = {
@L T @R
};
"#,
vec![("A", "(usize, Tok, usize)")],
)
} | rust_cleaned_test_functions.jsonl/50472 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 174
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37382,
18694,
58810,
368,
341,
262,
9429,
1006,
286,
435,
2,
698,
286,
31428,
280,
286,
15637,
314,
943,
9866,
284,
22301,
26,
7618,
21447,
314,
330,
40923,
1,
589,
33428,
56422,
8,
335,
456,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_aggregate_verify_no_check1() {
let f = File::open("tests/aggregate_verify.txt").unwrap();
let file = BufReader::new(&f);
let mut pubs: Vec<PublicKey> = Vec::new();
let mut msg: Vec<u8> = Vec::new();
let mut sig = unsafe { Signature::uninit() };
let mut valid = false;
... | rust_cleaned_test_functions.jsonl/8595 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 748
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57757,
20587,
14240,
35638,
6536,
7200,
16,
368,
341,
262,
1077,
282,
284,
2887,
486,
2508,
445,
23841,
14,
59606,
35638,
3909,
1827,
15454,
543,
262,
1077,
1034,
284,
69013,
5062,
486,
931,
2099,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_publish_packet_basic() {
let packet = PublishPacket::new(TopicName::new("a/b".to_owned()).unwrap(),
QoSWithPacketIdentifier::Level2(10),
b"Hello world!".to_vec());
let mut buf = Vec::new();
p... | rust_cleaned_test_functions.jsonl/107534 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 268
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58779,
21078,
34729,
368,
341,
286,
1077,
10151,
284,
23499,
16679,
486,
931,
4140,
24810,
675,
486,
931,
445,
64,
3470,
3263,
983,
51973,
6011,
15454,
3148,
2559,
1207,
72743,
2354,
16679,
8714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_serializer() {
let mut a = Account::new(0, 512, id());
let b = BudgetProgram::default();
b.serialize(&mut a.userdata).unwrap();
let buf = serialize(&b).unwrap();
assert_eq!(a.userdata[8..8 + buf.len()], buf[0..]);
let c = BudgetProgram::deserialize... | rust_cleaned_test_functions.jsonl/30405 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 177
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
67441,
368,
341,
286,
1077,
5206,
264,
284,
8615,
486,
931,
7,
15,
11,
220,
20,
16,
17,
11,
877,
1423,
286,
1077,
293,
284,
27269,
10690,
486,
2258,
543,
286,
293,
33969,
2099,
6984,
264,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_request_snapshot_after_propose_merge() {
let mut cluster = new_node_cluster(0, 3);
configure_for_merge(&mut cluster);
cluster.cfg.raft_store.merge_max_log_gap = 100;
configure_for_lease_read(&mut cluster, Some(100), Some(1000));
let pd_client = Arc::clone(&cluster.pd_client);... | rust_cleaned_test_functions.jsonl/95196 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1083
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7893,
53265,
19844,
21663,
960,
20888,
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,
10652,
30481,
13,
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_schema_from_thrift_root_has_repetition() {
let message_type = "
message schema {
OPTIONAL BYTE_ARRAY a (UTF8);
OPTIONAL INT32 b (UINT_8);
}
";
let expected_schema = parse_message_type(message_type).unwrap();
let mut thrift_schema = to_thr... | rust_cleaned_test_functions.jsonl/16695 | {
"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,
25371,
5673,
5854,
41380,
12993,
21778,
1288,
55767,
368,
341,
1789,
286,
1077,
1943,
1819,
284,
6228,
262,
1943,
10802,
341,
414,
76232,
35377,
17724,
264,
320,
8561,
23,
317,
414,
76232,
9221,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_remappings() {
figment::Jail::expect_with(|jail| {
jail.create_file(
"foundry.toml",
r#"
[default]
src = "some-source"
out = "some-out"
cache = true
"#,
)?;... | rust_cleaned_test_functions.jsonl/42697 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1018
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19194,
23036,
368,
341,
286,
4144,
478,
486,
41,
604,
486,
17119,
6615,
22428,
73,
604,
91,
341,
310,
17540,
2520,
2458,
1006,
394,
330,
15105,
884,
73494,
75,
756,
394,
435,
2,
698,
394,
508,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_vector_cycle_bare() {
let hdr = indoc! {"
#include <cstdint>
#include <vector>
struct A {
uint32_t a;
};
inline uint32_t take_vec(std::vector<A> many_as) {
return many_as.size();
}
inline std::vector<A> get_vec()... | rust_cleaned_test_functions.jsonl/9860 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 344
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12247,
39079,
880,
546,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
286,
671,
997,
366,
96975,
397,
286,
671,
997,
366,
3215,
397,
286,
2036,
362,
341,
310,
2622,
18,
17,
528,
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_learner_log_replication() {
let l = default_logger();
let n1 = new_test_learner_raft(1, vec![1], vec![2], 10, 1, new_storage(), &l);
let n2 = new_test_learner_raft(2, vec![1], vec![2], 10, 1, new_storage(), &l);
let mut network = Network::new(vec![Some(n1), Some(n2)], &l);
n... | rust_cleaned_test_functions.jsonl/19176 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 751
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
93595,
5224,
25533,
1693,
368,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
1077,
308,
16,
284,
501,
4452,
62,
93595,
62,
2944,
7,
16,
11,
7486,
20703,
16,
1125,
7486,
20703,
17,
1125,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_chan_reserve_violation_outbound_htlc_inbound_chan() {
let mut chanmon_cfgs = create_chanmon_cfgs(2);
// sending any above-dust amount would result in a channel reserve violation.
// In this test we check that we would be prevented from sending an HTLC in
// this situation.
let feerate_per... | rust_cleaned_test_functions.jsonl/16871 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 709
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45552,
89591,
2273,
24903,
367,
6068,
10891,
49086,
17257,
1243,
10891,
45552,
368,
341,
10217,
5206,
26023,
1645,
18343,
82,
284,
1855,
45552,
1645,
18343,
82,
7,
17,
317,
1572,
197,
322,
11628,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_out_of_bounds() {
with_graph(|graph| {
let out_of_bounds_result: RedisGraphResult<(i64, String, bool)> =
graph.query("RETURN 42, 'Hello, world!'");
assert!(out_of_bounds_result.is_err());
});
} | rust_cleaned_test_functions.jsonl/94393 | {
"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,
6068,
3575,
36878,
368,
341,
262,
448,
14738,
22428,
4439,
91,
341,
286,
1077,
700,
3575,
36878,
5287,
25,
34158,
11212,
2077,
28706,
72,
21,
19,
11,
923,
11,
1807,
16018,
4035,
310,
4771,
4786,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_builder() {
let footer_image = ImageSource::url(
"https://raw.githubusercontent.com/twilight-rs/twilight/main/logo.png",
)
.unwrap();
let timestamp = Timestamp::from_secs(1_580_608_922).expect("non zero");
let embed = EmbedBuilder::new()
... | rust_cleaned_test_functions.jsonl/50087 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 863
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28532,
368,
341,
286,
1077,
23173,
4954,
284,
4654,
3608,
486,
1085,
1006,
310,
330,
2428,
1110,
1041,
50927,
905,
5523,
86,
34900,
3795,
82,
5523,
86,
34900,
15351,
28547,
3508,
756,
286,
1727,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_display_mock_matching_regex_body() {
let mock = mock("POST", "/")
.match_body(Matcher::Regex("hello".to_string()))
.create();
assert_eq!("\r\nPOST /\r\nhello\r\n", format!("{}", mock));
} | rust_cleaned_test_functions.jsonl/82425 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 113
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14825,
34134,
70763,
41832,
14114,
368,
341,
262,
1077,
7860,
284,
7860,
445,
2946,
497,
3521,
1138,
286,
659,
6347,
14114,
3189,
28058,
486,
32464,
445,
14990,
3263,
983,
3904,
12145,
286,
659,
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_rpaths_to_flags() {
let flags = rpaths_to_flags(&[
"path1".to_string(),
"path2".to_string()
]);
assert_eq!(flags,
["-Wl,-rpath,path1",
"-Wl,-rpath,path2"]);
} | rust_cleaned_test_functions.jsonl/20101 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 174
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
21623,
2346,
14130,
368,
341,
286,
1077,
8042,
284,
435,
21623,
2346,
14130,
2099,
9640,
310,
330,
2343,
16,
3263,
983,
3904,
3148,
310,
330,
2343,
17,
3263,
983,
3904,
741,
286,
13201,
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_get_dup() {
let dir = TempDir::new("test").unwrap();
let env = Environment::new().open(dir.path()).unwrap();
let db = env.create_db(None, DatabaseFlags::DUP_SORT).unwrap();
let mut txn = env.begin_rw_txn().unwrap();
txn.put(db, b"key1", b"val1", WriteFlag... | rust_cleaned_test_functions.jsonl/15133 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1131
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
51932,
368,
341,
286,
1077,
5419,
284,
19944,
6184,
486,
931,
445,
1944,
1827,
15454,
543,
286,
1077,
6105,
284,
11586,
486,
931,
1005,
2508,
14161,
3875,
6011,
15454,
543,
286,
1077,
2927,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_inflight_tracer_race() {
let tmp_file = TempFile::new().unwrap();
let map = Arc::new(BlobStateMap::from(
IndexedChunkMap::new(tmp_file.as_path().to_str().unwrap(), 10).unwrap(),
));
let chunk_4: Arc<dyn BlobChunkInfo> = Arc::new({
let mut ... | rust_cleaned_test_functions.jsonl/64335 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1109
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
38390,
3547,
9584,
91317,
368,
341,
286,
1077,
4174,
2458,
284,
19944,
1703,
486,
931,
1005,
15454,
543,
286,
1077,
2415,
284,
19689,
486,
931,
5349,
1684,
1397,
2227,
486,
1499,
1006,
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... | 5 |
#[test]
fn test_typedef_of_fully_instantiated_template() -> Result<()> {
let ir = ir_from_cc(
r#" #pragma clang lifetime_elision
// Doc comment of MyStruct template.
template <typename T>
struct MyStruct {
// Doc comment of GetValue method.
... | rust_cleaned_test_functions.jsonl/37171 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1838
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42111,
4219,
3575,
761,
21965,
1243,
4706,
10029,
8693,
368,
1464,
5714,
71698,
341,
262,
1077,
6216,
284,
6216,
5673,
28955,
1006,
286,
435,
55543,
671,
6015,
18260,
19031,
21602,
1816,
271,
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_decode() {
assert!(decode(encode(0b0000111100001111) ^ 1<<63).unwrap() ==
(0b0000111100001111, 1));
assert!(decode(encode(0b1100011111111111) ^ 1).unwrap() ==
(0b1100011111111111, 0));
assert!(decode(encode(0b1111111100000000) ^ 0b1101001... | rust_cleaned_test_functions.jsonl/13865 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 719
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
368,
341,
286,
2060,
10297,
18196,
7,
6180,
7,
15,
65,
15,
15,
15,
15,
16,
16,
16,
16,
15,
15,
15,
15,
16,
16,
16,
16,
8,
6306,
220,
16,
2442,
21,
18,
568,
15454,
368,
47761,
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... | 2 |
#[test]
fn test_all_items() {
let rules = create_rules(
r#"
macro_rules! foo {
($ ($ i:item)*) => ($ (
$ i
)*)
}
"#,
);
assert_expansion(MacroKind::Items, &rules, r#"
foo! {
extern crate a;
mod b;
... | rust_cleaned_test_functions.jsonl/14719 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 451
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5705,
12134,
368,
341,
262,
1077,
5601,
284,
1855,
21407,
1006,
286,
435,
2,
698,
286,
18072,
21407,
0,
15229,
341,
310,
1711,
1711,
600,
78852,
8,
3764,
589,
1711,
2399,
394,
400,
600,
198,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stft_build_assertion_1() {
_test_stft(10, 10, None, Some(11), None, PadMode::Truncate).unwrap();
} | rust_cleaned_test_functions.jsonl/104790 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 59
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1261,
723,
20801,
16553,
290,
62,
16,
368,
341,
262,
716,
1944,
1261,
723,
7,
16,
15,
11,
220,
16,
15,
11,
2240,
11,
4329,
7,
16,
16,
701,
2240,
11,
25299,
3636,
486,
1282,
26900,
568,
154... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_build_user_with_username() {
let email = String::from("someone@example.com");
let username = String::from("someusername123");
let age = 50;
let actual_user_instance: User = build_user(email, username, age);
let expected_response: String = "someusername123"... | rust_cleaned_test_functions.jsonl/69111 | {
"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,
20801,
3317,
6615,
21588,
368,
341,
286,
1077,
2551,
284,
923,
486,
1499,
445,
89479,
35487,
905,
797,
286,
1077,
5934,
284,
923,
486,
1499,
445,
14689,
5113,
16,
17,
18,
797,
286,
1077,
4231,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_straight_cascade() {
test(
&vec!["4S 6C 7S 8D 5H", "5S 7H 8S 9D 6H"],
&vec!["5S 7H 8S 9D 6H"],
)
} | rust_cleaned_test_functions.jsonl/121274 | {
"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,
2895,
7386,
666,
19977,
368,
341,
1066,
262,
1273,
1006,
286,
609,
4083,
0,
1183,
19,
50,
220,
21,
34,
220,
22,
50,
220,
23,
35,
220,
20,
39,
497,
330,
20,
50,
220,
22,
39,
220,
23,
50,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unbound_parameters_are_null() {
let db = Connection::open_in_memory().unwrap();
let sql = "CREATE TABLE test (x TEXT, y TEXT)";
db.execute_batch(sql).unwrap();
let mut stmt = db
.prepare("INSERT INTO test (x, y) VALUES (:x, :y)")
.unwrap()... | rust_cleaned_test_functions.jsonl/57176 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 310
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
10891,
18263,
56855,
15162,
368,
341,
286,
1077,
2927,
284,
11032,
486,
2508,
1243,
19195,
1005,
15454,
543,
286,
1077,
5704,
284,
330,
22599,
14363,
1273,
320,
87,
15762,
11,
379,
15762,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_create() {
let type_ = SimpleObject::static_type();
let obj = Object::with_type(type_, &[]).expect("Object::new failed");
assert!(obj.type_().is_a(Dummy::static_type()));
// Assert that the object representation is equivalent to the underlying C GObject pointer
... | rust_cleaned_test_functions.jsonl/9008 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 331
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
368,
341,
286,
1077,
943,
62,
284,
8993,
1190,
486,
1978,
1819,
543,
286,
1077,
2839,
284,
3002,
486,
4197,
1819,
5808,
6878,
609,
1294,
568,
17119,
445,
1190,
486,
931,
4641,
3071,
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_shortest_path_dag_weights() {
let edges = vec![(5, 2), (5, 0), (4, 0), (4, 1), (2, 3), (3, 1), (5, 3)];
let adj = adjacency_map(edges.iter());
let path = shortest_path_dag(&5, &1, &adj, |n1, n2| {
// make even-numbered paths expensive
if (n1 - n2) ... | rust_cleaned_test_functions.jsonl/64953 | {
"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,
16673,
477,
2638,
814,
351,
21114,
368,
341,
286,
1077,
12822,
284,
7486,
0,
9697,
20,
11,
220,
17,
701,
320,
20,
11,
220,
15,
701,
320,
19,
11,
220,
15,
701,
320,
19,
11,
220,
16,
701,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_next_multiple_of_32() {
// next_multiple_of_32 returns x when it is a multiple of 32
for i in 0..32 {
let x = i * 32;
assert_eq!(Some(x), next_multiple_of_32(x));
}
for x in 0..1024 {
if x % 32 == 0 {
c... | rust_cleaned_test_functions.jsonl/9434 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 403
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11257,
45233,
3575,
62,
18,
17,
368,
341,
286,
442,
1790,
45233,
3575,
62,
18,
17,
4675,
856,
979,
432,
374,
264,
5248,
315,
220,
18,
17,
198,
286,
369,
600,
304,
220,
15,
496,
18,
17,
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... | 4 |
#[test]
fn test_rule_prototype_error() {
let prototype = r#"type f(x: String) if x = "bad";"#;
super::parse_lines(0, prototype).expect_err("parse error");
} | rust_cleaned_test_functions.jsonl/12190 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 82
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21124,
22357,
4156,
4096,
368,
341,
286,
1077,
24052,
284,
435,
55543,
1313,
282,
2075,
25,
923,
8,
421,
856,
284,
330,
13855,
5123,
57676,
280,
286,
2256,
486,
6400,
18323,
7,
15,
11,
24052,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_create_stop_get_actor() {
with_actor_system_async(|system| {
let actor_ref = TestActor::new().start();
let id = actor_ref.id();
actor_ref
.clone()
.stop()
.map_err(|_| println!("Failed to stop"))
.map(move |_| {
... | rust_cleaned_test_functions.jsonl/73678 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 249
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
19039,
3062,
54818,
368,
341,
262,
448,
54818,
17687,
28346,
22428,
8948,
91,
341,
286,
1077,
12089,
7793,
284,
3393,
18870,
486,
931,
1005,
2468,
543,
286,
1077,
877,
284,
12089,
7793,
1764... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_seq_index() {
let gil = Python::acquire_gil();
let py = gil.python();
let v: Vec<i32> = vec![1, 1, 2, 3, 5, 8];
let ob = v.to_object(py);
let seq = ob.cast_as::<PySequence>(py).unwrap();
assert_eq!(0, seq.index(1i32).unwrap());
assert_eq!(2... | rust_cleaned_test_functions.jsonl/47416 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 290
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14486,
3560,
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,
25,
11312,
21897,
18,
17,
29,
284,
7486,
2070... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_gif() {
assert_eq_ok!(
ImageInfo::from_file_path("images/valid/gif/sample.gif"),
ImageInfo {
format: ImageFormat::GIF,
ext: "gif",
full_ext: "gif",
mimetype: "image/gif",
size: ImageSize { width: 123, height: 456 },
... | rust_cleaned_test_functions.jsonl/65159 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 206
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
333,
368,
341,
262,
2060,
10714,
19817,
33673,
286,
4654,
1731,
486,
1499,
2458,
2638,
445,
3642,
14,
1891,
90831,
69851,
16008,
4461,
286,
4654,
1731,
341,
310,
3561,
25,
4654,
4061,
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_package_collision() {
let output = cargo_hack()
.args(&["hack", "check"])
.current_dir(test_dir("tests/fixtures/package_collision"))
.output()
.unwrap();
output
.assert_success()
.assert_stderr_contains("running `cargo check` on member1")
... | rust_cleaned_test_functions.jsonl/25312 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 175
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26328,
70375,
368,
341,
262,
1077,
2550,
284,
25652,
1523,
473,
741,
286,
659,
2116,
2099,
1183,
65972,
497,
330,
2028,
14108,
286,
659,
3231,
4334,
8623,
4334,
445,
23841,
94275,
64000,
70375,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_query_errors_on_impossible_patterns() {
let js_lang = get_language("javascript");
let rb_lang = get_language("ruby");
allocations::record(|| {
assert_eq!(
Query::new(
js_lang,
"(binary_expression left: (identifier) left: (identifie... | rust_cleaned_test_functions.jsonl/25144 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2719
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
20196,
4470,
17895,
10031,
64923,
368,
341,
262,
1077,
6994,
17876,
284,
633,
29021,
445,
14073,
797,
262,
1077,
18717,
17876,
284,
633,
29021,
445,
46275,
3071,
262,
69642,
486,
8548,
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... | 2 |
#[test]
fn test_derive_macro_helper_attributes() {
let serialized = serde_json::to_string(&ValAttr1a::ValOne).unwrap();
assert_eq!("\"RenamedValOne\"", serialized);
let deserialized: ValAttr1a = serde_json::from_str(&serialized).unwrap();
assert_eq!(ValAttr1a::ValOne, deserialized);
let ser... | rust_cleaned_test_functions.jsonl/75517 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 429
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35345,
533,
58810,
10418,
18240,
368,
341,
262,
1077,
32916,
284,
61570,
9455,
486,
983,
3904,
2099,
2208,
13371,
16,
64,
486,
2208,
3966,
568,
15454,
543,
262,
2060,
10714,
17223,
2105,
34625,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dense_descend() {
let da_lst = vec![
1., 7., 8.,
-2., 3., 5.,
7., 49., 56.,
-14., 21., 35.,
];
let mut l = Dense::<f64> {
input_shape: Shape::new([2, 3]),
output_shape: Shape::new([2]),
weight: vec![
2., 1.,... | rust_cleaned_test_functions.jsonl/39099 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 685
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
72619,
10986,
408,
368,
341,
262,
1077,
2994,
31983,
284,
7486,
90515,
286,
220,
16,
2572,
220,
22,
2572,
220,
23,
38088,
286,
481,
17,
2572,
220,
18,
2572,
220,
20,
38088,
1789,
286,
220,
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... | 3 |
#[test]
fn test_store_and_forward_send_tx() {
let mut shutdown_a = Shutdown::new();
let mut shutdown_b = Shutdown::new();
let mut shutdown_c = Shutdown::new();
let mut shutdown_c2 = Shutdown::new();
let factories = CryptoFactories::default();
let alice_db_tempdir = tempdir().unwrap();
... | rust_cleaned_test_functions.jsonl/132202 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2414
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14809,
8378,
32121,
13565,
17805,
368,
341,
262,
1077,
5206,
23766,
4306,
284,
65379,
486,
931,
543,
262,
1077,
5206,
23766,
880,
284,
65379,
486,
931,
543,
262,
1077,
5206,
23766,
666,
284,
65379... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parse_arguments_link() {
assert_eq!(CompilerArguments::NotCompilation,
_parse_arguments(&stringvec!["-shared", "foo.o", "-o", "foo.so", "bar.o"]));
} | rust_cleaned_test_functions.jsonl/15024 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 100
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
43433,
7233,
368,
341,
286,
2060,
10714,
10297,
38406,
19139,
486,
2623,
64502,
345,
4293,
716,
6400,
43433,
2099,
917,
4083,
0,
1183,
12,
6100,
497,
330,
7975,
14439,
497,
6523,
78,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_aoc_2021_day_02_part_01() {
let input = InputParser::<String>::data("../aoc2021/src/day_02/input");
println!("AoC 2021 Day 2 Part 1: {}.", part_01(&input));
} | rust_cleaned_test_functions.jsonl/89802 | {
"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,
4306,
509,
62,
17,
15,
17,
16,
16763,
62,
15,
17,
10495,
62,
15,
16,
368,
341,
286,
1077,
1946,
284,
5571,
6570,
27638,
703,
6831,
691,
17409,
64,
509,
17,
15,
17,
16,
13437,
44739,
62,
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_check_space_redundancy() {
let tmp_dir = Builder::new().prefix("test").tempdir().unwrap();
let engine = open_db(tmp_dir.path().to_str().unwrap());
let cf = get_cf_handle(&engine, CF_WRITE).unwrap();
let cf2 = engine.c().cf_handle(CF_WRITE).unwrap();
... | rust_cleaned_test_functions.jsonl/73537 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1443
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
14663,
1288,
1054,
303,
6572,
368,
341,
286,
1077,
4174,
4334,
284,
20626,
486,
931,
1005,
11849,
445,
1944,
1827,
3888,
3741,
1005,
15454,
543,
286,
1077,
4712,
284,
1787,
8685,
10368,
4334... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parse_array_boundaries() {
// receive an incomplete message
assert!(parse_resp_value(Vec::from("*7\r").as_mut_slice()).unwrap().is_none(), "expected Ok(None)");
// receive an incomplete message
assert!(parse_resp_value(Vec::from("*7\r\n*").as_mut_slice()).unwrap()... | rust_cleaned_test_functions.jsonl/85372 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 350
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
3858,
19447,
5431,
368,
341,
286,
442,
5258,
458,
32143,
1943,
198,
286,
2060,
10297,
6400,
35160,
3142,
49923,
486,
1499,
29592,
22,
12016,
1827,
300,
29523,
26488,
6011,
15454,
1005,
285,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_clear_unconfirmed_slot() {
let mut slot_meta = SlotMeta::new_orphan(5);
slot_meta.consumed = 5;
slot_meta.received = 5;
slot_meta.next_slots = vec![6, 7];
slot_meta.clear_unconfirmed_slot();
let mut expected = SlotMeta::new_orphan(5);
expe... | rust_cleaned_test_functions.jsonl/56590 | {
"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,
21811,
4907,
41028,
27563,
368,
341,
286,
1077,
5206,
9446,
13381,
284,
31316,
12175,
486,
931,
8734,
9943,
7,
20,
317,
286,
9446,
13381,
2862,
1242,
291,
284,
220,
20,
280,
286,
9446,
13381,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ipblock_adjacent() {
assert_eq!(IpBlock::new(5, 6).adjacent(&IpBlock::new(7, 9)), true);
assert_eq!(IpBlock::new(7, 9).adjacent(&IpBlock::new(5, 6)), true);
assert_eq!(IpBlock::new(2, 4).adjacent(&IpBlock::new(6, 8)), false);
assert_eq!(IpBlock::new(2, 4).adjacent... | rust_cleaned_test_functions.jsonl/109569 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 178
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10385,
4574,
42559,
18181,
368,
341,
286,
2060,
10714,
10297,
23378,
4713,
486,
931,
7,
20,
11,
220,
21,
568,
24739,
18181,
2099,
23378,
4713,
486,
931,
7,
22,
11,
220,
24,
5731,
830,
317,
286... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_package_headline_invalid() {
let src = "
// foo does a thing.
package foo
";
let loc = Locator::new(&src[..]);
assert_docs_full(
src,
PackageDoc {
path: "path".to_string(),
name: "foo".to_stri... | rust_cleaned_test_functions.jsonl/9984 | {
"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,
26328,
13138,
1056,
31433,
368,
341,
286,
1077,
2286,
284,
6228,
286,
442,
15229,
1558,
264,
3166,
624,
286,
6328,
15229,
198,
286,
7620,
286,
1077,
1329,
284,
98653,
486,
931,
2099,
3548,
95874,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_metadata() {
let mut builder = MetadataBuilder::new();
let mut meta_kvs = vec![];
for i in 0..5 {
let key = format!("K{}", i);
let val = format!("v{}", i);
builder.add_str(&key, &val).unwrap();
meta_kvs.push((key.to_ascii_lo... | rust_cleaned_test_functions.jsonl/63647 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 877
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22220,
368,
341,
286,
1077,
5206,
7363,
284,
33589,
3297,
486,
931,
543,
286,
1077,
5206,
8823,
4698,
11562,
284,
7486,
0,
15078,
286,
369,
600,
304,
220,
15,
496,
20,
341,
310,
1077,
1376,
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... | 6 |
#[test]
fn test_take_bool_with_offset() {
let index =
UInt32Array::from(vec![Some(3), None, Some(1), Some(3), Some(2), None]);
let index = index.slice(2, 4);
let index = index
.as_any()
.downcast_ref::<PrimitiveArray<UInt32Type>>()
.unwrap(... | rust_cleaned_test_functions.jsonl/27050 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 297
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73261,
22159,
6615,
6917,
368,
341,
286,
1077,
1922,
4035,
310,
22275,
18,
17,
1857,
486,
1499,
25592,
20703,
8373,
7,
18,
701,
2240,
11,
4329,
7,
16,
701,
4329,
7,
18,
701,
4329,
7,
17,
701... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lints_tracking_hash_different_values() {
let mut v1 = Options::default();
let mut v2 = Options::default();
let mut v3 = Options::default();
v1.lint_opts = vec![
(String::from("a"), Level::Allow),
(String::from("b"), Level::Warn),
(String::from("c"), Level... | rust_cleaned_test_functions.jsonl/16050 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 539
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
907,
21042,
66105,
8950,
82741,
9146,
368,
341,
262,
1077,
5206,
348,
16,
284,
14566,
486,
2258,
543,
262,
1077,
5206,
348,
17,
284,
14566,
486,
2258,
543,
262,
1077,
5206,
348,
18,
284,
14566,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_clone_options() {
let mut cf_opts = ColumnFamilyOptions::new();
cf_opts.compression(DBCompressionType::Snappy);
let cf_opts2 = cf_opts.clone();
assert_eq!(cf_opts.get_compression(), cf_opts2.get_compression());
} | rust_cleaned_test_functions.jsonl/34124 | {
"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,
54742,
8743,
368,
341,
262,
1077,
5206,
24111,
32354,
284,
9332,
15192,
3798,
486,
931,
543,
262,
24111,
32354,
905,
4011,
32184,
81411,
929,
486,
20720,
11144,
317,
262,
1077,
24111,
32354,
17,
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 |
#[test]
fn test_keypair_from_seed_phrase_and_passphrase() {
let mnemonic = Mnemonic::new(MnemonicType::Words12, Language::English);
let passphrase = "42";
let seed = Seed::new(&mnemonic, passphrase);
let expected_keypair = keypair_from_seed(seed.as_bytes()).unwrap();
let ... | rust_cleaned_test_functions.jsonl/8413 | {
"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,
3097,
12670,
5673,
33809,
66696,
8378,
15464,
27710,
368,
341,
286,
1077,
86801,
284,
56731,
38801,
486,
931,
3189,
70775,
929,
486,
23489,
16,
17,
11,
11434,
486,
22574,
317,
286,
1077,
75493,
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_parsing_complete_header() {
let mut c = RetainingConsumer::new();
{
let p = Parser::new(ZERO_BOUND_HEADER, &mut c);
assert_matches!(p.parse(), Ok(()));
}
let mut header = dr::ModuleHeader::new(0);
header.set_version(1, 0);
a... | rust_cleaned_test_functions.jsonl/85734 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 183
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
28598,
27675,
8757,
368,
341,
286,
1077,
5206,
272,
284,
10392,
2056,
29968,
486,
931,
543,
286,
341,
310,
1077,
281,
284,
21102,
486,
931,
27855,
17297,
73644,
20330,
11,
609,
6984,
272,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sha1_padding_2() {
let input: Vec<u8> = vec![0u8; 55];
let mut expected_out = vec![0u8; HASH_BLOCK_LEN_BYTES];
expected_out[56..].copy_from_slice(&(55 * 8 as u64).to_be_bytes());
expected_out[55] = 0x80;
assert_eq!(input.hashpad(true), expected_out);
... | rust_cleaned_test_functions.jsonl/90595 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 165
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48836,
16,
40726,
62,
17,
368,
341,
286,
1077,
1946,
25,
11312,
34837,
23,
29,
284,
7486,
20703,
15,
84,
23,
26,
220,
20,
20,
935,
286,
1077,
5206,
3601,
6068,
284,
7486,
20703,
15,
84,
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_prod_negative() {
assert_eq!(
rune!(i32 => pub fn main() { [-1, 2, 3, 6].iter().product() }),
-36
)
} | rust_cleaned_test_functions.jsonl/33615 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 80
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34984,
53865,
368,
341,
262,
2060,
10714,
33673,
286,
63499,
10297,
72,
18,
17,
589,
6675,
5168,
1887,
368,
314,
10055,
16,
11,
220,
17,
11,
220,
18,
11,
220,
21,
936,
2015,
1005,
3031,
368,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_unchanged_at_start() {
let arena = Arena::new();
let config = from_language(guess_language::Language::EmacsLisp);
let lhs_nodes = parse(&arena, "unchanged A B", &config);
let rhs_nodes = parse(&arena, "unchanged X", &config);
init_info(&lhs_nodes, &rhs_no... | rust_cleaned_test_functions.jsonl/20813 | {
"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,
62,
3185,
3726,
3752,
4906,
368,
341,
286,
1077,
24902,
284,
27047,
486,
931,
543,
286,
1077,
2193,
284,
504,
29021,
98302,
29021,
486,
13806,
486,
2269,
19252,
43,
13090,
626,
286,
1077,
22505,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_computed_value_update() {
use crate::language_server::Notification;
use json_rpc::Event;
let context_id = Uuid::parse_str("b36dea0b-b75a-40cf-aaad-5fcdf29a0573").unwrap();
let id = Uuid::parse_str("d4b540c0-3ef5-487c-9453-df9d3efd351c").unwrap();
let typename = "Number";
... | rust_cleaned_test_functions.jsonl/32830 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 807
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2965,
19292,
3142,
8882,
368,
341,
262,
990,
17717,
486,
11528,
12015,
486,
11196,
280,
262,
990,
2951,
60799,
486,
1556,
401,
262,
1077,
2266,
842,
284,
547,
2423,
486,
6400,
2895,
445,
65,
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... | 2 |
#[test]
fn test_zero_value() {
// Create a bitmap with a 0 value in it.
let mut bitmap = Bitmap::create();
bitmap.add(0);
// Instantiate a prune list from our existing bitmap.
let pl = PruneList::new(None, bitmap);
assert!(pl.is_empty());
} | rust_cleaned_test_functions.jsonl/23997 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 100
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19359,
3142,
368,
341,
197,
322,
4230,
264,
19746,
448,
264,
220,
15,
897,
304,
432,
624,
10217,
5206,
19746,
284,
17533,
486,
3182,
543,
2233,
19244,
1364,
7,
15,
626,
197,
322,
32288,
264,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_store_reader_with_client_name_length_error() -> Result<(), Error> {
let mut types: HashMap<String, Value> = HashMap::new();
types.insert("integer".to_string(), Value::Intval(42));
let mut store_bytes = write_tmp_store("test", types)?;
// Change structure name len... | rust_cleaned_test_functions.jsonl/48854 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 187
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14809,
22306,
6615,
8179,
1269,
5118,
4096,
368,
1464,
5714,
68843,
4600,
29,
341,
286,
1077,
5206,
4494,
25,
10528,
3464,
11,
5162,
29,
284,
10528,
486,
931,
543,
286,
4494,
7030,
445,
11662,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_touch_set_only_mtime_failed() {
let (_at, mut ucmd) = at_and_ucmd!();
let file = "test_touch_set_only_mtime";
ucmd.args(&["-t", "2015010112342", "-m", file]).fails();
} | rust_cleaned_test_functions.jsonl/41025 | {
"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,
60840,
2602,
18410,
93674,
35060,
368,
341,
262,
1077,
5453,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
1077,
1034,
284,
330,
1944,
60840,
2602,
18410,
93674,
3302,
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_user_is_authorized_non_specified_method() {
init_user_authz_test();
assert!(is_authorized(
"unknown_method",
PrincipalId::from_str("2vxsx-fae").unwrap()
));
} | rust_cleaned_test_functions.jsonl/19942 | {
"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,
3317,
6892,
62,
19084,
21637,
13594,
1870,
9032,
368,
341,
286,
2930,
3317,
14014,
89,
4452,
543,
286,
2060,
10297,
285,
62,
19084,
1006,
310,
330,
16088,
9032,
756,
310,
36309,
764,
486,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_key_agreement() {
let params = JubjubBls12::new();
let mut rng = OsRng;
// Create random viewing key
let vk = ViewingKey::<Bls12> {
ak: edwards::Point::rand(&mut rng, ¶ms).mul_by_cofactor(¶ms),
nk: edwards::Point::rand(&mut rng, ¶ms).mul_by_cofactor(&... | rust_cleaned_test_functions.jsonl/106777 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 867
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3097,
20587,
17150,
368,
341,
262,
1077,
3628,
284,
79280,
73,
392,
33,
4730,
16,
17,
486,
931,
543,
262,
1077,
5206,
28422,
284,
15433,
49,
968,
401,
262,
442,
4230,
4194,
20102,
1376,
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... | 2 |
#[test]
fn test_hello_name() {
let client = Client::tracked(rocket()).unwrap();
let response = client.get("/Rust%202018").dispatch();
assert_eq!(response.into_string().unwrap(), "Hello, Rust 2018! This is /Rust%202018.");
} | rust_cleaned_test_functions.jsonl/92418 | {
"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,
96724,
1269,
368,
341,
286,
1077,
2943,
284,
8423,
486,
58381,
7,
46790,
6011,
15454,
543,
286,
1077,
2033,
284,
2943,
670,
4283,
49,
590,
4,
17,
15,
17,
15,
16,
23,
1827,
18274,
543,
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_parse_valid_elasticbeanstalk_terminate_environment() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"elasticbeanstalk-terminate-environment.xml",
);
let mock = MockRequestDispatcher::with_status(200).with... | rust_cleaned_test_functions.jsonl/15246 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 262
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
8337,
21602,
5064,
17479,
89749,
62,
48061,
51774,
368,
341,
286,
1077,
7860,
9655,
284,
14563,
2582,
5062,
486,
878,
9655,
1006,
310,
330,
1944,
35569,
79372,
14,
1891,
756,
310,
330,
6196... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_convert() {
let point = Point3::from(P3::new(1.23, -4.56, 7.89));
assert_approx_eq!(point.x(), 1.23);
assert_approx_eq!(point.y(), -4.56);
assert_approx_eq!(point.z(), 7.89);
} | rust_cleaned_test_functions.jsonl/131700 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 130
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
368,
341,
286,
1077,
1459,
284,
5126,
18,
486,
1499,
5304,
18,
486,
931,
7,
16,
13,
17,
18,
11,
481,
19,
13,
20,
21,
11,
220,
22,
13,
23,
24,
3237,
286,
2060,
90425,
10714,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_folded_polynomial() {
use ark_bls12_381::Fr as F;
use ark_ff::One;
let two = F::one() + F::one();
let coefficients = vec![F::one(), two, F::one(), F::one()];
let challenges = vec![F::one(), two];
let coefficients_stream = coefficients.as_slice();
let foldstream = Fo... | rust_cleaned_test_functions.jsonl/88235 | {
"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,
61187,
291,
47323,
25358,
368,
341,
262,
990,
55217,
880,
4730,
16,
17,
62,
18,
23,
16,
486,
22560,
438,
434,
280,
262,
990,
55217,
58708,
486,
3966,
401,
262,
1077,
1378,
284,
434,
486,
603,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_resume_seal() {
type Tree = DiskTree<PoseidonHasher, U8, U8, U2>;
let rng = &mut XorShiftRng::from_seed(crate::TEST_SEED);
let replica_id = <PoseidonHasher as Hasher>::Domain::random(rng);
let nodes = 64 * get_base_tree_count::<Tree>();
let dat... | rust_cleaned_test_functions.jsonl/38369 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2204
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58132,
3453,
278,
368,
341,
23459,
286,
943,
8942,
284,
38868,
6533,
21604,
960,
90456,
6370,
261,
11,
547,
23,
11,
547,
23,
11,
547,
17,
19421,
286,
1077,
28422,
284,
609,
6984,
1599,
269,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_height() {
let dir = TempDir::new(super::gen_tempdir_name().as_str()).unwrap();
let path = dir.path();
let db = create_database(path);
super::height(db);
} | rust_cleaned_test_functions.jsonl/115557 | {
"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,
9561,
368,
341,
286,
1077,
5419,
284,
19944,
6184,
486,
931,
56040,
486,
4370,
11771,
3741,
1269,
1005,
300,
2895,
6011,
15454,
543,
286,
1077,
1815,
284,
5419,
3875,
543,
286,
1077,
2927,
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 |
#[test]
fn test_invoke_context_compute_budget() {
let accounts = vec![
(solana_sdk::pubkey::new_rand(), AccountSharedData::default()),
(crate::neon_evm_program::id(), AccountSharedData::default()),
];
let mut feature_set = FeatureSet::all_enabled();
featu... | rust_cleaned_test_functions.jsonl/26348 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 698
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79779,
8467,
57028,
68867,
368,
341,
286,
1077,
9618,
284,
7486,
90515,
310,
320,
38198,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
1507,
8615,
16997,
1043,
486,
2258,
14702,
310,
320,
61711,
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_nullable_array_is_null() {
let a = Int32Array::from(vec![Some(1), None, Some(3), None]);
let res = is_null(&a);
let expected = BooleanArray::from_slice(vec![false, true, false, true]);
assert_eq!(expected, res);
} | rust_cleaned_test_functions.jsonl/36457 | {
"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,
69743,
3858,
6892,
15162,
368,
341,
286,
1077,
264,
284,
1333,
18,
17,
1857,
486,
1499,
25592,
20703,
8373,
7,
16,
701,
2240,
11,
4329,
7,
18,
701,
2240,
10149,
286,
1077,
592,
284,
374,
15162... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_diff_ways_to_compute() {
assert_eq!(
Solution::diff_ways_to_compute("2-1-1".to_owned()),
vec![0, 2]
);
assert_eq!(
Solution::diff_ways_to_compute("2*3-4*5".to_owned()),
vec![-34, -14, -10, -10, 10]
);
} | rust_cleaned_test_functions.jsonl/100570 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 191
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15850,
1670,
942,
2346,
57028,
368,
341,
286,
2060,
10714,
33673,
310,
12478,
486,
13490,
1670,
942,
2346,
57028,
445,
17,
12,
16,
12,
16,
3263,
983,
51973,
14702,
310,
7486,
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,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_https_default_port() {
let parsed = Url::parse("https://example.com:443").unwrap().to_string();
assert_eq!(parsed, "https://example.com/");
} | rust_cleaned_test_functions.jsonl/80272 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 82
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26817,
9993,
8716,
368,
341,
286,
1077,
15676,
284,
22840,
486,
6400,
445,
2428,
1110,
8687,
905,
25,
19,
19,
18,
1827,
15454,
1005,
983,
3904,
543,
286,
2060,
10714,
10297,
41030,
11,
330,
2428... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bytes() {
let src1 = [0x01, 0x02, 0x03, 0x04, 0x05];
let src2 = [0x01, 0x02, 0x03, 0x04, 0x05, 0x06];
let src3 = [0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07];
assert!(MacAddr::from_bytes(&src1[..]).is_err());
let x = MacAddr::from_bytes(&src2[..]).unw... | rust_cleaned_test_functions.jsonl/18568 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 254
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
12524,
368,
341,
286,
1077,
2286,
16,
284,
508,
15,
87,
15,
16,
11,
220,
15,
87,
15,
17,
11,
220,
15,
87,
15,
18,
11,
220,
15,
87,
15,
19,
11,
220,
15,
87,
15,
20,
935,
286,
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_drop_udf() -> Result<()> {
expect_parse_ok(
"DROP FUNCTION test_udf",
DfStatement::DropUDF(DfDropUDF {
if_exists: false,
udf_name: "test_udf".to_string(),
}),
)?;
expect_parse_ok(
"DROP FUNCTION IF EXISTS test_udf",
DfS... | rust_cleaned_test_functions.jsonl/3970 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 266
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29584,
71939,
69,
368,
1464,
5714,
71698,
341,
262,
1720,
21039,
19817,
1006,
286,
330,
46627,
24819,
1273,
71939,
69,
756,
286,
422,
69,
8636,
486,
19871,
4656,
37,
5432,
69,
19871,
4656,
37,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_assembler_push_pop() {
test_case(&["SET PUSH, A"], &[0x0301]);
test_case(&["SET A, POP"], &[0x6001]);
} | rust_cleaned_test_functions.jsonl/44766 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 67
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11898,
35401,
14218,
17061,
368,
341,
262,
1273,
19096,
2099,
1183,
5884,
70509,
11,
362,
7914,
44590,
15,
87,
15,
18,
15,
16,
2558,
262,
1273,
19096,
2099,
1183,
5884,
362,
11,
45728,
7914,
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 |
#[test]
fn test_new_should_have_correct_start() {
let lsys: LSystem = LSystem::new("AB".to_string());
assert_eq!(lsys.start, "AB");
} | rust_cleaned_test_functions.jsonl/101639 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 77
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
43378,
67301,
31550,
4906,
368,
341,
286,
1077,
326,
7791,
25,
444,
2320,
284,
444,
2320,
486,
931,
445,
1867,
3263,
983,
3904,
1423,
286,
2060,
10714,
10297,
4730,
1047,
4962,
11,
330,
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 |
#[test]
fn test_auto_roll_max_size_info_log() {
let path = tempdir_with_prefix("_rust_rocksdb_test_max_size_info_log_opt");
let mut opts = DBOptions::new();
opts.create_if_missing(true);
opts.set_max_log_file_size(10);
let info_dir = tempdir_with_prefix("_rust_rocksdb_max_size_info_log_dir"... | rust_cleaned_test_functions.jsonl/34096 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 265
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27740,
57578,
6345,
2368,
3109,
5224,
368,
341,
262,
1077,
1815,
284,
2730,
3741,
6615,
13974,
16975,
35788,
26608,
14553,
1999,
4452,
6345,
2368,
3109,
5224,
15032,
797,
262,
1077,
5206,
12185,
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_error_display() {
let _ = format!(
"{}{:?}",
NetworkInterfaceError::GuestMacAddressInUse("00:00:00:00:00:00".to_string()),
NetworkInterfaceError::GuestMacAddressInUse("00:00:00:00:00:00".to_string())
);
let _ = format!(
"{}{... | rust_cleaned_test_functions.jsonl/72602 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 848
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4096,
14825,
368,
341,
286,
1077,
716,
284,
3561,
33673,
310,
35503,
44986,
30,
24375,
310,
8141,
5051,
1454,
486,
37804,
19552,
4286,
641,
10253,
445,
15,
15,
25,
15,
15,
25,
15,
15,
25,
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_format_no_params() {
let mut logentry = LogEntry {
message: Annotated::new("hello, %s!".to_string().into()),
..LogEntry::default()
};
normalize_logentry(&mut logentry, &mut Meta::default());
assert_eq_dbg!(logentry.formatted.as_str(), Some("hello, %s!"));
} | rust_cleaned_test_functions.jsonl/84678 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 132
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8955,
6536,
6745,
368,
341,
262,
1077,
5206,
1487,
4085,
284,
2835,
5874,
341,
286,
1943,
25,
1527,
87029,
486,
931,
445,
14990,
11,
1018,
82,
92993,
983,
3904,
1005,
18122,
14702,
286,
5241,
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_install_mode_numeric() {
let scene = TestScenario::new(util_name!());
let at = &scene.fixtures;
let dir = "dir1";
let dir2 = "dir2";
let file = "file";
let mode_arg = "--mode=333";
at.touch(file);
at.mkdir(dir);
scene
.ucmd()
.arg(file)
... | rust_cleaned_test_functions.jsonl/47020 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 471
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34245,
7302,
29418,
368,
341,
262,
1077,
6109,
284,
3393,
54031,
486,
931,
67811,
1269,
0,
1423,
262,
1077,
518,
284,
609,
22483,
67785,
18513,
280,
262,
1077,
5419,
284,
330,
3741,
16,
876,
262... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_write_u64() {
let (mut sock0, mut sock1) = UnixStream::pair().unwrap();
let _ = write_u64_le(&mut sock0, 127);
let result = read_u64_le(&mut sock1);
if let Ok(result) = result {
assert_eq!(result, 127);
}
} | rust_cleaned_test_functions.jsonl/79719 | {
"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,
6443,
9165,
7300,
21,
19,
368,
341,
286,
1077,
320,
6984,
11087,
15,
11,
5206,
11087,
16,
8,
284,
46995,
3027,
486,
12670,
1005,
15454,
1428,
286,
1077,
716,
284,
3270,
7300,
21,
19,
11751,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_escape_2() {
// this is is harder than it looks.
// Fields:
// * hello
// * world
let csv = r#"hello,","," ",world,"!"
hello,","," ",world,"!"
hello,","," ",world,"!"
hello,","," ",world,"!"
"#;
let file = Cursor::new(csv... | rust_cleaned_test_functions.jsonl/57566 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 497
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21832,
62,
17,
368,
341,
286,
442,
419,
374,
374,
15750,
1091,
432,
5868,
624,
286,
442,
24580,
510,
286,
442,
353,
23811,
79133,
286,
442,
353,
1879,
8945,
286,
1077,
13147,
284,
435,
55543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_add() {
for elm in SUM_TRIPLES.iter() {
let (a_vec, b_vec, c_vec) = *elm;
let a = BigInt::from_slice(Plus, a_vec);
let b = BigInt::from_slice(Plus, b_vec);
let c = BigInt::from_slice(Plus, c_vec);
let (na, nb, nc) = (-&a, -&b, -&c);
assert_op!... | rust_cleaned_test_functions.jsonl/56628 | {
"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,
2891,
368,
341,
262,
369,
42205,
304,
30735,
6410,
3298,
14017,
19471,
368,
341,
286,
1077,
320,
64,
13251,
11,
293,
13251,
11,
272,
13251,
8,
284,
353,
23162,
280,
286,
1077,
264,
284,
62608,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_fail_with_assert() {
let _pool = ConstPool::new();
let text = r"
script {
fun main() {
assert(1 == 0, 401);
}
}
";
let res = execute_script(
MoveFile::with_content(script_path(), text),
vec![],
"dfinance",
"0x3",
vec![],
... | rust_cleaned_test_functions.jsonl/43925 | {
"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,
22121,
6615,
16553,
368,
341,
262,
1077,
716,
10285,
284,
24522,
10551,
486,
931,
1428,
262,
1077,
1467,
284,
435,
698,
2282,
341,
262,
2464,
1887,
368,
341,
286,
2060,
7,
16,
621,
220,
15,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cursor_push_front_back() {
let mut ll: LinkedList<u32> = LinkedList::new();
ll.extend(&[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
let mut c = ll.cursor_front_mut();
assert_eq!(c.current(), Some(&mut 1));
assert_eq!(c.index(), Some(0));
c.push_front(0);
assert_eq!(c.current(), ... | rust_cleaned_test_functions.jsonl/92214 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 279
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28601,
14218,
22926,
3895,
368,
341,
262,
1077,
5206,
9323,
25,
22917,
34837,
18,
17,
29,
284,
22917,
486,
931,
543,
262,
9323,
15831,
2099,
58,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_null_buf() {
let buf = unsafe { MallocBuffer::<u32>::new(ptr::null_mut(), 0).unwrap() };
assert!((&*buf).is_empty());
assert!(Some(&*buf) == Some(&[]));
let buf = unsafe { MallocBuffer::<u32>::new(ptr::null_mut(), 7) };
assert!(buf.is_none());
} | rust_cleaned_test_functions.jsonl/122374 | {
"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,
15162,
10363,
368,
341,
286,
1077,
6607,
284,
19860,
314,
386,
4742,
4095,
27638,
84,
18,
17,
6831,
931,
23866,
486,
2921,
29523,
1507,
220,
15,
568,
15454,
368,
2605,
286,
2060,
0,
42902,
9,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_did_exchange_handle_invalid_exchange_request_message_from_invited_state() {
let _setup = SetupIndyMocks::init();
let mut did_exchange_sm = inviter_sm().to_inviter_invited_state();
let mut request = _request();
request.connection.d... | rust_cleaned_test_functions.jsonl/29137 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 433
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
307,
59212,
10630,
31433,
59212,
7893,
6462,
5673,
19996,
1608,
4387,
368,
341,
394,
1077,
716,
15188,
284,
18626,
1425,
88,
72577,
486,
2327,
1428,
394,
1077,
5206,
1521,
59212,
15874,
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_split() {
let stake_pubkey = paychains_sdk::pubkey::new_rand();
let stake_lamports = 42;
let split_stake_pubkey = paychains_sdk::pubkey::new_rand();
let signers = vec![stake_pubkey].into_iter().collect();
// test splitting both an Initialized stake and a... | rust_cleaned_test_functions.jsonl/51791 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2200
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
368,
341,
286,
1077,
18279,
34014,
792,
284,
2291,
58358,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
18279,
907,
309,
3394,
284,
220,
19,
17,
401,
286,
1077,
6718,
1261,
726,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_storage_term() {
let ents = vec![new_entry(3, 3), new_entry(4, 4), new_entry(5, 5)];
let mut tests = vec![
(2, Err(RaftError::Store(StorageError::Compacted))),
(3, Ok(3)),
(4, Ok(4)),
(5, Ok(5)),
];
for (i, (idx, wt... | rust_cleaned_test_functions.jsonl/3766 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 419
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23310,
17464,
368,
341,
286,
1077,
36852,
284,
7486,
20703,
931,
9078,
7,
18,
11,
220,
18,
701,
501,
9078,
7,
19,
11,
220,
19,
701,
501,
9078,
7,
20,
11,
220,
20,
73663,
286,
1077,
5206,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_save_png() {
let k = Kaleido::new();
let dst = PathBuf::from("example.png");
let r = k.save(dst.as_path(), TEST_PLOT, "png", 1200, 900, 4.5);
assert!(r.is_ok());
assert!(std::fs::remove_file(dst.as_path()).is_ok());
} | rust_cleaned_test_functions.jsonl/33866 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 148
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15376,
61746,
368,
341,
286,
1077,
595,
284,
96742,
5249,
486,
931,
543,
286,
1077,
10648,
284,
7933,
15064,
486,
1499,
445,
8687,
3508,
797,
286,
1077,
435,
284,
595,
5681,
30260,
5357,
2638,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_arguments_incremental() {
parses!(
"--emit",
"link",
"foo.rs",
"--out-dir",
"out",
"--crate-name",
"foo",
"--crate-type",
"lib"
);
let r = fails!(
... | rust_cleaned_test_functions.jsonl/8158 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 434
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
43433,
51482,
278,
368,
341,
286,
70835,
33673,
310,
14482,
18712,
756,
310,
330,
2080,
756,
310,
330,
7975,
25638,
756,
310,
14482,
411,
45283,
756,
310,
330,
411,
756,
310,
14482,
61711,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_iterator_filter_fold() {
let xs = [0, 1, 2, 3, 4, 5, 6, 7, 8];
let ys = [0, 2, 4, 6, 8];
let it = xs.iter().filter(|&&x| x % 2 == 0);
let i = it.fold(0, |i, &x| {
assert_eq!(x, ys[i]);
i + 1
});
assert_eq!(i, ys.len());
let it = xs.iter().filter(|&&x|... | rust_cleaned_test_functions.jsonl/54080 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 263
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13491,
8727,
61187,
368,
341,
262,
1077,
11943,
284,
508,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
11,
220,
22,
11,
220,
23,
935,
262,
1077,
3181... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_validator_sync() {
// create a Validator
let result = Validator::create(None);
assert!(result.is_ok());
let validator = Arc::new(Mutex::new(result.unwrap()));
let validator_cloned = Arc::clone(&validator);
let handle = thread::spawn(move || {
... | rust_cleaned_test_functions.jsonl/49854 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 529
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64959,
23008,
368,
341,
286,
442,
1855,
264,
32566,
198,
286,
1077,
1102,
284,
32566,
486,
3182,
26717,
317,
286,
2060,
10297,
1382,
2079,
19817,
1423,
286,
1077,
22935,
284,
19689,
486,
931,
3189... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_command_from_line_move_west() {
assert_eq!(
Command::from_line("W51"),
Command::Move(Direction::West, 51)
)
} | rust_cleaned_test_functions.jsonl/114153 | {
"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,
10811,
5673,
6528,
17134,
1670,
477,
368,
341,
286,
2060,
10714,
33673,
310,
7348,
486,
1499,
6528,
445,
54,
20,
16,
4461,
310,
7348,
486,
9860,
81740,
486,
23306,
11,
220,
20,
16,
340,
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 |
#[test]
fn test_compute() {
let input = "cpy 2 a
tgl a
tgl a
tgl a
cpy 1 a
dec a
dec a";
let regs = compute(input);
assert_eq!(3, regs.get('a'));
} | rust_cleaned_test_functions.jsonl/21647 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 82
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57028,
368,
341,
10217,
1946,
284,
330,
7641,
220,
17,
264,
198,
45078,
264,
198,
45078,
264,
198,
45078,
264,
198,
7641,
220,
16,
264,
198,
8169,
264,
198,
8169,
264,
876,
10217,
44498,
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 |
#[test]
fn test_decimal_math() {
// test_decimal_multiplication
let a = Uint128::from(100u128);
let b = Decimal::from_ratio(Uint128::from(1111111u128), Uint128::from(10000000u128));
let multiplication = decimal_mul_in_256(Decimal::from_ratio(a, Uint128::from(1u128)), b);
assert_eq!(multiplic... | rust_cleaned_test_functions.jsonl/45078 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 772
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74429,
65561,
368,
341,
262,
442,
1273,
74429,
91802,
1693,
198,
262,
1077,
264,
284,
27883,
16,
17,
23,
486,
1499,
7,
16,
15,
15,
84,
16,
17,
23,
317,
262,
1077,
293,
284,
26728,
486,
1499,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_one_user_cannot_claim_other_users_neuron() {
local_test_on_sns_subnet(|runtime| async move {
let user1 = Sender::from_keypair(&TEST_USER1_KEYPAIR);
let user2 = Sender::from_keypair(&TEST_USER2_KEYPAIR);
let account_identifier1 = AccountIdentifier::from(user1.get_princ... | rust_cleaned_test_functions.jsonl/107254 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2696
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11667,
3317,
666,
3401,
84969,
30456,
16348,
13925,
36090,
368,
341,
262,
2205,
4452,
4470,
643,
4412,
95681,
22428,
22255,
91,
3312,
3271,
341,
286,
1077,
1196,
16,
284,
54610,
486,
1499,
3097,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.