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_syn_sent_rst_no_ack() {
let mut s = socket_syn_sent();
send!(s, TcpRepr {
control: TcpControl::Rst,
seq_number: REMOTE_SEQ,
ack_number: None,
..SEND_TEMPL
}, Err(Error::Dropped));
assert_eq!(s.state, State::SynSent);... | rust_cleaned_test_functions.jsonl/1717 | {
"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,
51393,
24115,
1710,
267,
6536,
48447,
368,
341,
286,
1077,
5206,
274,
284,
7575,
51393,
24115,
543,
286,
3624,
10297,
82,
11,
64876,
693,
649,
341,
310,
2524,
25,
64876,
3273,
486,
49,
267,
345,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_folding_consistency() {
use crate::iterable::Iterable;
let rng = &mut ark_std::test_rng();
// Easy folding:
let f = DensePolynomial::<F>::rand(15, rng);
let rev_f = Reverse(&f.coeffs);
let trivial_folded_stream = FoldedPolynomialStream::new(&rev_f, &[]);
let mut... | rust_cleaned_test_functions.jsonl/118308 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 956
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
14995,
31971,
47094,
368,
341,
262,
990,
17717,
486,
2015,
480,
486,
50635,
280,
262,
1077,
28422,
284,
609,
6984,
55217,
15656,
486,
1944,
66849,
1428,
262,
442,
18609,
44742,
510,
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_composition() {
let (mut a, my_env) = test_env();
// Function composition
let syntax = new_lambda("f", new_lambda("g", new_lambda("arg", new_apply(new_identifier("g"), new_apply(new_identifier("f"), new_identifier("arg"))))));
let t = analyse(&mut a, &syntax, &my_env, &has... | rust_cleaned_test_functions.jsonl/127657 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 214
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2965,
3487,
368,
341,
262,
1077,
320,
6984,
264,
11,
847,
15879,
8,
284,
1273,
15879,
1428,
262,
442,
5712,
18037,
7213,
262,
1077,
19482,
284,
501,
51884,
445,
69,
497,
501,
51884,
445,
70,
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_pessimistic_prewrite_committed_transaction() {
let engine = TestEngineBuilder::new().build().unwrap();
let cm = ConcurrencyManager::new(1.into());
let mut statistics = Statistics::default();
let key = b"k";
must_acquire_pessimistic_lock(&engine,... | rust_cleaned_test_functions.jsonl/31431 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1931
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
66733,
4532,
620,
52473,
2965,
5483,
28884,
368,
341,
286,
1077,
4712,
284,
3393,
4571,
3297,
486,
931,
1005,
5834,
1005,
15454,
543,
286,
1077,
9961,
284,
1200,
15973,
2043,
486,
931,
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... | 3 |
#[test]
fn test_object() {
let mut h = HashMap::new();
h.insert("a", 1);
assert_eq!(object(Some(to_value(h).unwrap()), vec![]).unwrap(), true);
assert_eq!(object(Some(to_value(1).unwrap()), vec![]).unwrap(), false);
assert_eq!(object(Some(to_value("hello").unwrap()), vec!... | rust_cleaned_test_functions.jsonl/132427 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 163
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5314,
368,
341,
286,
1077,
5206,
305,
284,
10528,
486,
931,
543,
286,
305,
7030,
445,
64,
497,
220,
16,
317,
286,
2060,
10714,
10297,
1700,
65405,
12186,
3142,
3203,
568,
15454,
11858,
7486,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_set_compaction_pri() {
let path = tempdir_with_prefix("_rust_rocksdb_compaction_pri");
let mut opts = DBOptions::new();
let mut cf_opts = ColumnFamilyOptions::new();
opts.create_if_missing(true);
cf_opts.compaction_priority(CompactionPriority::MinOverlappingRatio);
DB::op... | rust_cleaned_test_functions.jsonl/34117 | {
"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,
2602,
18177,
1311,
85639,
368,
341,
262,
1077,
1815,
284,
2730,
3741,
6615,
13974,
16975,
35788,
26608,
14553,
1999,
18177,
1311,
85639,
797,
262,
1077,
5206,
12185,
284,
5952,
3798,
486,
931,
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_scalar_value_simple() {
assert_eq!(
<UserId as GraphQLType<DefaultScalarValue>>::name(&()),
Some("UserId")
);
let mut registry: Registry = Registry::new(FnvHashMap::default());
let meta = UserId::meta(&(), &mut registry);
assert_eq!(meta.name(), Some("UserId"... | rust_cleaned_test_functions.jsonl/27374 | {
"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,
41652,
3142,
30015,
368,
341,
262,
2060,
10714,
33673,
286,
366,
13504,
438,
35087,
929,
27,
3675,
20639,
1130,
77595,
606,
2099,
14702,
286,
4329,
445,
13504,
1138,
262,
3475,
262,
1077,
5206,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bundle_async() {
let p = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"))
.parent()
.unwrap()
.join("tests/002_hello.ts");
use deno_core::ModuleSpecifier;
let module_name = ModuleSpecifier::resolve_url_or_path(p.to_str().unwrap())
.unwrap()
.to_strin... | rust_cleaned_test_functions.jsonl/15442 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 391
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60986,
28346,
368,
341,
262,
1077,
281,
284,
1460,
486,
2343,
486,
1820,
15064,
486,
1499,
16978,
17223,
34,
7581,
46,
25143,
91120,
8291,
5455,
414,
659,
3765,
741,
414,
659,
15454,
741,
414,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bridge_conflict_ty() {
let hdr = indoc! {"
namespace a {
struct Key { int a; };
}
namespace b {
struct Key { int a; };
}
"};
let rs = quote! {};
run_test("", hdr, rs, &["a::Key", "b::Key"], &[]);
} | rust_cleaned_test_functions.jsonl/9898 | {
"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,
54944,
16059,
21242,
53171,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
286,
4473,
264,
341,
310,
2036,
5309,
314,
526,
264,
26,
2605,
286,
456,
286,
4473,
293,
341,
310,
2036,
53... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vsock_parsing() -> Result<()> {
// socket and cid is required
assert!(VsockConfig::parse("").is_err());
assert_eq!(
VsockConfig::parse("socket=/tmp/sock,cid=1")?,
VsockConfig {
cid: 1,
socket: PathBuf::from("/tmp/soc... | rust_cleaned_test_functions.jsonl/74049 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 436
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
13199,
620,
28598,
368,
1464,
5714,
71698,
341,
286,
442,
7575,
323,
32141,
374,
2567,
198,
286,
2060,
10297,
53,
13199,
2648,
486,
6400,
80821,
285,
9266,
1423,
286,
2060,
10714,
33673,
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_cache_path() {
let (temp_dir, deno_dir) = test_setup();
let filename = "hello.js";
let source_code = b"1+2";
let hash = source_code_hash(filename, source_code, version::DENO);
assert_eq!(
(
temp_dir.path().join(format!("gen/{}.js", hash)),
temp_dir.path(... | rust_cleaned_test_functions.jsonl/83863 | {
"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,
11529,
2638,
368,
341,
262,
1077,
320,
3888,
4334,
11,
3371,
78,
4334,
8,
284,
1273,
21363,
543,
262,
1077,
3899,
284,
330,
14990,
2857,
876,
262,
1077,
2530,
4136,
284,
293,
1,
16,
10,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_getpeereid() {
use std::os::unix::net::UnixStream;
let (sock_a, sock_b) = UnixStream::pair().unwrap();
let (uid_a, gid_a) = getpeereid(sock_a.as_raw_fd()).unwrap();
let (uid_b, gid_b) = getpeereid(sock_b.as_raw_fd()).unwrap();
let uid = geteuid();
let gid = getegid();
... | rust_cleaned_test_functions.jsonl/104840 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 229
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
375,
485,
307,
368,
341,
262,
990,
1460,
486,
436,
486,
56646,
486,
4711,
486,
55832,
3027,
280,
262,
1077,
320,
13199,
4306,
11,
11087,
880,
8,
284,
46995,
3027,
486,
12670,
1005,
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... | 1 |
#[test]
fn test_serialize_info_string() {
let attributes: Vec<UciInfoAttribute> = vec![
UciInfoAttribute::String(String::from("Invalid move: d6e1 - violates chess rules"))
];
let m = UciMessage::Info(attributes);
assert_eq!(m.serialize(), "info string Invalid move: ... | rust_cleaned_test_functions.jsonl/19067 | {
"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,
88686,
3109,
3904,
368,
341,
286,
1077,
8201,
25,
11312,
36397,
5855,
1731,
3907,
29,
284,
7486,
90515,
310,
547,
5855,
1731,
3907,
486,
703,
2242,
486,
1499,
445,
7928,
3271,
25,
294,
21,
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_stop_access_point_with_iface_fails() {
let mut exec = fasync::TestExecutor::new().expect("failed to create an executor");
let test_values = test_setup();
let serve_fut = test_values.ap.serve_provider_requests(test_values.requests);
pin_mut!(serve_fut);
... | rust_cleaned_test_functions.jsonl/59829 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 870
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19039,
12759,
6085,
6615,
67666,
761,
6209,
368,
341,
286,
1077,
5206,
3883,
284,
282,
7692,
486,
2271,
25255,
486,
931,
1005,
17119,
445,
16091,
311,
1855,
458,
31558,
797,
286,
1077,
1273,
9146,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_name_variable() {
let doc = r#"query FetchSomeIDQuery($someId: String!) { human(id: $someId) { name } }"#;
let database = Database::new();
let schema = RootNode::new(&database, EmptyMutation::<Database>::new());
let vars = vec![("someId".to_owned(), InputValue::string("100... | rust_cleaned_test_functions.jsonl/35469 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 485
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
1269,
14635,
368,
341,
262,
1077,
4629,
284,
435,
55543,
1631,
22104,
8373,
915,
2859,
699,
14689,
764,
25,
923,
16315,
314,
3738,
3724,
25,
400,
14689,
764,
8,
314,
829,
335,
335,
57676,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_move_direction_steps() {
// back to original position
assert_eq!(
Point::default()
.move_direction_steps(&Direction::North, 2)
.move_direction_steps(&Direction::South, 2)
.move_direction_steps(&Direction::East, 2)
... | rust_cleaned_test_functions.jsonl/120794 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 213
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17134,
25438,
22731,
368,
341,
286,
442,
1182,
311,
4024,
2309,
198,
286,
2060,
10714,
33673,
310,
5126,
486,
2258,
741,
394,
659,
3397,
25438,
22731,
2099,
9268,
486,
25221,
11,
220,
17,
340,
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_puzzle_with_seven_letters() {
assert_alphametic_solution_eq(
"HE + SEES + THE == LIGHT",
&[
('E', 4),
('G', 2),
('H', 5),
('I', 0),
('L', 1),
('S', 9),
('T', 7),
],
);
} | rust_cleaned_test_functions.jsonl/60614 | {
"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,
620,
14945,
6615,
3453,
1037,
67330,
368,
341,
262,
2060,
8418,
759,
309,
5298,
50274,
10714,
1006,
286,
330,
1799,
488,
5052,
1570,
488,
3168,
621,
52203,
756,
286,
609,
9640,
310,
4319,
36,
51... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fullscreen_optional() {
let client = setup_cantata();
let result = client.root.fullscreen();
let is_fullscreen = result.unwrap();
assert_eq!(None, is_fullscreen);
let method_call_res = client.root.set_fullscreen(false);
match method_call_res {
Err(errors::Error(e... | rust_cleaned_test_functions.jsonl/86481 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 197
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16372,
8174,
74644,
368,
341,
262,
1077,
2943,
284,
6505,
666,
517,
459,
543,
262,
1077,
1102,
284,
2943,
12576,
21534,
8174,
543,
262,
1077,
374,
16372,
8174,
284,
1102,
55395,
543,
262,
2060,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_binary_search() {
// use crate::monoid::Monoid;
let mut seg = Seg::new(10, || 0);
assert_eq!(seg.reduce(0, 10), 0);
seg.set(5, 10);
let is_ok = &|sum: &usize| *sum < 10;
assert_eq!(seg.max_right(is_ok, 0), 5);
... | rust_cleaned_test_functions.jsonl/38814 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 395
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31761,
10716,
368,
972,
310,
442,
990,
17717,
486,
1645,
588,
486,
11095,
588,
463,
310,
1077,
5206,
4810,
284,
17209,
486,
931,
7,
16,
15,
11,
1369,
220,
15,
736,
310,
2060,
10714,
10297,
146... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_dep_graph_delta_serialize_empty() {
let x = DepGraphDelta::new();
let mut bytes = Vec::new();
x.write_to(&mut bytes).unwrap();
let mut y = DepGraphDelta::new();
let mut bytes_read: &[u8] = &bytes;
let num_loaded = y.read_from(&mut bytes_read, |_, ... | rust_cleaned_test_functions.jsonl/3502 | {
"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,
49258,
14738,
26710,
88686,
15124,
368,
341,
286,
1077,
856,
284,
4148,
11212,
20277,
486,
931,
543,
286,
1077,
5206,
5820,
284,
11312,
486,
931,
543,
286,
856,
3836,
2346,
2099,
6984,
5820,
568,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_scan_keys() {
test_scan_keys_imp(vec![b"a", b"c", b"e", b"b", b"d", b"f"], vec![b"a", b"b"]);
let v1 = gen_value(b'x', SHORT_VALUE_MAX_LEN + 1);
let v4 = gen_value(b'v', SHORT_VALUE_MAX_LEN + 1);
test_scan_keys_imp(vec![b"a", b"c", b"e", b"b", b"d", b"f"], vec![&... | rust_cleaned_test_functions.jsonl/23335 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 197
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28857,
12631,
368,
341,
286,
1273,
28857,
12631,
36788,
25592,
20703,
65,
56693,
497,
293,
96946,
497,
293,
1,
68,
497,
293,
1,
65,
497,
293,
44917,
497,
293,
96171,
7914,
7486,
20703,
65,
56693... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_empty_diff() {
use crate::git::{Parser, Section};
// Setup
let diff = r#""#;
let expected_sections: Vec<Section> = vec![];
let parser = Parser::new(false);
// Run
let actual_sections = parser.sections(diff);
// Assert
assert... | rust_cleaned_test_functions.jsonl/81566 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 169
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
15850,
368,
341,
286,
990,
17717,
486,
12882,
22964,
6570,
11,
11113,
2440,
286,
442,
18626,
198,
286,
1077,
3638,
284,
435,
2,
3014,
2,
280,
286,
1077,
3601,
59485,
25,
11312,
27,
9620,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_is_trunk_of_4() {
let mut tree = HashMap::new();
let b1 = Fork { id: 1, base: 0 };
let b2 = Fork { id: 2, base: 1 };
tree.insert(b1.id, b1.clone());
assert!(b1.is_trunk_of(&b2, &tree));
assert!(!b2.is_trunk_of(&b1, &tree));
} | rust_cleaned_test_functions.jsonl/80074 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 140
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
3547,
3122,
3575,
62,
19,
368,
341,
262,
1077,
5206,
4916,
284,
10528,
486,
931,
543,
262,
1077,
293,
16,
284,
47850,
314,
877,
25,
220,
16,
11,
2331,
25,
220,
15,
2605,
262,
1077,
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... | 1 |
#[test]
fn test_from_arg_matches_classic_mode() {
let argv = vec!["lsd", "--color", "always", "--classic"];
let matches = app::build().get_matches_from_safe(argv).unwrap();
assert_eq!(
Some(ColorOption::Never),
ColorOption::from_arg_matches(&matches)
);
... | rust_cleaned_test_functions.jsonl/86429 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 157
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
6057,
38344,
4790,
292,
7302,
368,
341,
286,
1077,
10213,
284,
7486,
0,
1183,
4730,
67,
497,
14482,
3423,
497,
330,
32122,
497,
14482,
79709,
6332,
286,
1077,
9071,
284,
906,
486,
5834,
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_from_none() {
let tsm = TransactionSenderMessage::None;
let ptsm = proto::TransactionSenderMessage::from(tsm);
assert_eq!(ptsm.message, proto::TransactionSenderMessage::none().message);
} | rust_cleaned_test_functions.jsonl/30957 | {
"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,
5673,
31488,
368,
341,
286,
1077,
259,
3563,
284,
17869,
20381,
2052,
486,
4064,
280,
286,
1077,
29993,
76,
284,
18433,
486,
8070,
20381,
2052,
486,
1499,
1155,
3563,
317,
286,
2060,
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 |
#[test]
fn test_dot_1() {
let s = "2*3+4*5".to_string();
let mut tokenizer = s.tokenize().peekable();
let node = expr(&mut tokenizer);
let mut dot = Dot::new();
let s = dot.write(&node);
assert_eq!(
s,
vec![
"digraph ast_tree {... | rust_cleaned_test_functions.jsonl/113857 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 485
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30941,
62,
16,
368,
341,
286,
1077,
274,
284,
330,
17,
9,
18,
10,
19,
9,
20,
3263,
983,
3904,
543,
286,
1077,
5206,
45958,
284,
274,
96790,
1005,
29107,
480,
1428,
286,
1077,
2436,
284,
1516... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tok_ints() {
let mut vm = build_def_vm();
let mut reader_state = ReaderState::new();
let input = "2300 23_000 #xFF #xff #x0f #xF #b0000_0000 #b1111_1111 #b11111111 #b11111111_11111111 #o07 #o17";
let tokens = tokenize(&mut vm, &mut reader_state, input, None);
... | rust_cleaned_test_functions.jsonl/101098 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 611
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
76162,
4042,
82,
368,
341,
286,
1077,
5206,
10995,
284,
1936,
7844,
39008,
543,
286,
1077,
5206,
6604,
4387,
284,
25166,
1397,
486,
931,
543,
286,
1077,
1946,
284,
330,
17,
18,
15,
15,
220,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_established_queue_during_retransmission() {
let mut s = socket_established();
s.remote_mss = 6;
s.send_slice(b"abcdef123456ABCDEF").unwrap();
recv!(s, time 1000, Ok(TcpRepr {
seq_number: LOCAL_SEQ + 1,
ack_number: Some(REMOTE_SEQ + 1),
... | rust_cleaned_test_functions.jsonl/1767 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 883
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18583,
5102,
291,
10841,
814,
1677,
1288,
1458,
2728,
368,
341,
286,
1077,
5206,
274,
284,
7575,
18583,
5102,
291,
543,
286,
274,
34093,
717,
778,
284,
220,
21,
280,
286,
274,
5219,
26488,
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 |
#[test]
fn test_str() {
let s = "\0 a 'b \" c";
let tokens = quote!(#s);
let expected = r#""\u{0} a 'b \" c""#;
assert_eq!(expected, tokens.to_string());
} | rust_cleaned_test_functions.jsonl/3599 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 87
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2895,
368,
341,
262,
1077,
274,
284,
2917,
15,
264,
364,
65,
7245,
272,
876,
262,
1077,
11211,
284,
12641,
10297,
2,
82,
317,
262,
1077,
3601,
284,
435,
2,
3014,
59,
84,
90,
15,
92,
264,
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_transfer_bond() {
TestNet::reset();
let xcm_transfer_amount = ksm(10f64);
ParaA::execute_with(|| {
assert_ok!(LiquidStaking::stake(Origin::signed(ALICE), ksm(2000f64),));
assert_ok!(LiquidStaking::bond(
Origin::signed(ALICE),
xcm_transfer_amoun... | rust_cleaned_test_functions.jsonl/53666 | {
"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,
35403,
880,
2111,
368,
341,
262,
3393,
6954,
486,
9716,
543,
262,
1077,
856,
6226,
35403,
13471,
284,
595,
3563,
7,
16,
15,
69,
21,
19,
317,
262,
22989,
32,
486,
10257,
6615,
79453,
341,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_vsib_props() {
for info in decoder_tests(false, false) {
let bytes = to_vec_u8(info.hex_bytes()).unwrap();
let mut decoder = Decoder::new(info.bitness(), &bytes, info.decoder_options());
let instruction = decoder.decode();
assert_eq!(instruction.code(), info.code());
let (is_vsib, is... | rust_cleaned_test_functions.jsonl/82767 | {
"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,
42434,
579,
44835,
368,
341,
2023,
3546,
304,
24551,
32509,
3576,
11,
895,
8,
341,
197,
10217,
5820,
284,
311,
13251,
7300,
23,
14208,
45639,
12524,
6011,
15454,
543,
197,
10217,
5206,
24551,
284,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_varchar_params() {
test_type(
"VARCHAR",
&[
(Some("hello world".to_owned()), "'hello world'"),
(
Some("イロハニホヘト チリヌルヲ".to_owned()),
"'イロハニホヘト チリヌルヲ'",
),
(None, "NULL"),
],
);
} | rust_cleaned_test_functions.jsonl/120850 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 215
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4612,
1762,
6745,
368,
341,
262,
1273,
1819,
1006,
286,
330,
79651,
756,
286,
609,
9640,
310,
320,
8373,
445,
14990,
1879,
3263,
983,
51973,
11858,
7178,
14990,
1879,
6,
4461,
310,
2399,
394,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_fg_color() {
let colored = Colored::ForegroundColor(Color::Red);
assert_eq!(Into::<u16>::into(colored), FG_INTENSITY | FG_RED);
} | rust_cleaned_test_functions.jsonl/61030 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 83
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
69473,
6714,
368,
341,
286,
1077,
27197,
284,
4254,
3018,
486,
84997,
15028,
486,
6033,
317,
286,
2060,
10714,
10297,
26591,
27638,
84,
16,
21,
6831,
18122,
19611,
3018,
701,
48297,
9161,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_parse_simple_2() {
let _: DID = dbg!(DID::parse("did:method:identifier").unwrap());
let _: DID = dbg!(DID::parse("did:method:identifier/path/to/this").unwrap());
let _: DID = dbg!(DID::parse("did:method:identifier/path/to/this?thing=that").unwrap());
let _: DID = dbg!(DID::parse("did:met... | rust_cleaned_test_functions.jsonl/93400 | {
"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,
21039,
30015,
62,
17,
368,
341,
220,
1077,
58536,
59119,
284,
47904,
10297,
35,
915,
486,
6400,
445,
22920,
25,
4393,
25,
15909,
1827,
15454,
1423,
220,
1077,
58536,
59119,
284,
47904,
10297,
35,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_construction_order() {
let mut v1 = Options::default();
let mut v2 = Options::default();
v1.lint_opts = vec![
(String::from("a"), Level::Allow),
(String::from("b"), Level::Warn),
(String::from("c"), Level::Deny),
(String:... | rust_cleaned_test_functions.jsonl/100718 | {
"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,
907,
21042,
66105,
8950,
82741,
3382,
3024,
7869,
368,
341,
262,
1077,
5206,
348,
16,
284,
14566,
486,
2258,
543,
262,
1077,
5206,
348,
17,
284,
14566,
486,
2258,
1428,
262,
348,
16,
918,
396,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rule_index() {
let polar = Polar::new();
polar
.load_str(
r#"
f(1, 1, "x");
f(1, 1, "y");
f(1, x, "y") if x = 2;
f(1, 2, {b: "y"});
f(1, 3, {c: "z"});
"#,
)
.un... | rust_cleaned_test_functions.jsonl/7856 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 963
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21124,
3560,
368,
341,
286,
1077,
24660,
284,
55896,
486,
931,
543,
286,
24660,
198,
310,
659,
1078,
2895,
1006,
394,
435,
2,
698,
310,
282,
7,
16,
11,
220,
16,
11,
330,
87,
797,
310,
282,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pass_confirm_settle() {
ExtBuilder::build().execute_with(|| {
System::set_block_number(1);
let alice_pair = account_pair("Alice");
let bob_pair = account_pair("Bob");
let (channel_peers, peers_pair) = get_sorted_peer(alice_pair.clone(), ... | rust_cleaned_test_functions.jsonl/81770 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2330
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15464,
23800,
2602,
11239,
368,
341,
286,
9447,
3297,
486,
5834,
1005,
10257,
6615,
79453,
314,
5872,
310,
739,
486,
746,
7113,
5500,
7,
16,
317,
310,
1077,
70433,
14445,
284,
2692,
14445,
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... | 6 |
#[test]
fn test_carriage_return_is_not_word_boundary() {
new_ucmd!()
.args(&["-w6", "-s"])
.pipe_in("fizz\rbuzz\rfizzbuzz")
.succeeds()
.stdout_is("fizz\rbuzz\rfizzbu\nzz");
} | rust_cleaned_test_functions.jsonl/23297 | {
"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,
26616,
8775,
12511,
6892,
7913,
13533,
54004,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
12,
86,
21,
497,
6523,
82,
14108,
286,
659,
13768,
1243,
445,
69,
8759,
59,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_search_interval() {
fn search(x: i64, xs: &[i64]) -> (usize, usize) {
let xs: Vec<_> = xs.iter().cloned().map(Time::from_micros).collect();
search_interval(Time::from_micros(x), &xs)
}
assert_eq!((0, 0), search(1, &[1, 2, 3]));
assert_eq!((... | rust_cleaned_test_functions.jsonl/77387 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 353
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10716,
20541,
368,
341,
286,
5168,
2711,
2075,
25,
600,
21,
19,
11,
11943,
25,
44590,
72,
21,
19,
2467,
1464,
320,
51878,
11,
22301,
8,
341,
310,
1077,
11943,
25,
11312,
32399,
29,
284,
11943,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_return_result_with_vec() {
let gen_code = parse_code(
"test_return_result_with_vec",
r#"
foreigner_class!(class PosErr {
self_type PosErr;
constructor PosErr::new() -> PosErr;
});
foreigner_class!(class LocationService {
self_type LocationService;
constructo... | rust_cleaned_test_functions.jsonl/71624 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 333
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12511,
5287,
6615,
13251,
368,
341,
262,
1077,
4081,
4136,
284,
4715,
4136,
1006,
286,
330,
1944,
12511,
5287,
6615,
13251,
756,
286,
435,
2,
698,
28443,
261,
4790,
10297,
1040,
18876,
7747,
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_eval_flag_unsatisfied_prereq() {
let store = TestStore::new();
let flag = store.flag("flagWithMissingPrereq").unwrap().clone();
assert!(flag.on);
let alice = User::with_key("alice").build();
let bob = User::with_key("bob").build();
for user in ve... | rust_cleaned_test_functions.jsonl/133344 | {
"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,
21296,
10933,
4907,
82,
46265,
5294,
485,
80,
368,
341,
286,
1077,
3553,
284,
3393,
6093,
486,
931,
543,
286,
1077,
5181,
284,
3553,
41230,
445,
9903,
2354,
25080,
3533,
485,
80,
1827,
15454,
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... | 2 |
#[test]
fn test_stxh() {
disasm!("entrypoint:\n stxh [r1+0x2], r3\n");
disasm!("entrypoint:\n stxh [r1-0x2], r3\n");
} | rust_cleaned_test_functions.jsonl/68761 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 83
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1261,
87,
71,
368,
341,
262,
827,
10530,
17223,
4085,
2768,
7190,
77,
262,
357,
87,
71,
508,
81,
16,
10,
15,
87,
17,
1125,
435,
18,
1699,
797,
262,
827,
10530,
17223,
4085,
2768,
7190,
77,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_get_rsna_password_for_unprotected_network() {
let bss = fake_unprotected_bss_description(b"foo_bss".to_vec());
let credential = fidl_sme::Credential::Password("somepass".as_bytes().to_vec());
let rsna = get_rsna(&fake_device_info(CLIENT_ADDR), &credential, &bss);
... | rust_cleaned_test_functions.jsonl/113759 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 169
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
47115,
3376,
10122,
5478,
4907,
5764,
20966,
368,
341,
286,
1077,
293,
778,
284,
12418,
4907,
5764,
880,
778,
11448,
1883,
1,
7975,
880,
778,
3263,
983,
13251,
1423,
286,
1077,
40207,
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_building_rewrite_manager_populates_inspect() {
let inspector = fuchsia_inspect::Inspector::new();
let node = inspector.root().create_child("rewrite_manager");
let dynamic_rules = vec![
rule!("this.example.com" => "that.example.com", "/this_rolldice" => "/that_... | rust_cleaned_test_functions.jsonl/46504 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1064
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82397,
74052,
12144,
17061,
23156,
34386,
987,
368,
341,
286,
1077,
44725,
284,
282,
73391,
34386,
987,
486,
46230,
486,
931,
543,
286,
1077,
2436,
284,
44725,
12576,
1005,
3182,
17268,
445,
52473,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_patterns() {
equal_tokens! {
<pipeline>
"cp ../formats/*" -> b::pipeline(vec![vec![b::bare("cp"), b::ws(" "), b::op("."), b::op("."), b::pattern("/formats/*")]])
}
equal_tokens! {
<pipeline>
"cp * /dev/null" -> b::pipeline(... | rust_cleaned_test_functions.jsonl/7263 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 241
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64923,
368,
341,
286,
6144,
28838,
0,
341,
310,
366,
51258,
397,
310,
330,
4672,
22082,
63482,
1057,
1,
1464,
293,
486,
51258,
25592,
20703,
4083,
20703,
65,
486,
54102,
445,
4672,
3975,
293,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_log_sum_exp() {
let a = Tensor::from_slice(
[10, 5],
&[
-0.5428, -0.0058, 0.7255, -0.5670, 0.2610, 1.2867, -1.3333, 0.4835, 1.6653, 1.6967,
0.8039, -0.6021, -0.6879, 1.1528, -2.4406, -1.7149, 0.1154, -0.6681, -0.8789,
... | rust_cleaned_test_functions.jsonl/83679 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 629
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5224,
10160,
14214,
368,
341,
286,
1077,
264,
284,
26036,
486,
1499,
26488,
1006,
310,
508,
16,
15,
11,
220,
20,
1259,
310,
609,
9640,
394,
481,
15,
13,
20,
19,
17,
23,
11,
481,
15,
13,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_device_label() {
if let Some(device) = test_get_default_device(Scope::Input) {
let name = get_device_label(device, DeviceType::INPUT).unwrap();
println!("input device label: {}", name.into_string());
} else {
println!("No input device.");
}
if let Som... | rust_cleaned_test_functions.jsonl/113814 | {
"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,
3062,
9204,
6106,
368,
341,
262,
421,
1077,
4329,
17848,
8,
284,
1273,
3062,
9993,
9204,
3759,
2417,
486,
2505,
8,
341,
286,
1077,
829,
284,
633,
9204,
6106,
17848,
11,
13903,
929,
486,
29421,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_new() {
assert_eq!(
ReferenceSequence::new("sq 0", 8),
Err(NewError::InvalidName)
);
assert_eq!(
ReferenceSequence::new("sq0", 0),
Err(NewError::InvalidLength(0))
);
} | rust_cleaned_test_functions.jsonl/23394 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 154
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
368,
341,
286,
2060,
10714,
33673,
310,
17207,
14076,
486,
931,
445,
28343,
220,
15,
497,
220,
23,
1326,
310,
15495,
35063,
1454,
486,
7928,
675,
340,
286,
3475,
286,
2060,
10714,
33673,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_device_latency() {
if let Some(device) = test_get_default_device(Scope::Input) {
let latency = get_device_latency(device, DeviceType::INPUT).unwrap();
println!("latency of input device: {}", latency);
} else {
println!("No input device.");
}
if let So... | rust_cleaned_test_functions.jsonl/113820 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 229
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
9204,
74832,
368,
341,
262,
421,
1077,
4329,
17848,
8,
284,
1273,
3062,
9993,
9204,
3759,
2417,
486,
2505,
8,
341,
286,
1077,
39270,
284,
633,
9204,
74832,
17848,
11,
13903,
929,
486,
2942... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_format_selected_field_range() {
new_ucmd!()
.args(&["--from=auto", "--field", "2-5", "1K 2K 3K 4K 5K 6K"])
.succeeds()
.stdout_only("1K 2000 3000 4000 5000 6K\n");
} | rust_cleaned_test_functions.jsonl/46019 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 115
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8955,
23755,
5013,
9698,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
313,
1499,
28,
3902,
497,
14482,
2566,
497,
330,
17,
12,
20,
497,
330,
16,
42,
220,
17,
42,
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_txn_store_txnkv_api_version() {
let test_data = vec![
(ApiVersion::V1, ApiVersion::V1, TIDB_KEY_CASE, true),
(ApiVersion::V1, ApiVersion::V1, TXN_KEY_CASE, true),
(ApiVersion::V1, ApiVersion::V1, RAW_KEY_CASE, true),
(ApiVersion::V1ttl, ApiVe... | rust_cleaned_test_functions.jsonl/37892 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1275
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
92299,
14809,
92299,
43408,
11697,
9438,
368,
341,
262,
1077,
1273,
1769,
284,
7486,
90515,
1789,
286,
320,
6563,
5637,
486,
53,
16,
11,
13443,
5637,
486,
53,
16,
11,
350,
915,
33,
6600,
28540,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_master_get_config_negative3() {
let (mut master, mut peer) = create_pair2();
let buf = vec![0x0; MAX_MSG_SIZE + 1];
let hdr = VhostUserMsgHeader::new(MasterReq::GET_CONFIG, 0x4, 16);
let mut msg = VhostUserConfig::new(0x100, 4, VhostUserConfigFlags::empty());
... | rust_cleaned_test_functions.jsonl/75353 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 398
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24582,
3062,
5332,
53865,
18,
368,
341,
286,
1077,
320,
6984,
7341,
11,
5206,
14397,
8,
284,
1855,
14445,
17,
543,
286,
1077,
6607,
284,
7486,
20703,
15,
87,
15,
26,
8334,
14372,
4098,
488,
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_parse_utf8_char() {
let input = " A demo\u{0}";
match parse_utf8_char(input, "MADRU ") {
Some((c, rest)) => {assert!(rest == "A demo\u{0}"); assert!(c == ' ');},
None => assert!(false)
};
match parse_utf8_char(input, "MADRU") {
... | rust_cleaned_test_functions.jsonl/72356 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 218
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
39453,
23,
9232,
368,
341,
286,
1077,
1946,
284,
330,
362,
16661,
3770,
90,
15,
71612,
286,
2432,
4715,
39453,
23,
9232,
5384,
11,
330,
44,
1808,
36003,
12310,
341,
310,
4329,
1188,
66,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_serialize_publish_options() {
let reference: Element = "<publish-options xmlns='http://jabber.org/protocol/pubsub'><x xmlns='jabber:x:data' type='submit'/></publish-options>"
.parse()
.unwrap();
let elem: Element = "<x xmlns='jabber:x:data' type='submit'/>".parse... | rust_cleaned_test_functions.jsonl/125432 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 226
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
58779,
8743,
368,
341,
286,
1077,
5785,
25,
8543,
284,
4055,
27502,
39733,
24967,
1131,
1254,
1110,
38916,
652,
2659,
14,
17014,
59492,
1966,
18407,
87,
24967,
1131,
38916,
652,
35254,
41784,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_binary() {
let add = Stmt::Expr(binary(literal(2f64), Plus, literal(3f64)));
let sub = Stmt::Expr(binary(literal(2f64), Minus, literal(3f64)));
let mul = Stmt::Expr(binary(literal(2f64), Star, literal(3f64)));
let div = Stmt::Expr(binary(literal(2f64), Slash, lite... | rust_cleaned_test_functions.jsonl/103395 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1181
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31761,
368,
341,
286,
1077,
912,
284,
97023,
486,
16041,
63926,
2333,
9953,
7,
17,
69,
21,
19,
701,
12343,
11,
23141,
7,
18,
69,
21,
19,
4945,
286,
1077,
1186,
284,
97023,
486,
16041,
63926,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sprague_rows() {
use crate::{NONE, NONE2};
use nalgebra::matrix;
let m_in = matrix!(
1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0;
1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0;
1.0, 4.0, 9.0, 16.0, 16.0, 9.0, 4.0, 1.0;
);
println! {"{}", m_in};
let from_domai... | rust_cleaned_test_functions.jsonl/82197 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 306
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
649,
4663,
10949,
368,
341,
262,
990,
17717,
22964,
45425,
11,
42869,
17,
2440,
262,
990,
84533,
26083,
486,
18110,
280,
262,
1077,
296,
1243,
284,
6172,
33673,
286,
220,
16,
13,
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_cstr_mut_write() {
let mut buf = vec![0; 9];
let mut cstr_mut = unsafe { CStrMut::new(buf.as_mut_ptr(), buf.len()) };
use std::fmt::Write;
assert!(write!(&mut cstr_mut, "test").is_ok());
assert!(buf.starts_with(b"test\0"));
assert!(write!(&mut cstr... | rust_cleaned_test_functions.jsonl/42137 | {
"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,
666,
495,
29523,
9165,
368,
341,
286,
1077,
5206,
6607,
284,
7486,
20703,
15,
26,
220,
24,
935,
286,
1077,
5206,
272,
495,
29523,
284,
19860,
314,
356,
2580,
51440,
486,
931,
10731,
5357,
29523,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_with_a_newly_included_range() {
let source_code = "<div><%= foo() %></div><span><%= bar() %></span><%= baz() %>";
let range1_start = source_code.find(" foo").unwrap();
let range2_start = source_code.find(" bar").unwrap();
let range3_start = source_code.find(" baz").unwrap... | rust_cleaned_test_functions.jsonl/15880 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1139
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
28598,
6615,
4306,
5921,
398,
1243,
10181,
9698,
368,
341,
262,
1077,
2530,
4136,
284,
4055,
611,
1784,
35205,
15229,
368,
1018,
1472,
611,
1784,
1480,
1784,
35205,
3619,
368,
1018,
1472,
148... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_head_content_length_headers() {
let mut srv = test::init_service(
App::new().service(Files::new("test", ".").index_file("tests/test.binary")),
);
// Valid range header
let request = TestRequest::default()
.method(Method::HEAD)
... | rust_cleaned_test_functions.jsonl/35494 | {
"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,
13138,
7495,
5118,
26719,
368,
341,
286,
1077,
5206,
43578,
284,
1273,
486,
2327,
12267,
1006,
310,
1845,
486,
931,
1005,
7936,
7,
10809,
486,
931,
445,
1944,
497,
22760,
568,
1252,
2458,
445,
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_cred_def_id_parts_for_id_as_unqualified_without_tag_with_schema_as_seq_no() {
assert_eq!(
_cred_def_id_unqualified_with_schema_as_seq_no(),
_cred_def_id_unqualified_with_schema_as_seq_no().to_unqualified()
);
} | rust_cleaned_test_functions.jsonl/38081 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 168
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73475,
7844,
842,
33217,
5478,
842,
11898,
4907,
36335,
39904,
9372,
6615,
25371,
11898,
14486,
6536,
368,
341,
310,
2060,
10714,
33673,
394,
716,
10844,
7844,
842,
4907,
36335,
6615,
25371,
11898,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_index_manual_policy_mmap() {
let schema = throw_away_schema();
let field = schema.get_field("num_likes").unwrap();
let mut index = Index::create_from_tempdir(schema).unwrap();
let mut writer = index.writer_with_num_threads(1, 3_000_000).unwrap();
... | rust_cleaned_test_functions.jsonl/117332 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 556
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3560,
75428,
22773,
717,
2186,
368,
341,
310,
1077,
10802,
284,
2510,
62,
13757,
25371,
543,
310,
1077,
2070,
284,
10802,
670,
5013,
445,
2413,
89178,
1827,
15454,
543,
310,
1077,
5206,
1922,
284,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_refresh_neuron_by_id_by_controller() {
let owner = *TEST_NEURON_1_OWNER_PRINCIPAL;
refresh_neuron_by_id_or_subaccount(owner, owner, RefreshBy::NeuronId);
} | rust_cleaned_test_functions.jsonl/1152 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 85
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42076,
13925,
36090,
3710,
842,
3710,
21600,
368,
341,
262,
1077,
6372,
284,
353,
10033,
14039,
1511,
711,
62,
16,
74323,
10571,
38439,
3298,
969,
280,
262,
10408,
13925,
36090,
3710,
842,
8734,
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 |
#[test]
fn test_builder_i32_empty() {
let mut b = Int32BufferBuilder::new(5);
assert_eq!(0, b.len());
assert_eq!(16, b.capacity());
let a = b.finish();
assert_eq!(0, a.len());
} | rust_cleaned_test_functions.jsonl/30959 | {
"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,
28532,
5318,
18,
17,
15124,
368,
341,
286,
1077,
5206,
293,
284,
1333,
18,
17,
4095,
3297,
486,
931,
7,
20,
317,
286,
2060,
10714,
10297,
15,
11,
293,
19406,
1423,
286,
2060,
10714,
10297,
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_stale_peer_destroy_when_apply_snapshot() {
let mut cluster = new_node_cluster(0, 3);
configure_for_snapshot(&mut cluster);
let pd_client = Arc::clone(&cluster.pd_client);
pd_client.disable_default_operator();
cluster.run();
cluster.must_put(b"k1", b"v1");
must_get_... | rust_cleaned_test_functions.jsonl/39366 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1052
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1261,
1574,
45159,
18066,
47636,
36551,
53265,
368,
341,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
220,
18,
317,
262,
14411,
5478,
53265,
2099,
6984,
10652,
317,
262,
1077,
7744,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_sort() {
let v = to_value(vec![3, -1, 2, 5, 4]).unwrap();
let args = HashMap::new();
let result = sort(&v, &args);
assert!(result.is_ok());
assert_eq!(result.unwrap(), to_value(vec![-1, 2, 3, 4, 5]).unwrap());
} | rust_cleaned_test_functions.jsonl/62049 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 144
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18435,
368,
341,
286,
1077,
348,
284,
311,
3142,
25592,
20703,
18,
11,
481,
16,
11,
220,
17,
11,
220,
20,
11,
220,
19,
10697,
15454,
543,
286,
1077,
2827,
284,
10528,
486,
931,
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... | 1 |
#[test]
fn test_encode_b64_errors() {
// No end padding
{
let unpad_cfg = Config::B64.end_padding(false);
{
let err = unpad_cfg.encode::<2>(&[0xAB, 0xCD]).unwrap_err();
assert!(err.expected() == 2 && err.found() == 3, "{:?}", err);
}
assert_eq!(un... | rust_cleaned_test_functions.jsonl/98054 | {
"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,
11224,
880,
21,
19,
20196,
368,
341,
262,
442,
2308,
835,
5300,
198,
262,
341,
286,
1077,
650,
13242,
18343,
284,
5532,
486,
33,
21,
19,
5073,
40726,
3576,
626,
286,
341,
310,
1077,
1848,
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... | 5 |
#[test]
fn test_should_succeed_if_range_out_of_bounds() {
new_ucmd!()
.args(&["--from=auto", "--field", "5-10", "1K 2K 3K 4K 5K 6K"])
.succeeds()
.stdout_only("1K 2K 3K 4K 5000 6000\n");
} | rust_cleaned_test_functions.jsonl/46020 | {
"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,
43378,
643,
29264,
11119,
9698,
6068,
3575,
36878,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
313,
1499,
28,
3902,
497,
14482,
2566,
497,
330,
20,
12,
16,
15,
497,
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_client_missing_settings() {
let (mut hconn, mut neqo_trans_conn) = connect_and_receive_settings(Client);
// Create server control stream.
let control_stream = neqo_trans_conn.stream_create(StreamType::UniDi).unwrap();
let sent = neqo_trans_conn.stream_sen... | rust_cleaned_test_functions.jsonl/10915 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 256
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8179,
40447,
10853,
368,
341,
286,
1077,
320,
6984,
305,
5148,
11,
5206,
834,
80,
78,
7965,
17241,
8,
284,
4564,
8378,
38557,
10853,
46851,
317,
286,
442,
4230,
3538,
2524,
4269,
624,
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_check_transaction_for_nonce_not_nonce_fail() {
let mut feature_set = FeatureSet::all_enabled();
feature_set.deactivate(&tx_wide_compute_cap::id());
let (bank, _mint_keypair, custodian_keypair, nonce_keypair) =
setup_nonce_with_bank(10_000_000, |_| {}, 5_000_00... | rust_cleaned_test_functions.jsonl/28920 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 626
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
28884,
5478,
48508,
7913,
48508,
22121,
368,
341,
286,
1077,
5206,
4565,
2602,
284,
19998,
1649,
486,
541,
18220,
543,
286,
4565,
2602,
2285,
16856,
2099,
3998,
1670,
577,
57028,
16388,
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_decode_modem_status_command() {
let buf = [
0b11100011,
0b00000111,
0b00001111,
0b00000000,
0b00000001,
];
let expected = MuxCommand {
params: MuxCommandParams::ModemStatus(ModemStatusParams {
... | rust_cleaned_test_functions.jsonl/107776 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 340
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
7480,
336,
4773,
10811,
368,
341,
286,
1077,
6607,
284,
2278,
310,
220,
15,
65,
16,
16,
16,
15,
15,
15,
16,
16,
11,
715,
310,
220,
15,
65,
15,
15,
15,
15,
15,
16,
16,
16,
11,
71... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_load_header() {
// deploy contract
let mut context = Context::default();
let test_contract_bin = fs::read(TEST_CONTRACT_PATH).unwrap();
let lock_out_point = context.deploy_cell(test_contract_bin.to_vec().into());
let lock_script = context
.build_script(&lock_out_point... | rust_cleaned_test_functions.jsonl/92568 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1105
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12411,
8757,
368,
341,
262,
442,
10517,
5116,
198,
262,
1077,
5206,
2266,
284,
9608,
486,
2258,
543,
262,
1077,
1273,
51499,
21816,
284,
8619,
486,
878,
50320,
4307,
41105,
7944,
568,
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_to_hex() {
use rand::Rng;
for _ in 0..20000 {
let bytes = rand::thread_rng().gen::<[u64; 1]>();
let f = f64::from_bits(bytes[0]);
if !f.is_finite() {
continue;
}
let hex = to_hex(f);
let roundtrip = hexf_parse::parse_he... | rust_cleaned_test_functions.jsonl/32744 | {
"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,
2346,
32655,
368,
341,
262,
990,
10382,
486,
49,
968,
280,
262,
369,
716,
304,
220,
15,
496,
17,
15,
15,
15,
15,
341,
286,
1077,
5820,
284,
10382,
486,
4528,
66849,
1005,
4370,
27638,
58,
84... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_read_shapes() {
let iter: GTFSIterator<_, ShapePoint> =
GTFSIterator::from_path("./examples/good_feed/shapes.txt").unwrap();
for result in iter {
assert!(result.is_ok(), format!("{}", result.err().unwrap()));
}
} | rust_cleaned_test_functions.jsonl/7509 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 117
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
71315,
368,
341,
262,
1077,
5367,
25,
11911,
8485,
11951,
27,
6878,
22526,
2609,
29,
4035,
286,
11911,
8485,
11951,
486,
1499,
2638,
13988,
51668,
4846,
1386,
42390,
14688,
9337,
3909,
1827,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_empty_filter() {
let f = PartitionFilter::extract(
&Schema::new(vec![]),
&[Expr::Literal(ScalarValue::Boolean(Some(true)))],
);
assert_eq!(f.min_max, vec![]);
assert!(f.can_match(Some(&[]), Some(&[])));
} | rust_cleaned_test_functions.jsonl/65535 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 156
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
8727,
368,
341,
286,
1077,
282,
284,
54626,
5632,
486,
23493,
1006,
310,
609,
8632,
486,
931,
25592,
0,
1294,
1326,
310,
44590,
16041,
486,
17350,
7,
20639,
1130,
486,
6890,
65405,
3715,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_filter_happy_path() {
use super::CaptureSink;
use crate::ground::Variable;
use crate::matching::plan::Source;
use crate::unification::Element;
use differential_dataflow::input::InputSession;
use std::collections::HashSet;
let x = MetaVar::new("x");
let source = S... | rust_cleaned_test_functions.jsonl/31138 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 718
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8727,
1523,
11144,
2638,
368,
341,
262,
990,
2256,
486,
27429,
45094,
280,
262,
990,
17717,
486,
1951,
486,
7827,
280,
262,
990,
17717,
486,
89043,
486,
10393,
486,
3608,
280,
262,
990,
17717,
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_two_rule_bodies_not_nested() -> TestResult {
let p = polar();
p.load_str(
r#"f(x) if a(x);
f(1);
a(_x) if false;"#,
)?;
qvar(&p, "f(x)", "x", values![1]);
Ok(())
} | rust_cleaned_test_functions.jsonl/68108 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 142
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23241,
21124,
880,
10028,
7913,
66279,
368,
1464,
3393,
2077,
341,
262,
1077,
281,
284,
24660,
543,
262,
281,
5104,
2895,
1006,
286,
435,
55543,
69,
2075,
8,
421,
264,
2075,
317,
1843,
282,
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... | 2 |
#[test]
fn test_hash_to_try_and_increment_2() {
let data = hex::decode("68656c6c6f").unwrap();
let hash_point = Bn256.hash_to_try_and_increment(&data).unwrap();
let hash_bytes = Bn256.to_compressed_g1(hash_point).unwrap();
let expected_hash = "0200b201235f522abbd3863b74... | rust_cleaned_test_functions.jsonl/65095 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 213
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
2346,
53283,
8378,
51482,
62,
17,
368,
341,
1789,
286,
1077,
821,
284,
12371,
486,
18196,
445,
21,
23,
21,
20,
21,
66,
21,
66,
21,
69,
1827,
15454,
543,
286,
1077,
5175,
6085,
284,
425... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_kill_with_signal() {
use nix::sys::signal;
use nix::unistd::Pid;
unsafe {
let result = run_in_pty(|| {
signal::kill(Pid::this(), Signal::SIGKILL).expect("sending signal should succeed");
std::thread::sleep(Duration::from_secs(3)... | rust_cleaned_test_functions.jsonl/20654 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 305
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73327,
6615,
21137,
368,
341,
286,
990,
308,
941,
486,
7791,
486,
26622,
280,
286,
990,
308,
941,
486,
27483,
486,
32339,
280,
286,
19860,
341,
310,
1077,
1102,
284,
1598,
1243,
62,
1595,
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_rev_iterator() {
use iter::*;
let xs = [1, 2, 5, 10, 11];
let ys = [11, 10, 5, 2, 1];
let mut i = 0;
for &x in xs.rev_iter() {
assert_eq!(x, ys[i]);
i += 1;
}
assert_eq!(i, 5);
} | rust_cleaned_test_functions.jsonl/117101 | {
"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,
38082,
13491,
368,
341,
286,
990,
5367,
79304,
286,
1077,
11943,
284,
508,
16,
11,
220,
17,
11,
220,
20,
11,
220,
16,
15,
11,
220,
16,
16,
935,
286,
1077,
31810,
284,
508,
16,
16,
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... | 2 |
#[test]
fn test_purge() {
let key = Keypair::new();
let mut index = AccountsIndex::<u64>::default();
let mut gc = Vec::new();
assert_eq!(Some(12), index.update(1, &key.pubkey(), 12, &mut gc));
index.insert(1, &key.pubkey(), 12, &mut gc);
assert_eq!(None, index.u... | rust_cleaned_test_functions.jsonl/20406 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 320
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
39823,
368,
341,
286,
1077,
1376,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
5206,
1922,
284,
40655,
1552,
27638,
84,
21,
19,
6831,
2258,
543,
286,
1077,
5206,
22122,
284,
11312,
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_reset() {
let mut ema = ExponentialMovingAverage::new(5).unwrap();
assert_eq!(ema.next(4.0), 4.0);
ema.next(10.0);
ema.next(15.0);
ema.next(20.0);
assert_ne!(ema.next(4.0), 4.0);
ema.reset();
assert_eq!(ema.next(4.0), 4.0);
} | rust_cleaned_test_functions.jsonl/124095 | {
"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,
18983,
368,
341,
286,
1077,
5206,
976,
64,
284,
1374,
59825,
39732,
26292,
486,
931,
7,
20,
568,
15454,
1428,
286,
2060,
10714,
10297,
9176,
4529,
7,
19,
13,
15,
701,
220,
19,
13,
15,
317,
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_populate_rewards_not_funded() {
let gen = |c, r| -> Vec<(RemoteAccountOf<Test>, RewardAmountOf<Test>, VestingPeriodOf<Test>)> {
generate_accounts(c)
.into_iter()
.map(|(_, account)| (account.as_remote_public(), r, DEFAULT_VESTING_PERIOD))
.collect()
};
ExtBuilder::default().build()... | rust_cleaned_test_functions.jsonl/41079 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 228
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17061,
6334,
77997,
7913,
761,
36053,
368,
341,
10217,
4081,
284,
760,
66,
11,
435,
91,
1464,
11312,
28706,
24703,
7365,
2124,
71273,
8066,
55800,
10093,
2124,
71273,
8066,
55888,
287,
23750,
2124,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_eval_fail_1() {
#[derive(Debug, Clone, Copy)]
struct FnFoo;
impl_template_fn! { 1 arg @ FnFoo }
impl FnFoo {
fn call(
_ctx: &mut EvalContext,
_payload: RpnFnCallPayload<'_>,
_v: &Option<i64>,
... | rust_cleaned_test_functions.jsonl/121518 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 576
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
22121,
62,
16,
368,
341,
286,
11506,
27098,
42618,
11,
27913,
11,
14540,
5563,
286,
2036,
50182,
40923,
401,
286,
11605,
8693,
15246,
0,
314,
220,
16,
1392,
569,
50182,
40923,
555,
286,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_circuit_with_small_tables() {
use crate::pairing::bn256::{Bn256, Fr};
use crate::worker::Worker;
let mut assembly = TrivialAssembly::<Bn256, PlonkCsWidth4WithNextStepParams, Width4MainGateWithDNext>::new();
let circuit = TestCircuit4WithLookupsManyGatesSmallTabl... | rust_cleaned_test_functions.jsonl/78085 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 367
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
37268,
6615,
31966,
35632,
368,
341,
286,
990,
17717,
486,
12670,
287,
486,
11081,
17,
20,
21,
22964,
33,
77,
17,
20,
21,
11,
2869,
2440,
286,
990,
17717,
486,
21462,
486,
21936,
401,
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_partial_add_front() {
let mut assr = contigs![(4, 8), (4, 0)];
assert_eq!(assr.add(0, 4), Ok(()));
assert_eq!(assr, contigs![(0, 12), (4, 0)]);
} | rust_cleaned_test_functions.jsonl/52005 | {
"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,
52068,
2891,
22926,
368,
341,
286,
1077,
5206,
1071,
81,
284,
683,
14462,
0,
9697,
19,
11,
220,
23,
701,
320,
19,
11,
220,
15,
12587,
286,
2060,
10714,
10297,
395,
81,
1364,
7,
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_code_spectral_envelope() {
let x: Vec<f64> = vec![0.0; 256];
let x_length = x.len() as i32;
let fs = 44100_i32;
let temporal_positions = vec![0.0, 0.005];
let f0 = vec![0.0, 0.0];
let f0_length ... | rust_cleaned_test_functions.jsonl/20839 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 779
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4136,
643,
86575,
6205,
18853,
368,
341,
286,
1077,
856,
25,
11312,
63895,
21,
19,
29,
286,
284,
7486,
20703,
15,
13,
15,
26,
220,
17,
20,
21,
935,
286,
1077,
856,
5118,
1843,
284,
856,
1940... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_switch_between_sender_and_receiver() {
struct Notifier<F>(Arc<Mutex<Option<Spawn<F>>>>);
impl<F> Clone for Notifier<F> {
fn clone(&self) -> Notifier<F> {
Notifier(Arc::clone(&self.0))
}
}
impl<F> Notify for Notifier<F>
... | rust_cleaned_test_functions.jsonl/54985 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 609
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27652,
48302,
54356,
8378,
65691,
368,
341,
286,
2036,
2806,
3049,
30499,
2235,
36809,
33274,
9371,
94150,
27,
41005,
30499,
18153,
317,
286,
11605,
30499,
29,
27913,
369,
2806,
3049,
30499,
29,
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_consume_and_get_buf() {
let mut rdr = BufferIo::new(SlowRead(0));
rdr.bump_read().unwrap();
rdr.consume(1);
assert_eq!(rdr.get_reader_buf().as_ref(), b"oo");
rdr.bump_read().unwrap();
rdr.bump_read().unwrap();
assert_eq!(rdr.get_reader_buf(... | rust_cleaned_test_functions.jsonl/125445 | {
"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,
3382,
31323,
8378,
3062,
10363,
368,
341,
286,
1077,
5206,
66984,
284,
10312,
42799,
486,
931,
3759,
10303,
4418,
7,
15,
1106,
286,
66984,
948,
1510,
6443,
1005,
15454,
543,
286,
66984,
79424,
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_combined_file_set_unset() {
let out = new_ucmd!()
.arg("-u")
.arg("BAR")
.arg("-f")
.arg("vars.conf.txt")
.arg("FOO=bar.alt")
.run()
.stdout;
assert_eq!(
out.lines()
.filter(|&line| line == "FOO=bar.alt" || line... | rust_cleaned_test_functions.jsonl/1542 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 232
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
89945,
2458,
2602,
98109,
368,
341,
262,
1077,
700,
284,
501,
68887,
2277,
0,
741,
286,
659,
858,
13645,
84,
1138,
286,
659,
858,
445,
33065,
1138,
286,
659,
858,
13645,
69,
1138,
286,
659,
85... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_get_utf8_byte_index() {
let s = "你好世界";
assert_eq!(&s[..get_utf8_byte_index(s, 0)], "");
assert_eq!(&s[..get_utf8_byte_index(s, 2)], "你好");
assert_eq!(&s[..get_utf8_byte_index(s, 4)], "你好世界");
assert_eq!(&s[..get_utf8_byte_index(s, 9)], "你好世界");
} | rust_cleaned_test_functions.jsonl/60486 | {
"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,
3062,
39453,
23,
19737,
3560,
368,
341,
286,
1077,
274,
284,
330,
108386,
99489,
3302,
286,
2060,
10714,
0,
2099,
82,
95874,
455,
39453,
23,
19737,
3560,
1141,
11,
220,
15,
25035,
14498,
286,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_method_conversions() {
assert_eq!(HyperMethod::DELETE, Method::Delete.into_hyper());
assert_eq!(HyperMethod::GET, Method::Get.into_hyper());
assert_eq!(HyperMethod::PATCH, Method::Patch.into_hyper());
assert_eq!(HyperMethod::POST, Method::Post.into_hyper());
... | rust_cleaned_test_functions.jsonl/116944 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 158
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9032,
3382,
28290,
368,
341,
286,
2060,
10714,
10297,
73946,
3523,
486,
14424,
11,
6730,
486,
6435,
39860,
93416,
1423,
286,
2060,
10714,
10297,
73946,
3523,
486,
3806,
11,
6730,
486,
1949,
39860,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ipv6packet_matcher_rule_corrupt() {
let packet3 = hex::decode("deadbeef").expect("bad ipv6 hex");
assert!(!Ipv6PacketMatcherRule::default().match_inbound_packet(&packet3));
assert!(!Ipv6PacketMatcherRule::default().match_outbound_packet(&packet3));
} | rust_cleaned_test_functions.jsonl/122559 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 136
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49378,
21,
24829,
10708,
261,
21124,
14734,
6585,
368,
341,
286,
1077,
10151,
18,
284,
12371,
486,
18196,
445,
33754,
1371,
823,
1827,
17119,
445,
13855,
45475,
21,
12371,
797,
286,
2060,
0,
3471,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_log2() {
assert_eq!(0, 0.log2());
assert_eq!(0, 1.log2());
assert_eq!(1, 2.log2());
assert_eq!(5, 32.log2());
assert_eq!(10, 1024.log2());
} | rust_cleaned_test_functions.jsonl/12841 | {
"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,
5224,
17,
368,
341,
262,
2060,
10714,
10297,
15,
11,
220,
15,
1665,
17,
1423,
262,
2060,
10714,
10297,
15,
11,
220,
16,
1665,
17,
1423,
262,
2060,
10714,
10297,
16,
11,
220,
17,
1665,
17,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_function_signature_abi_compatible() {
let abi_type = abi::FunctionSignature {
arg_types: std::ptr::null(),
return_type: std::ptr::null(),
num_arg_types: 0,
};
super::FunctionSignature::test(&abi_type);
} | rust_cleaned_test_functions.jsonl/98922 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 116
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9174,
39859,
22885,
72,
2965,
37079,
368,
341,
262,
1077,
61050,
1819,
284,
61050,
486,
5152,
25088,
341,
286,
1392,
9763,
25,
1460,
486,
3505,
486,
2921,
3148,
286,
470,
1819,
25,
1460,
486,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_a() {
let orbits = vec![
"COM)B".parse().unwrap(),
"B)C".parse().unwrap(),
"C)D".parse().unwrap(),
"D)E".parse().unwrap(),
"E)F".parse().unwrap(),
"B)G".parse().unwrap(),
"G)H".parse().unwrap(),
... | rust_cleaned_test_functions.jsonl/91265 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 343
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4306,
368,
341,
286,
1077,
85128,
284,
7486,
90515,
310,
330,
8696,
8,
33,
3263,
6400,
1005,
15454,
3148,
310,
330,
33,
8,
34,
3263,
6400,
1005,
15454,
3148,
310,
330,
34,
8,
35,
3263,
6400,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_or_with_multiple_in_to_string() {
let name1 = _random_vector(10);
let value1 = _random_string(10);
let name2 = _random_vector(10);
let value2 = _random_string(10);
let name3 = _random_vector(10);
let value3 = _random_string(10);
let query ... | rust_cleaned_test_functions.jsonl/11924 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 762
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8734,
6615,
45233,
1243,
2346,
3904,
368,
341,
286,
1077,
829,
16,
284,
716,
11463,
12247,
7,
16,
15,
317,
286,
1077,
897,
16,
284,
716,
11463,
3904,
7,
16,
15,
317,
286,
1077,
829,
17,
284,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_version_error_display() {
let e: Error = BlockVersionError {
expected: 0,
actual: 1,
}
.into();
assert_eq!(
"Header(Version(BlockVersionError(expected: 0, actual: 1)))",
format!("{}", e)
);
} | rust_cleaned_test_functions.jsonl/57996 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 167
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9438,
4096,
14825,
368,
341,
286,
1077,
384,
25,
4600,
284,
8362,
5637,
1454,
341,
310,
3601,
25,
220,
15,
345,
310,
5042,
25,
220,
16,
345,
286,
456,
286,
659,
18122,
1428,
286,
2060,
10714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_filter_parser_has() {
let mut input = Cursor::new("foo".as_bytes());
let mut parser = Parser::make(&mut input).expect("Should create parser");
let has = parser.parse().expect("Has");
assert_eq!(has.to_string(), "foo");
} | rust_cleaned_test_functions.jsonl/125355 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 125
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8727,
18517,
21778,
368,
972,
286,
1077,
5206,
1946,
284,
28067,
486,
931,
445,
7975,
3263,
300,
12524,
6201,
286,
1077,
5206,
6729,
284,
21102,
486,
6927,
2099,
6984,
1946,
568,
17119,
445,
14996... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_kv_ops() {
let mut mock = mock::MockServer::start();
std::thread::sleep(std::time::Duration::from_secs(5));
mock.stop();
} | rust_cleaned_test_functions.jsonl/33479 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 84
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
97066,
21959,
368,
341,
262,
1077,
5206,
7860,
284,
7860,
486,
11571,
5475,
486,
2468,
1428,
262,
1460,
486,
4528,
486,
25809,
5194,
486,
1678,
486,
12945,
486,
1499,
68718,
7,
20,
3237,
262,
78... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_non_controller_cant_claim_neuron_for_themselves() {
let owner = *TEST_NEURON_1_OWNER_PRINCIPAL;
let claimer = *TEST_NEURON_2_OWNER_PRINCIPAL;
let memo = 1234u64;
let (_, mut gov, _) =
governance_with_staked_unclaimed_neuron(&owner, memo, Tokens::from_tokens(10u64).unwrap(... | rust_cleaned_test_functions.jsonl/1149 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 531
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21637,
21600,
666,
517,
84969,
13925,
36090,
5478,
5854,
11852,
4275,
368,
341,
262,
1077,
6372,
284,
353,
10033,
14039,
1511,
711,
62,
16,
74323,
10571,
38439,
3298,
969,
280,
262,
1077,
3717,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.