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_get_screenshot() {
let s: Screenshot = get_screenshot(0).unwrap();
println!(
"width: {}\n height: {}\npixel width: {}\n bytes: {}",
s.width(),
s.height(),
s.pixel_width(),
s.raw_len()
);
} | rust_cleaned_test_functions.jsonl/37597 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 135
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
643,
31109,
368,
341,
262,
1077,
274,
25,
328,
31109,
284,
633,
643,
31109,
7,
15,
568,
15454,
543,
262,
13751,
33673,
286,
330,
3098,
25,
56057,
77,
2608,
25,
56057,
6199,
5941,
2374,
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_range_wrapper_reflexive_property() {
let mut tests = vec![];
for i in 0..10 {
tests.push(RangeKey::new(0..i, ()));
}
let mut less_map: BTreeMap<String, BTreeSet<String>> = BTreeMap::new();
let mut greater_map: BTreeMap<String, BTreeSet<String>> = BTreeMap::new();
... | rust_cleaned_test_functions.jsonl/58354 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 775
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9698,
23561,
7793,
2571,
533,
16638,
368,
341,
262,
1077,
5206,
7032,
284,
7486,
0,
15078,
262,
369,
600,
304,
220,
15,
496,
16,
15,
341,
286,
7032,
2552,
2785,
844,
1592,
486,
931,
7,
15,
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... | 8 |
#[test]
fn test_toggle_wrong_type() {
let mut doc = create_doc();
doc["status"]["disabled"] = toml_edit::value("a");
assert!(handle_toggle_configuration(&mut doc, "status", "disabled").is_err());
doc["format"] = toml_edit::value("$all");
assert!(handle_toggle_configura... | rust_cleaned_test_functions.jsonl/134239 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 153
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48860,
75198,
1819,
368,
341,
286,
1077,
5206,
4629,
284,
1855,
18869,
543,
286,
4629,
1183,
2829,
11018,
11978,
1341,
284,
311,
1014,
13156,
486,
957,
445,
64,
3071,
286,
2060,
10297,
8192,
48860... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_atomic_into_inner() {
let lazycell = AtomicLazyCell::new();
lazycell.fill(1).unwrap();
let value = lazycell.into_inner();
assert_eq!(value, Some(1));
} | rust_cleaned_test_functions.jsonl/5810 | {
"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,
51367,
45514,
34345,
368,
341,
286,
1077,
64436,
3337,
613,
284,
30316,
39766,
3599,
486,
931,
1428,
286,
64436,
3337,
613,
12467,
7,
16,
568,
15454,
543,
286,
1077,
897,
284,
64436,
3337,
613,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_mode() {
assert_eq!("bicycling", Mode::Bicycling.to_string());
assert_eq!("driving", Mode::Driving.to_string());
assert_eq!("transit", Mode::Transit.to_string());
assert_eq!("walking", Mode::Walking.to_string());
} | rust_cleaned_test_functions.jsonl/75488 | {
"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,
14825,
7302,
368,
341,
286,
2060,
10714,
17223,
65,
2842,
62098,
497,
14562,
486,
33,
2842,
62098,
2389,
3904,
1423,
286,
2060,
10714,
17223,
3612,
2249,
497,
14562,
486,
93836,
2389,
3904,
1423,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fstatat() {
let tempdir = tempfile::tempdir().unwrap();
let filename = tempdir.path().join("foo.txt");
File::create(&filename).unwrap();
let dirfd = fcntl::open(tempdir.path(),
fcntl::OFlag::empty(),
stat::Mode::empty());
... | rust_cleaned_test_functions.jsonl/48639 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 267
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
9878,
266,
368,
341,
262,
1077,
2730,
3741,
284,
54819,
486,
3888,
3741,
1005,
15454,
543,
262,
1077,
3899,
284,
2730,
3741,
3875,
1005,
5987,
445,
7975,
3909,
797,
262,
2887,
486,
3182,
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_maybe_retransmit_unpropagated_slots() {
let ReplayBlockstoreComponents {
validator_node_to_vote_keys,
leader_schedule_cache,
vote_simulator,
..
} = replay_blockstore_components(None, 10, None::<GenerateVotes>);
let VoteSimu... | rust_cleaned_test_functions.jsonl/25837 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1426
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
49791,
1288,
1458,
1763,
4907,
2674,
351,
657,
54161,
368,
341,
286,
1077,
59061,
4713,
4314,
10443,
341,
310,
22935,
5084,
2346,
54360,
12631,
345,
310,
7653,
34530,
11529,
345,
310,
6910,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_path_verify_bad() {
let mt = MerkleTree::new(TEST);
for (i, s) in BAD.iter().enumerate() {
let hash = hash_leaf!(s);
let path = mt.find_path(i).unwrap();
assert!(!path.verify(hash));
}
} | rust_cleaned_test_functions.jsonl/112984 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 152
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2638,
35638,
34199,
368,
341,
286,
1077,
11965,
284,
8755,
23089,
6533,
486,
931,
50320,
317,
286,
369,
320,
72,
11,
274,
8,
304,
47718,
19471,
1005,
76569,
368,
341,
310,
1077,
5175,
284,
5175,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_recursion_depth_check_objects() {
let s = "{a:".repeat(10_000) + &"}".repeat(10_000);
assert!(YamlLoader::load_from_str(&s).is_err());
} | rust_cleaned_test_functions.jsonl/1216 | {
"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,
7080,
34280,
19061,
7200,
24873,
368,
341,
286,
1077,
274,
284,
13868,
64,
95740,
30624,
7,
16,
15,
62,
15,
15,
15,
8,
488,
609,
9207,
3263,
30624,
7,
16,
15,
62,
15,
15,
15,
317,
286,
206... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_adjust_min() {
assert_eq!(0.0, adjust_min(0.0, 100.0));
assert_eq!(5.0, adjust_min(5.0, 100.0));
assert_eq!(100.0, adjust_min(500.0, 100.0));
} | rust_cleaned_test_functions.jsonl/80583 | {
"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,
44153,
7260,
368,
341,
286,
2060,
10714,
10297,
15,
13,
15,
11,
7500,
7260,
7,
15,
13,
15,
11,
220,
16,
15,
15,
13,
15,
1106,
286,
2060,
10714,
10297,
20,
13,
15,
11,
7500,
7260,
7,
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_request() {
use helix::*;
let req = BlockUserRequest::builder()
.target_user_id("41245071".to_string())
.build();
dbg!(req.create_request(EmptyBody, "token", "clientid").unwrap());
// From twitch docs
let data = br#""#.to_vec();
let http_response = http... | rust_cleaned_test_functions.jsonl/72305 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 275
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7893,
368,
341,
262,
990,
11338,
941,
56162,
262,
1077,
4232,
284,
8362,
1474,
1900,
486,
17850,
741,
286,
659,
5657,
3317,
842,
445,
19,
16,
17,
19,
20,
15,
22,
16,
3263,
983,
3904,
2398,
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_extend() {
let mut target = Context::new();
target.add("a", &1);
target.add("b", &2);
let mut source = Context::new();
source.add("b", &3);
source.add("c", &4);
target.extend(source);
assert_eq!(*target.data.get("a").unwrap(), to_va... | rust_cleaned_test_functions.jsonl/83685 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 237
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70265,
368,
341,
286,
1077,
5206,
2169,
284,
9608,
486,
931,
543,
286,
2169,
1364,
445,
64,
497,
609,
16,
317,
286,
2169,
1364,
445,
65,
497,
609,
17,
317,
286,
1077,
5206,
2530,
284,
9608,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_messages_packet_size() {
// Test that if a value is smaller than payload size but too large to be wrapped in a vec
// that it is still dropped
let payload: Vec<CrdsValue> = vec![];
let vec_size = serialized_size(&payload).unwrap();
let desired_size =... | rust_cleaned_test_functions.jsonl/28073 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 466
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
23428,
21078,
2368,
368,
341,
286,
442,
3393,
429,
421,
264,
897,
374,
9155,
1091,
7729,
1379,
714,
2238,
3460,
311,
387,
19472,
304,
264,
7486,
198,
286,
442,
429,
432,
374,
2058,
12226,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_intersection_size_hint() {
let x: BTreeSet<i32> = [3, 4].iter().copied().collect();
let y: BTreeSet<i32> = [1, 2, 3].iter().copied().collect();
let mut iter = x.intersection(&y);
assert_eq!(iter.size_hint(), (1, Some(1)));
assert_eq!(iter.next(), Some(&3));
assert_eq!(ite... | rust_cleaned_test_functions.jsonl/12205 | {
"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,
82558,
2368,
45825,
368,
341,
262,
1077,
856,
25,
425,
6533,
1649,
21897,
18,
17,
29,
284,
508,
18,
11,
220,
19,
936,
2015,
1005,
37728,
1122,
1005,
17384,
543,
262,
1077,
379,
25,
425,
6533,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_emit_complex() {
let s = r#"
cataloge:
product: &coffee { name: Coffee, price: 2.5 , unit: 1l }
product: &cookies { name: Cookies!, price: 3.40 , unit: 400g}
products:
*coffee:
amount: 4
*cookies:
amount: 4
[1,2,3,4]:
array key
2.4:
real key
true... | rust_cleaned_test_functions.jsonl/1239 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 394
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
69082,
41522,
368,
341,
286,
1077,
274,
284,
435,
2,
698,
26539,
68,
510,
220,
1985,
25,
609,
78117,
256,
314,
829,
25,
26079,
11,
262,
3349,
25,
220,
17,
13,
20,
220,
1154,
220,
4982,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_get() {
let (process, port) = named_process();
let socket = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), port);
let conn = UdpClientConnection::new(socket).unwrap();
let client = SyncClient::new(conn);
let name = Name::from_str("www.example.com.").unwrap();
l... | rust_cleaned_test_functions.jsonl/96282 | {
"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,
3062,
368,
341,
262,
1077,
320,
4630,
11,
2635,
8,
284,
6941,
11305,
543,
262,
1077,
7575,
284,
20954,
13986,
486,
931,
8972,
79,
13986,
486,
53,
19,
8972,
30168,
19,
13986,
486,
931,
7,
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... | 2 |
#[test]
fn test_ser_de() {
let string = ArrayString::<[u8; 9]>::from("1234 abcd")
.expect("expected exact specified capacity to be enough");
assert_tokens(&string, &[
Token::Str("1234 abcd"),
]);
} | rust_cleaned_test_functions.jsonl/67024 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 127
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75861,
2259,
368,
341,
286,
1077,
914,
284,
2910,
703,
27638,
58,
84,
23,
26,
220,
24,
60,
6831,
1499,
445,
16,
17,
18,
19,
668,
4385,
1138,
310,
659,
17119,
445,
7325,
4734,
5189,
8654,
311... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_inbound_substream() {
let mut rt = Runtime::new().unwrap();
let (_ds_requests_tx, mut ds_notifs_rx, mut peer_mgr_notifs_tx, _peer_mgr_reqs_rx) =
start_direct_send_actor(rt.handle().clone());
let peer_id = PeerId::random();
let (dialer_substream, listener_substream) = Me... | rust_cleaned_test_functions.jsonl/13361 | {
"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,
1243,
10891,
5228,
4027,
368,
341,
262,
1077,
5206,
16677,
284,
10954,
486,
931,
1005,
15454,
1428,
262,
1077,
5453,
5356,
37216,
17805,
11,
5206,
11472,
7913,
21835,
24330,
11,
5206,
14397,
42438,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_mux_command_invalid_command_type() {
let buf = [
0b11111101,
0b00000001,
];
assert_matches!(
MuxCommand::decode(&buf[..]),
Err(FrameParseError::UnsupportedMuxCommandType(0b111111))
);
} | rust_cleaned_test_functions.jsonl/107769 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 170
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
80363,
10811,
31433,
10811,
1819,
368,
341,
286,
1077,
6607,
284,
2278,
310,
220,
15,
65,
16,
16,
16,
16,
16,
16,
15,
16,
11,
715,
310,
220,
15,
65,
15,
15,
15,
15,
15,
15,
15,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_additional_condition_left_join() {
let expected_sql =
"SELECT `users`.* FROM `users` LEFT JOIN `posts` ON (`users`.`id` = `posts`.`user_id` AND `posts`.`published` = ?)";
let query = Select::from_table("users").left_join(
"posts".on(("users", "id")
... | rust_cleaned_test_functions.jsonl/52920 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 292
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
81742,
27656,
9579,
31017,
368,
341,
286,
1077,
3601,
18063,
4035,
310,
330,
4858,
1565,
4218,
63,
4908,
4295,
1565,
4218,
63,
21920,
13069,
1565,
12664,
63,
6197,
28654,
4218,
28905,
307,
63,
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_variants() {
serde_test::assert_tokens(&WebhookType::Incoming, &[Token::U8(1)]);
serde_test::assert_tokens(&WebhookType::ChannelFollower, &[Token::U8(2)]);
} | rust_cleaned_test_functions.jsonl/84082 | {
"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,
4612,
62278,
368,
341,
286,
61570,
4452,
486,
2207,
28838,
2099,
5981,
20873,
929,
486,
97564,
11,
44590,
3323,
486,
52,
23,
7,
16,
41958,
286,
61570,
4452,
486,
2207,
28838,
2099,
5981,
20873,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_high_level_sonic_api() {
use pairing::bn256::{Bn256};
use std::time::{Instant};
use bellman::sonic::helped::{
generate_random_parameters,
verify_aggregate,
verify_proofs,
create_proof,
create_advice,
create_aggregate,
get_ci... | rust_cleaned_test_functions.jsonl/61337 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1367
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22680,
8274,
643,
14011,
11697,
368,
341,
262,
990,
47713,
486,
11081,
17,
20,
21,
22964,
33,
77,
17,
20,
21,
2440,
262,
990,
1460,
486,
1678,
22964,
30340,
2440,
262,
990,
28419,
1515,
486,
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_matrix_inverse() {
let matrix: Matrix2x2<f64> = Matrix2x2::new(
5_f64, 1_f64,
1_f64, 5_f64
);
let expected: Matrix2x2<f64> = (1_f64 / 24_f64) * Matrix2x2::new(
5_f64, -1_f64,
-1_f64, 5_f64
);
let result = ... | rust_cleaned_test_functions.jsonl/128971 | {
"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,
10193,
63333,
368,
341,
286,
1077,
6172,
25,
11631,
17,
87,
17,
63895,
21,
19,
29,
284,
11631,
17,
87,
17,
486,
931,
1006,
310,
220,
20,
761,
21,
19,
11,
220,
16,
761,
21,
19,
11,
715,
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_feedback() {
assert_eq!(
signal_feedback(
&[
3, 26, 1001, 26, -4, 26, 3, 27, 1002, 27, 2, 27, 1, 27, 26, 27, 4, 27, 1001,
28, -1, 28, 1005, 28, 6, 99, 0, 0, 5
],
&[9, 8, 7, 6, 5]
... | rust_cleaned_test_functions.jsonl/100799 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 571
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58138,
368,
341,
286,
2060,
10714,
33673,
310,
8286,
58138,
1006,
394,
609,
9640,
503,
220,
18,
11,
220,
17,
21,
11,
220,
16,
15,
15,
16,
11,
220,
17,
21,
11,
481,
19,
11,
220,
17,
21,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_uint32_shr() {
let mut rng = XorShiftRng::from_seed([0x5dbe6259, 0x8d313d76, 0x3237db17, 0xe5bc0654]);
for _ in 0..50 {
for i in 0..60 {
let num = rng.gen();
let a = UInt32::constant(num).shr(i);
let b = UInt32::constan... | rust_cleaned_test_functions.jsonl/28530 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 383
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15807,
18,
17,
3712,
81,
368,
341,
286,
1077,
5206,
28422,
284,
1599,
269,
24841,
49,
968,
486,
1499,
33809,
2561,
15,
87,
20,
83406,
21,
17,
20,
24,
11,
220,
15,
87,
23,
67,
18,
16,
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... | 4 |
#[test]
fn test_iterations_with_second_partial_page() {
// Create an iterator that just return a page of 2 elements
// even if we requested a page of 10 elements.
let it: PageIterator<u64, u64> = PageIterator::new(
Box::new(|key, limit| {
let range_start = key... | rust_cleaned_test_functions.jsonl/114318 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 607
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55607,
6615,
29644,
52068,
6129,
368,
341,
286,
442,
4230,
458,
15091,
429,
1101,
470,
264,
2150,
315,
220,
17,
5424,
198,
286,
442,
1496,
421,
582,
11223,
264,
2150,
315,
220,
16,
15,
5424,
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... | 4 |
#[test]
fn test_three_of_a_kind_ranks() {
test(
&vec!["2S 2H 2C 8D JH", "4S AH AS 8C AD"],
&vec!["4S AH AS 8C AD"],
)
} | rust_cleaned_test_functions.jsonl/121269 | {
"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,
50016,
3575,
4306,
33162,
1710,
4039,
368,
341,
1066,
262,
1273,
1006,
286,
609,
4083,
0,
1183,
17,
50,
220,
17,
39,
220,
17,
34,
220,
23,
35,
619,
39,
497,
330,
19,
50,
47288,
5752,
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_from_u16_for_value() {
assert_eq!(Value::from(u16::MIN), Value::UInt8(0));
assert_eq!(Value::from(255u16), Value::UInt8(255));
assert_eq!(Value::from(256u16), Value::UInt16(256));
assert_eq!(Value::from(u16::MAX), Value::UInt16(u16::MAX));
} | rust_cleaned_test_functions.jsonl/93905 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 150
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
7300,
16,
21,
5478,
3142,
368,
341,
286,
2060,
10714,
10297,
1130,
486,
1499,
8154,
16,
21,
486,
16413,
701,
5162,
486,
18777,
23,
7,
15,
1106,
286,
2060,
10714,
10297,
1130,
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_legal_moves_banmen_with_kyou_nari_7_squares_and_contiguous_opponent_gote() {
test_legal_moves_banmen_with_kin_7_squares_and_contiguous_opponent_gote_impl(GKyouN)
} | rust_cleaned_test_functions.jsonl/81283 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 90
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82324,
45390,
880,
276,
5676,
6615,
4698,
9330,
1089,
2780,
62,
22,
643,
40856,
8378,
10260,
27029,
10287,
1146,
1889,
1272,
368,
972,
18185,
82324,
45390,
880,
276,
5676,
6615,
4698,
258,
62,
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 |
#[test]
fn test_polar_conv() {
fn test(c: Complex64) {
let (r, theta) = c.to_polar();
assert!((c - Complex::from_polar(r, theta)).norm() < 1e-6);
}
for &c in all_consts.iter() {
test(c);
}
} | rust_cleaned_test_functions.jsonl/105678 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 192
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
7417,
22716,
368,
341,
310,
5168,
1273,
1337,
25,
22096,
21,
19,
8,
341,
394,
1077,
320,
81,
11,
18526,
8,
284,
272,
2389,
620,
7417,
543,
394,
2060,
0,
1188,
66,
481,
22096,
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_more() {
let cx = mk_ctxt();
let fnia = FakeNodeIdAssigner;
let lcx = LoweringContext::new(&fnia, None);
roundtrip(lower_item(&lcx, "e_item!(&cx,
fn foo(x: usize, y: usize) -> usize {
let z = x + y;
return z;
}
).unwrap()));
} | rust_cleaned_test_functions.jsonl/37636 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 166
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36664,
368,
341,
262,
1077,
20716,
284,
23789,
93285,
543,
262,
1077,
5168,
685,
284,
36965,
79206,
28933,
261,
280,
262,
1077,
326,
25844,
284,
27536,
287,
1972,
486,
931,
2099,
8822,
685,
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_sign_data() -> Result<(), Box<dyn Error>> {
let credential = get_credential();
let mut threads = Vec::new();
{
let credential = credential.clone();
threads.push(thread::spawn(move || {
assert_eq!(
credential.sign... | rust_cleaned_test_functions.jsonl/84484 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 771
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11172,
1769,
368,
1464,
5714,
68843,
8261,
92846,
4600,
2452,
341,
286,
1077,
40207,
284,
633,
666,
30320,
543,
286,
1077,
5206,
14564,
284,
11312,
486,
931,
543,
286,
341,
310,
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... | 3 |
#[test]
fn test_min_max_short() {
let data = [-1.0, 5.0, 0.0, -3.0, 10.0, -0.5, 4.0];
assert_eq!(data.min(), -3.0);
assert_eq!(data.max(), 10.0);
} | rust_cleaned_test_functions.jsonl/55244 | {
"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,
7260,
6345,
16673,
368,
341,
286,
1077,
821,
284,
10055,
16,
13,
15,
11,
220,
20,
13,
15,
11,
220,
15,
13,
15,
11,
481,
18,
13,
15,
11,
220,
16,
15,
13,
15,
11,
481,
15,
13,
20,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_find_all_refs_for_param_inside() {
let code = r#"
fn foo(i : u32) -> u32 {
i<|>
}"#;
let refs = get_all_refs(code);
assert_eq!(refs.len(), 2);
} | rust_cleaned_test_functions.jsonl/19267 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 109
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
5705,
60638,
5478,
4090,
72860,
368,
341,
262,
1077,
2038,
284,
435,
2,
698,
262,
5168,
15229,
1956,
549,
575,
18,
17,
8,
1464,
575,
18,
17,
341,
286,
600,
27,
91,
397,
262,
335,
5767... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_transaction_payload_with_a_program_canonical_serialization_example() {
let input = TransactionPayload::Script(get_common_program());
let expected_output = vec![
0x02, 0x04, 0x6D, 0x6F, 0x76, 0x65, 0x00, 0x01, 0x01, 0xEF, 0xBE, 0xAD, 0xDE, 0x0D, 0xD0,
0xFE, 0xCA,
];
... | rust_cleaned_test_functions.jsonl/8058 | {
"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,
28884,
32813,
6615,
4306,
25096,
27421,
22391,
25602,
2022,
39304,
368,
341,
262,
1077,
1946,
284,
17869,
29683,
486,
5910,
5433,
21107,
25096,
5231,
262,
1077,
3601,
7645,
284,
7486,
90515,
286,
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_file() {
let f = r#"
a(1);b(2);c(3);
"#;
let results = parse_rules(0, f).unwrap();
assert_eq!(results[0].to_polar(), r#"a(1);"#);
assert_eq!(results[1].to_polar(), r#"b(2);"#);
assert_eq!(results[2].to_polar(), r#"c(3);"#);
} | rust_cleaned_test_functions.jsonl/12188 | {
"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,
21039,
2458,
368,
341,
286,
1077,
282,
284,
435,
2,
698,
286,
264,
7,
16,
1215,
65,
7,
17,
1215,
66,
7,
18,
317,
286,
5869,
280,
286,
1077,
3059,
284,
4715,
21407,
7,
15,
11,
282,
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... | 1 |
#[test]
fn test_column_expand() {
check(
r#"
#[rustc_builtin_macro]
macro_rules! column {() => {}}
fn main() { column!(); }
"#,
expect![[r##"
#[rustc_builtin_macro]
macro_rules! column {() => {}}
fn main() { 0; }
"##]],
);
} | rust_cleaned_test_functions.jsonl/59809 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 134
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8744,
67875,
368,
341,
262,
1779,
1006,
286,
435,
2,
698,
13353,
35788,
66,
73829,
58810,
921,
32606,
21407,
0,
3250,
314,
368,
589,
4687,
630,
8822,
1887,
368,
314,
3250,
0,
2129,
456,
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_keccak512_hash_password() {
let password = "password";
let hash = Keccak512Hasher.hash_str((), password).unwrap();
assert_eq!("a6818b8188b36c44d17784c5551f63accc5deaf8786f9d0ad1ae3cd8d887cbab4f777286dbb315fb14854c8774dc0d10b5567e4a705536cc2a1d61ec0a16a7a6", hash.as_hex(... | rust_cleaned_test_functions.jsonl/101932 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 170
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45476,
84262,
20,
16,
17,
8950,
10122,
368,
341,
286,
1077,
3552,
284,
330,
3833,
3302,
286,
1077,
5175,
284,
6569,
84262,
20,
16,
17,
6370,
261,
15101,
2895,
7,
1507,
3552,
568,
15454,
1428,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_source() {
if let Some(device) = test_get_default_device(Scope::Input) {
if let Ok(source) = get_device_source(device, DeviceType::INPUT) {
println!(
"input: {:X}, {:?}",
source,
convert_uint32_into_string(source)... | rust_cleaned_test_functions.jsonl/113808 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 468
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
9204,
10347,
368,
341,
262,
421,
1077,
4329,
17848,
8,
284,
1273,
3062,
9993,
9204,
3759,
2417,
486,
2505,
8,
341,
286,
421,
1077,
7622,
12437,
8,
284,
633,
9204,
10347,
17848,
11,
13903,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_mode() {
let mode = |x: Weibull| x.mode().unwrap();
test_case(1.0, 0.1, 0.0, mode);
test_case(1.0, 1.0, 0.0, mode);
test_case(10.0, 10.0, 9.8951925820621439264623017041980483215553841533709, mode);
test_case(10.0, 1.0, 0.98951925820621439264623017041980483... | rust_cleaned_test_functions.jsonl/122500 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 193
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7302,
368,
341,
286,
1077,
3856,
284,
760,
87,
25,
1205,
579,
617,
91,
856,
22981,
1005,
15454,
543,
286,
1273,
19096,
7,
16,
13,
15,
11,
220,
15,
13,
16,
11,
220,
15,
13,
15,
11,
3856,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_task_create_bad_contract_id() {
let mut context = get_context(accounts(0));
testing_env!(context.build());
let mut contract = Contract::new();
testing_env!(context
.is_view(false)
.attached_deposit(6000000000040000000200)
.prede... | rust_cleaned_test_functions.jsonl/42993 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 359
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12184,
8657,
34199,
51499,
842,
368,
341,
286,
1077,
5206,
2266,
284,
633,
8467,
91868,
7,
15,
1106,
286,
7497,
15879,
10297,
2147,
13239,
1423,
286,
1077,
5206,
5116,
284,
19185,
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_find_all_refs_decl_module_on_self_crate_root() {
check(
r#"
//- /lib.rs
use self$0;
"#,
expect![[r#"
Module FileID(0) 0..10
(no references)
"#]],
);
} | rust_cleaned_test_functions.jsonl/92259 | {
"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,
21814,
5705,
60638,
35814,
10750,
4470,
25637,
666,
7698,
12993,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
61463,
608,
2740,
25638,
198,
810,
656,
3,
15,
280,
57676,
345,
310,
1720,
0,
15505,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ys_to_stdout() {
let output: Vec<_> = String::from("y\n").bytes().cycle().take(1024).collect();
let output = String::from_utf8(output).unwrap();
new_ucmd!()
.args(&["status=none", "if=y-nl-1k.txt"])
.run()
.no_stderr()
.stdout_is(output)
.succ... | rust_cleaned_test_functions.jsonl/59394 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 164
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
1047,
2346,
67416,
368,
341,
262,
1077,
2550,
25,
11312,
32399,
29,
284,
923,
486,
1499,
445,
88,
1699,
1827,
9651,
1005,
21621,
1005,
22769,
7,
16,
15,
17,
19,
568,
17384,
543,
262,
1077,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_reader_non_ascii_sequence() {
let mut reader = Reader::new(&b">id\nACGTA\xE2\x98\xB9AT\n"[..]);
let mut record = Record::new();
reader.read(&mut record).unwrap();
assert!(
record.check().is_err(),
"check() should return Err if FASTA sequenc... | rust_cleaned_test_functions.jsonl/62824 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 172
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22306,
21637,
50238,
23735,
368,
341,
286,
1077,
5206,
6604,
284,
25166,
486,
931,
2099,
65,
755,
307,
1699,
1706,
38,
15204,
3462,
36,
17,
3462,
24,
23,
3462,
33,
24,
828,
1699,
36864,
496,
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_parsing_empty_binary() {
let v = vec![];
let mut c = RetainingConsumer::new();
let p = Parser::new(&v, &mut c);
assert_matches!(p.parse(),
Err(State::HeaderIncomplete(DecodeError::StreamExpected(0))));
} | rust_cleaned_test_functions.jsonl/85730 | {
"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,
620,
28598,
15124,
31761,
368,
341,
286,
1077,
348,
284,
7486,
0,
15078,
286,
1077,
5206,
272,
284,
10392,
2056,
29968,
486,
931,
543,
286,
1077,
281,
284,
21102,
486,
931,
2099,
85,
11,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_agg_trades() {
let text =
BinanceLinearRestClient::fetch_agg_trades("BTCUSDT_211231", None, None, None).unwrap();
assert!(text.starts_with("[{"));
} | rust_cleaned_test_functions.jsonl/95411 | {
"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,
83534,
3547,
3452,
368,
341,
286,
1077,
1467,
4035,
310,
425,
24387,
31898,
12416,
2959,
486,
9641,
83534,
3547,
3452,
445,
59118,
2034,
10599,
62,
17,
16,
16,
17,
18,
16,
497,
2240,
11,
2240,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_authorize() {
let authority_address = solana_sdk::pubkey::new_rand();
let authority_address_2 = solana_sdk::pubkey::new_rand();
let stake_address = solana_sdk::pubkey::new_rand();
let stake_lamports = 42;
let stake_account = AccountSharedData::new_data_wit... | rust_cleaned_test_functions.jsonl/31635 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3141
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22938,
551,
368,
341,
286,
1077,
11198,
6744,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
11198,
6744,
62,
17,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
3386... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_all_tabs_should_advance_to_next_tab_stops() {
new_ucmd!()
.args(&["-w16", "tab_stops.input"])
.succeeds()
.stdout_is_fixture("tab_stops_w16.expected");
} | rust_cleaned_test_functions.jsonl/23278 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5705,
57953,
43378,
98093,
2346,
11257,
17344,
1261,
3721,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
12,
86,
16,
21,
497,
330,
6192,
1261,
3721,
10046,
14108,
286,
659... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_imported() {
let import = imported("package:http/http.dart");
let import2 = imported("package:http/http.dart");
let import_alias = imported("package:http/http.dart").alias("h2");
let import_relative = imported("../http.dart");
let toks = toks![
... | rust_cleaned_test_functions.jsonl/33191 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 457
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18434,
291,
368,
341,
286,
1077,
1159,
284,
24928,
445,
1722,
69459,
15627,
6800,
797,
286,
1077,
1159,
17,
284,
24928,
445,
1722,
69459,
15627,
6800,
797,
286,
1077,
1159,
35947,
284,
24928,
445,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_create_new_ledger() {
let mint_total = 1_000_000_000_000;
let GenesisConfigInfo { genesis_config, .. } = create_genesis_config(mint_total);
let (ledger_path, _blockhash) = create_new_tmp_ledger!(&genesis_config);
let ledger = Blockstore::open(&ledger_path).unwrap(... | rust_cleaned_test_functions.jsonl/7591 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 280
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
5921,
38367,
1389,
368,
341,
286,
1077,
28337,
10784,
284,
220,
16,
62,
15,
15,
15,
62,
15,
15,
15,
62,
15,
15,
15,
62,
15,
15,
15,
280,
286,
1077,
40788,
2648,
1731,
314,
59366,
533... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_text() {
{
assert_eq!(
text().parse("Hello World"),
Ok((Text::new("Hello World".to_string()), ""))
);
}
{
assert_eq!(
text().parse("Hello World<"),
Ok((Text::new("Hel... | rust_cleaned_test_functions.jsonl/134148 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 231
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
4326,
368,
341,
286,
341,
310,
2060,
10714,
33673,
394,
1467,
1005,
6400,
445,
9707,
4337,
4461,
394,
7622,
1188,
1178,
486,
931,
445,
9707,
4337,
3263,
983,
3904,
11858,
77561,
310,
1439,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compress_decompress_lorem_round() {
let lorem = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod \
tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At \
vero eos et accusam et justo duo dolores et ea... | rust_cleaned_test_functions.jsonl/49845 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 493
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
87845,
2259,
38360,
5560,
1826,
29896,
368,
341,
262,
1077,
92385,
284,
330,
32783,
26342,
23655,
2444,
27212,
11,
390,
746,
31841,
12421,
573,
2388,
287,
655,
21561,
11,
10923,
12757,
2477,
372,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_product_into_bytes() {
let builder = ProductBuilder::new();
let original = builder
.with_product_id("688955434684".into())
.with_product_namespace(ProductNamespace::GS1)
.with_owner("Target".into())
.with_properties(make_properties(... | rust_cleaned_test_functions.jsonl/84857 | {
"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,
9840,
45514,
12524,
368,
341,
286,
1077,
7363,
284,
5643,
3297,
486,
931,
543,
286,
1077,
4024,
284,
7363,
198,
310,
659,
4197,
9840,
842,
445,
21,
23,
23,
24,
20,
20,
19,
18,
19,
21,
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_is_valid_correct() {
let passwords = &[
("1-3 a: abcde", true),
("1-3 b: cdefg", false),
("2-9 c: ccccccccc", false),
];
for &(p, is_valid_correct) in passwords {
assert_eq!(
PasswordEntry::from_str(p).unwra... | rust_cleaned_test_functions.jsonl/111553 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 238
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
8337,
31550,
368,
341,
286,
1077,
33716,
284,
609,
9640,
310,
3489,
16,
12,
18,
264,
25,
39022,
450,
497,
830,
1326,
310,
3489,
16,
12,
18,
293,
25,
272,
750,
70,
497,
895,
1326,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_backup3() {
let mut t = make_parser();
assert_eq!(t.next().and_then(|n| Some(n.typ)), Some(ItemType::ItemText));
let t0 = t.next().unwrap();
let t1 = t.next().unwrap();
let t2 = t.next().unwrap();
assert_eq!(t0.typ, ItemType::ItemLeftDelim);
... | rust_cleaned_test_functions.jsonl/8626 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 402
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44710,
18,
368,
341,
286,
1077,
5206,
259,
284,
1281,
18517,
543,
286,
2060,
10714,
10297,
83,
4529,
1005,
437,
68367,
22428,
77,
91,
4329,
1445,
49286,
5731,
4329,
29771,
929,
486,
1234,
1178,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_slice_reader_vectored() {
let in_buf = vec![0, 1, 2, 3, 4, 5, 6, 7];
let reader = &mut &in_buf[..];
let mut buf = [];
assert_eq!(reader.read_vectored(&mut [IoSliceMut::new(&mut buf)]).unwrap(), 0);
let mut buf = [0];
assert_eq!(
reader
... | rust_cleaned_test_functions.jsonl/78191 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 590
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26488,
22306,
59402,
3018,
368,
341,
286,
1077,
304,
10363,
284,
7486,
20703,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
11,
220,
22,
935,
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_transaction_byte_offset_constants() {
assert_eq!(SIGNATURE_FRAGMENTS.2 / 3 * 2, SIGNATURE_FRAGMENTS.4);
assert_eq!(EXTRA_DATA_DIGEST.2 / 3 * 2, EXTRA_DATA_DIGEST.4);
assert_eq!(ADDRESS.2 / 3 * 2, ADDRESS.4);
assert_eq!(VALUE.2 / 3 * 2, VALUE.4);
assert_eq!... | rust_cleaned_test_functions.jsonl/77256 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 682
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28884,
19737,
6917,
55642,
368,
341,
286,
2060,
10714,
10297,
54072,
14870,
14220,
1890,
28763,
13,
17,
608,
220,
18,
353,
220,
17,
11,
43172,
14870,
14220,
1890,
28763,
13,
19,
317,
286,
2060,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_negated_or() {
new_ucmd!()
.args(&["!", "foo", "-o", "bar"])
.run()
.status_code(1);
new_ucmd!().args(&["foo", "-o", "!", "bar"]).succeeds();
new_ucmd!()
.args(&["!", "foo", "-o", "!", "bar"])
.run()
.status_code(1);
} | rust_cleaned_test_functions.jsonl/10982 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 171
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28209,
657,
8734,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
18789,
330,
7975,
497,
6523,
78,
497,
330,
2257,
14108,
286,
659,
6108,
741,
286,
659,
2829,
4136,
7,
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_put() {
let c = Constant {
tpe: SType::SBoolean,
v: ConstantVal::Boolean(true),
};
let mut s = ConstantStore::empty();
s.put(c.clone());
assert!(s.get(0).is_some());
assert_eq!(s.get(0).unwrap().clone(), c);
assert!(... | rust_cleaned_test_functions.jsonl/51337 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 220
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15557,
368,
341,
286,
1077,
272,
284,
19305,
341,
310,
259,
375,
25,
328,
929,
486,
50,
6890,
345,
310,
348,
25,
19305,
2208,
486,
6890,
3715,
1326,
286,
2605,
286,
1077,
5206,
274,
284,
19305... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_zip321_spec_valid_examples() {
let valid_1 = "zcash:ytestsapling1qqqqqqqqqqqqqqqqqrjq05nyfku05msvu49mawhg6kr0wwljahypwyk2h88z6975u563j9k7cxg?amount=1&memo=VGhpcyBpcyBhIHNpbXBsZSBtZW1vLg&message=Thank%20you%20for%20your%20purchase";
let v1r = TransactionRequest::from_uri(&TEST_NET... | rust_cleaned_test_functions.jsonl/81785 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1093
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42131,
18,
17,
16,
13594,
8337,
45279,
368,
341,
286,
1077,
2697,
62,
16,
284,
330,
34968,
988,
69203,
23841,
391,
2718,
16,
27579,
27579,
27579,
27579,
27579,
27579,
27579,
27579,
23004,
43915,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_components_iter() {
macro_rules! t(
(s: $path:expr, $exp:expr) => (
{
let path = Path::new($path);
let comps = path.components().collect::<Vec<&[u8]>>();
let exp: &[&str] = $exp;
l... | rust_cleaned_test_functions.jsonl/105890 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1270
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23258,
11723,
368,
341,
286,
18072,
21407,
0,
259,
1006,
310,
320,
82,
25,
400,
2343,
96011,
11,
400,
4580,
96011,
8,
589,
2399,
394,
341,
503,
1077,
1815,
284,
7933,
486,
931,
699,
2343,
317,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_handle_and_sign_get_publickey() {
ProtocolTester::apply(|mut pt| {
let mut buf = vec![];
PubKeyMsg {
pub_key_ed25519: vec![],
}.encode(&mut buf)
.unwrap();
pt.write_all(&buf).unwrap();
// receive response:
let mut resp_bu... | rust_cleaned_test_functions.jsonl/100206 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 394
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10630,
8378,
11172,
3062,
27074,
792,
368,
341,
262,
24572,
58699,
486,
10280,
22428,
6984,
10817,
91,
341,
286,
1077,
5206,
6607,
284,
7486,
0,
40901,
286,
22611,
1592,
6611,
341,
310,
6675,
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 |
#[test]
fn test_state() {
let mut app = App::with_state(10)
.resource("/", |r| r.f(|_| HttpResponse::Ok()))
.finish();
let req =
HttpRequest::default().with_state(Rc::clone(&app.state), app.router.clone());
let resp = app.run(req);
assert_eq!(r... | rust_cleaned_test_functions.jsonl/24268 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 184
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4387,
368,
341,
286,
1077,
5206,
906,
284,
1845,
486,
4197,
4387,
7,
16,
15,
340,
310,
659,
9233,
35460,
760,
81,
91,
435,
833,
22428,
35395,
17580,
486,
11578,
12145,
310,
659,
30150,
543,
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_macro_helper() {
let mut hbs = Handlebars::new();
hbs.register_helper("lower", Box::new(lower));
hbs.register_helper("upper", Box::new(upper));
hbs.register_helper("hex", Box::new(hex));
let data = json!("Teixeira");
assert_eq!(
hbs.render_template("{{lower thi... | rust_cleaned_test_functions.jsonl/59644 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 253
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58810,
10418,
368,
341,
262,
1077,
5206,
305,
1279,
284,
13760,
24950,
486,
931,
1428,
262,
305,
1279,
9929,
10418,
445,
14772,
497,
8261,
486,
931,
71064,
1106,
262,
305,
1279,
9929,
10418,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_find_all_refs_macro_def() {
check(
r#"
#[macro_export]
macro_rules! m1<|> { () => (()) }
fn foo() {
m1();
m1();
}
"#,
expect![[r#"
m1 Macro FileId(0) 0..46 29..31 Other
FileId(0) 63..65 StructLiteral
FileId... | rust_cleaned_test_functions.jsonl/47780 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 237
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
5705,
60638,
58810,
7844,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
13353,
32606,
27114,
921,
32606,
21407,
0,
296,
16,
27,
91,
29,
314,
1719,
589,
320,
2140,
555,
8822,
15229,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_duration_any_value() {
let test_cases = vec![
(vec![], None),
(
vec![Duration::from_millis(10, 0).unwrap()],
Some(Duration::from_millis(10, 0).unwrap()),
),
(
vec![
Duratio... | rust_cleaned_test_functions.jsonl/59405 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 682
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25454,
37248,
3142,
368,
341,
286,
1077,
1273,
41427,
284,
7486,
90515,
310,
320,
4083,
0,
12995,
2240,
1326,
310,
2399,
394,
7486,
20703,
12945,
486,
1499,
717,
56212,
7,
16,
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... | 2 |
#[test]
fn test_transcribes_all_dna_to_rna() {
assert_eq!(Ok(dna::RNA::new("UGCACCAGAAUU")), dna::DNA::new("ACGTGGTCTTAA").to_rna())
} | rust_cleaned_test_functions.jsonl/107200 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 76
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7965,
55136,
5705,
814,
3376,
2346,
1710,
3376,
368,
341,
262,
2060,
10714,
10297,
11578,
1500,
3376,
486,
30720,
486,
931,
445,
60902,
29442,
1890,
6029,
86564,
35674,
75334,
486,
55320,
486,
931,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_large_num_coding() {
solana_logger::setup();
let slot = 1;
let (_data_shreds, mut coding_shreds, leader_schedule_cache) =
setup_erasure_shreds(slot, 0, 100);
let blockstore_path = get_tmp_ledger_path!();
{
let blockstore = Blockstor... | rust_cleaned_test_functions.jsonl/7636 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 490
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45228,
4273,
666,
3700,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
9446,
284,
220,
16,
280,
286,
1077,
5453,
691,
3712,
53369,
11,
5206,
10822,
3712,
53369,
11,
7653,
34530,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_eu4_ita1() {
let data = utils::request("ita1.eu4");
let (save, encoding) = Eu4Extractor::extract_save(Cursor::new(&data[..])).unwrap();
assert_eq!(encoding, Encoding::BinZip);
assert_eq!(save.meta.player, "ITA".parse().unwrap());
let settings = &save.game.gameplay_settings.op... | rust_cleaned_test_functions.jsonl/97710 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 554
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2204,
84,
19,
62,
6255,
16,
368,
341,
262,
1077,
821,
284,
12439,
486,
2035,
445,
6255,
16,
35003,
19,
797,
262,
1077,
320,
6628,
11,
11170,
8,
284,
21963,
19,
56118,
486,
23493,
15376,
3025,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_barrier() {
enter_runtime_call(|| {
const N: usize = 10;
let barrier = Arc::new(Barrier::new(N));
let tasks: Vec<_> = (0..N - 1)
.map(|_| {
let b = barrier.clone();
Task::new(move || b.wait().is_leader(), &[])
... | rust_cleaned_test_functions.jsonl/128025 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 431
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82355,
368,
341,
262,
3725,
33232,
13429,
79453,
341,
286,
733,
451,
25,
22301,
284,
220,
16,
15,
401,
286,
1077,
22103,
284,
19689,
486,
931,
7,
33038,
486,
931,
8204,
3237,
286,
1077,
9079,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_qualify_path_nested() {
check_assist(
add_missing_impl_members,
r#"
mod foo {
pub struct Bar<T>;
pub struct Baz;
trait Foo { fn foo(&self, bar: Bar<Baz>); }
}
struct S;
impl foo::Foo for S { <|> }"#,
r#"
mod foo {
pub struct Bar<T>;
... | rust_cleaned_test_functions.jsonl/110448 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 271
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64391,
1437,
2638,
66279,
368,
341,
286,
1779,
12083,
380,
1006,
310,
912,
40447,
21007,
30397,
345,
310,
435,
2,
698,
2593,
15229,
341,
262,
6675,
2036,
4716,
3125,
10133,
262,
6675,
2036,
91711,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_transpile_tsx() {
let specifier =
ModuleSpecifier::parse("https://deno.land/x/mod.ts").unwrap();
let source = r#"
export class A {
render() {
return <div><span></span></div>
}
}
"#;
let module = parse_module(ParseParams {
specifier: specifi... | rust_cleaned_test_functions.jsonl/133955 | {
"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,
7965,
12192,
25023,
87,
368,
341,
262,
1077,
97616,
4035,
414,
13711,
87297,
486,
6400,
445,
2428,
1110,
5183,
78,
87627,
10776,
38479,
21288,
1827,
15454,
543,
262,
1077,
2530,
284,
435,
2,
698,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ban_time() {
let mut score = RealScore::default();
let now = Instant::now();
let change = MIN_SCORE_BEFORE_BAN;
score.test_add(change);
assert_eq!(score.score(), MIN_SCORE_BEFORE_BAN);
score.update_at(now + BANNED_BEFORE_DECAY);
assert_eq... | rust_cleaned_test_functions.jsonl/93740 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 238
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
276,
3009,
368,
341,
286,
1077,
5206,
5456,
284,
8800,
10570,
486,
2258,
543,
286,
1077,
1431,
284,
18058,
486,
3328,
1428,
286,
1077,
2297,
284,
16701,
63727,
82218,
1668,
1093,
280,
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_convert_anykey() {
let secp256k1 = Secp256k1::new();
let (secp_privkey, secp_pubkey) = secp256k1.generate_keypair(&mut thread_rng()).unwrap();
let mut secret = [0u8; 32];
for i in 0..32 {
secret[i] = secp_privkey[i];
}
let seckey = SecretKey::parse(&secret).unwr... | rust_cleaned_test_functions.jsonl/129813 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 614
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
37248,
792,
368,
341,
262,
1077,
511,
4672,
17,
20,
21,
74,
16,
284,
4520,
79,
17,
20,
21,
74,
16,
486,
931,
543,
262,
1077,
320,
325,
4672,
24726,
792,
11,
511,
4672,
34014,
792,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_print_transfer_for_protocol() {
let mut rng = XorShiftRng::from_seed([1, 2, 3, 4]);
let key = gen_pk_and_msg().0;
let transfer = Transfer::new_signed(
gen_account_id(&mut rng),
Address::from(rng.gen::<[u8; 20]>()),
Address::from(rng.gen::<[u8; 20]>()),
... | rust_cleaned_test_functions.jsonl/118954 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 986
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10064,
35403,
5478,
34880,
368,
341,
262,
1077,
5206,
28422,
284,
1599,
269,
24841,
49,
968,
486,
1499,
33809,
2561,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
2558,
262,
1077,
1376,
284,
4081... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_should_report_invalid_number_with_interior_junk() {
// GNU numfmt reports this as “invalid suffix”
new_ucmd!()
.args(&["--from=auto"])
.pipe_in("1x0K")
.run()
.stderr_is("numfmt: invalid number: '1x0K'\n");
} | rust_cleaned_test_functions.jsonl/46006 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 141
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43378,
14813,
31433,
5500,
6615,
15318,
2462,
5374,
3122,
368,
341,
262,
442,
4253,
1629,
12501,
6682,
419,
438,
1036,
11808,
20525,
88774,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
118... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_exceed_deadline() {
let engine = TestEngineBuilder::new().build().unwrap();
let read_pool = ReadPool::from(build_read_pool_for_test(
&CoprReadPoolConfig::default_for_test(),
engine,
));
let cm = ConcurrencyManager::new(1.into());
le... | rust_cleaned_test_functions.jsonl/83662 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 852
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2702,
4635,
53427,
1056,
368,
341,
286,
1077,
4712,
284,
3393,
4571,
3297,
486,
931,
1005,
5834,
1005,
15454,
543,
286,
1077,
1349,
15709,
284,
4457,
10551,
486,
1499,
43333,
6443,
15709,
5478,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_windows_guest_disk_hotplug() {
let windows_guest = WindowsGuest::new();
let mut ovmf_path = dirs::home_dir().unwrap();
ovmf_path.push("workloads");
ovmf_path.push(OVMF_NAME);
let tmp_dir = TempDir::new_with_prefix("/tmp/ch").unwrap();
let api_soc... | rust_cleaned_test_functions.jsonl/26188 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1751
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58220,
62739,
41687,
33433,
47474,
368,
341,
286,
1077,
11030,
62739,
284,
5515,
37804,
486,
931,
1428,
286,
1077,
5206,
297,
7338,
69,
2638,
284,
42248,
486,
5117,
4334,
1005,
15454,
543,
286,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_node_compact_count_limit() {
let count = 5;
let mut cluster = new_node_cluster(0, count);
test_compact_count_limit(&mut cluster);
} | rust_cleaned_test_functions.jsonl/80552 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 70
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5084,
18177,
531,
3180,
14763,
368,
341,
262,
1077,
1760,
284,
220,
20,
280,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
1760,
317,
262,
1273,
18177,
531,
3180,
14763,
2099,
6984,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_ucomisd() {
assert_emit!(0x66, 0x0f, 0x2e, 0xc8; ucomisd(XMM1, XMM0));
assert_emit!(0x66, 0x44, 0x0f, 0x2e, 0xfb; ucomisd(XMM15, XMM3));
assert_emit!(0x66, 0x41, 0x0f, 0x2e, 0xe0; ucomisd(XMM4, XMM8));
} | rust_cleaned_test_functions.jsonl/85504 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 164
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7300,
874,
20640,
368,
341,
286,
2060,
69082,
10297,
15,
87,
21,
21,
11,
220,
15,
87,
15,
69,
11,
220,
15,
87,
17,
68,
11,
220,
15,
8148,
23,
26,
575,
874,
20640,
7644,
8035,
16,
11,
159... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_undo_commit_empty_repo() {
let (_td, repo) = repo_init().unwrap();
let root = repo.path().parent().unwrap();
let repo_path = root.as_os_str().to_str().unwrap();
// expect to fail
assert!(undo_last_commit(repo_path).is_err());
} | rust_cleaned_test_functions.jsonl/87756 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 110
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
98940,
36346,
15124,
37784,
368,
341,
197,
10217,
5453,
1296,
11,
15867,
8,
284,
15867,
6137,
1005,
15454,
543,
197,
10217,
3704,
284,
15867,
3875,
1005,
3765,
1005,
15454,
543,
197,
10217,
15867,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_into_reverse() {
let h1 = hlist![true, "hi"];
let h2 = hlist![1, 32f32];
assert_eq!(h1.into_reverse(), hlist!["hi", true]);
assert_eq!(h2.into_reverse(), hlist![32f32, 1]);
} | rust_cleaned_test_functions.jsonl/24753 | {
"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,
45514,
43277,
368,
341,
286,
1077,
305,
16,
284,
305,
1607,
20703,
1866,
11,
330,
6023,
6332,
286,
1077,
305,
17,
284,
305,
1607,
20703,
16,
11,
220,
18,
17,
69,
18,
17,
935,
286,
2060,
1071... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_infer_channels() {
let mut op = Conv::default(); // NCHW - OIHW
let ifact = InferenceFact::dt_shape(DatumType::F32, shapefactoid!(1, 2, 1, 1));
let kfact = InferenceFact::dt_shape(DatumType::F32, shapefactoid!(3, 2, 1, 1));
let ofact = InferenceFact::default();
... | rust_cleaned_test_functions.jsonl/51972 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 274
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
802,
19291,
368,
341,
286,
1077,
5206,
1179,
284,
28988,
486,
2258,
2129,
442,
451,
2149,
54,
481,
506,
40,
38252,
198,
286,
1077,
421,
531,
284,
758,
2202,
17417,
486,
8047,
13597,
5432,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_same() {
let x = b"AGCTCGATCGATCGATC";
let y = b"AGCTCGATCGATCGATC";
let emission_params = TestEmissionParams { x, y };
let gap_params = TestGapParams;
let mut pair_hmm = PairHMM::new();
let p = pair_hmm.prob_related(&gap_params, &emission_params... | rust_cleaned_test_functions.jsonl/35190 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 210
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33574,
368,
341,
286,
1077,
856,
284,
293,
1,
1890,
1162,
8798,
828,
8798,
828,
8798,
828,
34,
876,
286,
1077,
379,
284,
293,
1,
1890,
1162,
8798,
828,
8798,
828,
8798,
828,
34,
3302,
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_signal_sigaction() {
let _m = ::SIGNAL_MTX.lock().expect("Mutex got poisoned by another test");
let action_handler = SigHandler::SigAction(test_sigaction_action);
assert_eq!(unsafe { signal(Signal::SIGINT, action_handler) }.unwrap_err(), Error::UnsupportedOperation);
} | rust_cleaned_test_functions.jsonl/32450 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 114
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21137,
29252,
1311,
368,
341,
262,
1077,
716,
76,
284,
3504,
50,
17754,
1245,
22867,
21003,
1005,
17119,
445,
38099,
2684,
70498,
553,
2441,
1273,
3071,
262,
1077,
1917,
10183,
284,
41560,
3050,
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_with_positive_prob() {
let positive_prob = 0.9;
let node = IsingNode::with_positive_prob(positive_prob).unwrap();
let prob_ratio: f64 = (node.potential(1) - node.potential(0)).exp();
let expected_prob_ratio = 0.9 / 0.1;
assert!((prob_ratio - expected_prob_... | rust_cleaned_test_functions.jsonl/118922 | {
"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,
6615,
54160,
20794,
368,
341,
286,
1077,
6785,
20794,
284,
220,
15,
13,
24,
280,
286,
1077,
2436,
284,
2160,
287,
1955,
486,
4197,
54160,
20794,
7,
30487,
20794,
568,
15454,
543,
286,
1077,
3566... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pretty_format_batches() -> Result<()> {
// define a schema.
let schema = Arc::new(Schema::new(vec![
Field::new("a", DataType::Utf8, true),
Field::new("b", DataType::Int32, true),
]));
// define data.
let batch = RecordBatch::try_ne... | rust_cleaned_test_functions.jsonl/5235 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 770
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
21322,
8955,
57755,
368,
1464,
5714,
71698,
341,
286,
442,
6979,
264,
10802,
624,
286,
1077,
10802,
284,
19689,
486,
931,
3759,
3416,
486,
931,
25592,
90515,
310,
8601,
486,
931,
445,
64,
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_block_cbs16() {
new_ucmd!()
.args(&["conv=block", "cbs=16"])
.pipe_in_fixture("dd-block-cbs16.test")
.succeeds()
.stdout_is_fixture_bytes("dd-block-cbs16.spec");
} | rust_cleaned_test_functions.jsonl/99842 | {
"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,
7113,
666,
1279,
16,
21,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
12027,
28,
4574,
497,
330,
66,
1279,
28,
16,
21,
14108,
286,
659,
13768,
1243,
74409,
445,
631,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_top_level_ctx_enum() {
let test_data = [0x01_u8, 0x03];
let (rest, ret_read) = samples::TopLevelCtxEnum::read(test_data.view_bits(), (1, 2)).unwrap();
assert!(rest.is_empty());
assert_eq!(ret_read, samples::TopLevelCtxEnum::VariantA(0x06));
let ret_write = ret_read.write((1,... | rust_cleaned_test_functions.jsonl/123235 | {
"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,
10426,
8274,
15147,
31054,
368,
341,
262,
1077,
1273,
1769,
284,
508,
15,
87,
15,
16,
7300,
23,
11,
220,
15,
87,
15,
18,
935,
262,
1077,
320,
3927,
11,
2112,
6443,
8,
284,
10469,
486,
5366,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_response() {
let s = "HTTP/1.1 200 OK\r\n\
Content-Length: 18\r\n\
Server: GWS/2.0\r\n\
Date: Sat, 11 Jan 2003 02:44:04 GMT\r\n\
Content-Type: text/html\r\n\
Cache-control: private\r\n\
Set-Cookie: 1P_JAR=2019-11-21-07; expires=Sat, 21-Dec-... | rust_cleaned_test_functions.jsonl/111727 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 335
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
9655,
368,
341,
220,
1077,
274,
284,
330,
9230,
14,
16,
13,
16,
220,
17,
15,
15,
10402,
12016,
1699,
5661,
286,
8883,
52493,
25,
220,
16,
23,
12016,
1699,
5661,
286,
8422,
25,
479,
74... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_collect_vote_lockouts_sums() {
//two accounts voting for slot 0 with 1 token staked
let accounts = gen_stakes(&[(1, &[0]), (1, &[0])]);
let epoch_stakes = EpochStakes::new_from_stakes(0, &accounts);
let tower = Tower::new(epoch_stakes, 0, 0.67);
let ancest... | rust_cleaned_test_functions.jsonl/113927 | {
"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,
68140,
54360,
9818,
11672,
643,
6237,
368,
341,
286,
442,
19789,
9618,
15668,
369,
9446,
220,
15,
448,
220,
16,
3950,
357,
7741,
198,
286,
1077,
9618,
284,
4081,
1261,
2050,
2099,
9697,
16,
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_asciidoc_header() {
let conms: Vec<u8> = "| Command | Mean [ms] | Min…Max [ms]\n".bytes().collect();
let cons: Vec<u8> = "| Command | Mean [s] | Min…Max [s]\n".bytes().collect();
let genms = table_header(Unit::MilliSecond);
let gens = table_header(Unit::Second);
assert_eq!(c... | rust_cleaned_test_functions.jsonl/26769 | {
"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,
88474,
54483,
509,
8757,
368,
341,
262,
1077,
390,
1011,
25,
11312,
34837,
23,
29,
284,
25203,
7348,
760,
16327,
508,
1011,
60,
760,
3386,
1940,
5974,
508,
1011,
17960,
77,
3263,
9651,
1005,
173... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cluster_partition_1_2() {
let empty = |_: &mut LocalCluster| {};
let on_partition_resolved = |cluster: &mut LocalCluster| {
cluster.check_for_new_roots(16, &"PARTITION_TEST");
};
run_cluster_partition(&[&[1], &[1, 1]], None, empty, on_partition_resolved)
} | rust_cleaned_test_functions.jsonl/35986 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 138
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28441,
43840,
62,
16,
62,
17,
368,
341,
262,
1077,
4287,
284,
760,
23211,
609,
6984,
8774,
28678,
91,
9321,
262,
1077,
389,
43840,
4918,
8731,
284,
760,
18855,
25,
609,
6984,
8774,
28678,
91,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_restore_ignore_snapshot() {
let l = default_logger();
let previous_ents = vec![empty_entry(1, 1), empty_entry(1, 2), empty_entry(1, 3)];
let commit = 1u64;
let mut sm = new_test_raft(1, vec![1, 2], 10, 1, new_storage(), &l);
sm.raft_log.append(&previous_ents);
sm.raft_log... | rust_cleaned_test_functions.jsonl/19140 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 286
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62677,
58493,
53265,
368,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
1077,
3681,
62,
805,
284,
7486,
20703,
3194,
9078,
7,
16,
11,
220,
16,
701,
4287,
9078,
7,
16,
11,
220,
17,
701,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_correct_scroll_position() {
let items = string_vec_to_status(&[
"a/b/b1",
"a/b/b2",
"a/c/c1",
]);
//0 a/
//1 b/
//2 b1
//3 b2
//4 c/
//5 c1
// Set up test terminal
let test_backend = tui::backend::TestBackend::new(100, 100);
let mut terminal = tu... | rust_cleaned_test_functions.jsonl/122436 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 431
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31550,
41407,
9661,
368,
341,
197,
10217,
3589,
284,
914,
13251,
2346,
4773,
2099,
9640,
298,
197,
56693,
3470,
3470,
16,
497,
715,
298,
197,
56693,
3470,
3470,
17,
497,
715,
298,
197,
56693,
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_dim_extended_fixed_length_string() {
assert_eq!(
linter_ok("DIM A AS STRING * 5"),
vec![TopLevelToken::Statement(Statement::Dim(
DimNameBuilder::new()
.bare_name("A")
.dim_type(DimType::FixedLengthString(
Express... | rust_cleaned_test_functions.jsonl/122470 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 282
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10791,
61678,
37839,
5118,
3904,
368,
341,
262,
2060,
10714,
33673,
286,
326,
2245,
19817,
445,
75119,
362,
5752,
35255,
353,
220,
20,
4461,
286,
7486,
20703,
5366,
4449,
3323,
486,
8636,
7,
8636,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_help() -> Result<(), Box<dyn std::error::Error>> {
setup()?;
let mut dynein_cmd = Command::cargo_bin("dy")?;
let cmd = dynein_cmd.arg("--help");
cmd.assert()
.success()
.stdout(predicate::str::contains("dynein is a command line tool"));
Ok(())
} | rust_cleaned_test_functions.jsonl/37970 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 138
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26926,
368,
1464,
5714,
68843,
8261,
92846,
1460,
486,
841,
486,
1454,
2452,
341,
262,
6505,
94136,
262,
1077,
5206,
13955,
811,
258,
11684,
284,
7348,
486,
66715,
21816,
445,
10258,
899,
37445,
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... | 3 |
#[test]
fn test_get_valid_float_prefix() {
let cases = vec![
("-100", "-100"),
("1abc", "1"),
("-1-1", "-1"),
("+1+1", "+1"),
("123..34", "123."),
("123.23E-10", "123.23E-10"),
("1.1e1.3", "1.1e1"),
("11e1.3"... | rust_cleaned_test_functions.jsonl/78149 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 478
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
8337,
17586,
13974,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
98670,
16,
15,
15,
497,
6523,
16,
15,
15,
4461,
310,
3489,
16,
13683,
497,
330,
16,
4461,
310,
98670,
16,
12,
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... | 2 |
#[test]
fn test_insert() {
Python::with_gil(|py| {
let list = PyList::new(py, &[2, 3, 5, 7]);
let val = 42i32.to_object(py);
let val2 = 43i32.to_object(py);
assert_eq!(4, list.len());
assert_eq!(2, list[0].extract::<i32>().unwrap());
... | rust_cleaned_test_functions.jsonl/108624 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 361
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
368,
341,
286,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
341,
310,
1077,
1140,
284,
5355,
852,
486,
931,
46827,
11,
44590,
17,
11,
220,
18,
11,
220,
20,
11,
220,
22,
2558,
310,
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_view_matrix() {
let mut transform = Transform::default();
transform.set_xyz(5.0, 70.1, 43.7);
transform.set_scale(1.0, 5.0, 8.9);
transform.set_rotation(
UnitQuaternion::rotation_between(&Vector3::new(-1., 1., 2.), &Vector3::new(1., 0., 0.))
... | rust_cleaned_test_functions.jsonl/126186 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 253
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7122,
10193,
368,
341,
286,
1077,
5206,
5165,
284,
15226,
486,
2258,
543,
286,
5165,
980,
64974,
7,
20,
13,
15,
11,
220,
22,
15,
13,
16,
11,
220,
19,
18,
13,
22,
317,
286,
5165,
980,
16727... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.