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_message_serialization() {
let value = 11 as i32;
let msg = Message::new(value);
let serialized = bincode::serialize(&msg).expect("Couldn't serialize.");
let deserialized: Message =
bincode::deserialize(&serialized).expect("Couldn't deserialize.");
... | rust_cleaned_test_functions.jsonl/122615 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 386
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6462,
25602,
2022,
368,
341,
286,
1077,
897,
284,
220,
16,
16,
438,
600,
18,
17,
280,
286,
1077,
3750,
284,
4856,
486,
931,
3679,
317,
286,
1077,
32916,
284,
9544,
1851,
486,
24166,
2099,
3236... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bits() -> Result<()> {
let bits: Bits = "128".parse()?;
let number: BigUint = bits.into();
assert_eq!(
"340282366920938463463374607431768211456",
format!("{}", number)
);
Ok(())
} | rust_cleaned_test_functions.jsonl/39501 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 149
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20034,
368,
1464,
5714,
71698,
341,
286,
1077,
9472,
25,
49457,
284,
330,
16,
17,
23,
3263,
6400,
94136,
286,
1077,
1372,
25,
6164,
21570,
284,
9472,
39860,
543,
286,
2060,
10714,
33673,
310,
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... | 2 |
#[test]
fn test_concurrent_2_gc() {
use std::thread::spawn;
let t: Vec<_> = (0..100)
.into_iter()
.map(|i| {
spawn(move || {
let v: Vec<_> = (0..100)
.into_iter()
.map(|_| spawn(move || S... | rust_cleaned_test_functions.jsonl/38598 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 890
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3382,
3231,
62,
17,
49423,
368,
341,
286,
990,
1460,
486,
4528,
486,
46087,
401,
286,
1077,
259,
25,
11312,
32399,
29,
284,
320,
15,
496,
16,
15,
15,
340,
310,
659,
18122,
11723,
741,
310,
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... | 8 |
#[test]
fn test_parse_data_format_error() {
let packet =
hex::decode("000055aa00000000000000070000003b00000001332e33d504910232d355a59ed1f6ed1f4a816a1e8e30ed09987c020ae45d72c70592bb233c79c43a5b9ae49b6ead38725deb520000aa55").unwrap();
let expected = Message {
command: Some(... | rust_cleaned_test_functions.jsonl/39164 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 342
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
1769,
8955,
4096,
368,
341,
286,
1077,
10151,
4035,
310,
12371,
486,
18196,
445,
15,
15,
15,
15,
20,
20,
5305,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
22,
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_saturating_sub() {
let length1: Length<u8, Mm> = Length::new(5);
let length2: Length<u8, Mm> = Length::new(10);
let result = length1.saturating_sub(length2);
assert_eq!(result.get(), 0);
} | rust_cleaned_test_functions.jsonl/50582 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 122
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
2628,
1095,
5228,
368,
341,
286,
1077,
3084,
16,
25,
17287,
34837,
23,
11,
386,
76,
29,
284,
17287,
486,
931,
7,
20,
317,
286,
1077,
3084,
17,
25,
17287,
34837,
23,
11,
386,
76,
29,
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_write_metadata_table_with_segment() {
let m = RWTFMetadata::new(None, Some(TrackType::Segment(0x42)));
let mut buf = vec![];
let written = m.write(&mut buf);
assert!(written.is_ok());
let expected_head = &[0x02, // 2 table entries
... | rust_cleaned_test_functions.jsonl/51230 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 561
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
22220,
5237,
6615,
28061,
368,
341,
286,
1077,
296,
284,
46206,
10808,
14610,
486,
931,
26717,
11,
4329,
7,
15667,
929,
486,
21086,
7,
15,
87,
19,
17,
22525,
286,
1077,
5206,
6607,
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_content_sha1hex_none() {
let value: ContentSha1Hex = convert_bser_value(Value::Null);
assert_eq!(value, ContentSha1Hex::None);
} | rust_cleaned_test_functions.jsonl/25482 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 81
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7495,
48836,
16,
17308,
31488,
368,
341,
286,
1077,
897,
25,
8883,
62316,
16,
20335,
284,
5508,
880,
799,
3142,
25346,
486,
3280,
317,
286,
2060,
10714,
10297,
957,
11,
8883,
62316,
16,
20335,
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 |
#[test]
fn test_convert_function() {
let b = ast::BaseNode::default();
let pkg = ast::Package {
base: b.clone(),
path: "path".to_string(),
package: "main".to_string(),
files: vec![ast::File {
base: b.clone(),
name: "... | rust_cleaned_test_functions.jsonl/30446 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 7774
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
9174,
368,
341,
286,
1077,
293,
284,
11763,
486,
3978,
1955,
486,
2258,
543,
286,
1077,
24793,
284,
11763,
486,
13100,
341,
310,
2331,
25,
293,
15997,
3148,
310,
1815,
25,
330,
2343,
3263... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get() {
let settings = Settings::new();
let v1: u32 = 1;
let v2: f32 = 1.0;
let vt1 = TypeId::of::<u32>();
let vt2 = TypeId::of::<f32>();
let mut values = settings.settings.write();
values.insert(vt1, Box::new(v1.clone()));
values... | rust_cleaned_test_functions.jsonl/29876 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 309
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
368,
341,
286,
1077,
5003,
284,
11296,
486,
931,
1428,
286,
1077,
348,
16,
25,
575,
18,
17,
284,
220,
16,
280,
286,
1077,
348,
17,
25,
282,
18,
17,
284,
220,
16,
13,
15,
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_sample_slice_boundaries() {
let empty: &[u8] = &[];
let mut r = ::test::rng(402);
// sample 0 items
assert_eq!(&sample_slice(&mut r, empty, 0)[..], [0u8; 0]);
assert_eq!(&sample_slice(&mut r, &[42, 2, 42], 0)[..], [0u8; 0]);
// sample 1 item
... | rust_cleaned_test_functions.jsonl/69734 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 814
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17491,
26488,
19447,
5431,
368,
341,
286,
1077,
4287,
25,
44590,
84,
23,
60,
284,
609,
40901,
286,
1077,
5206,
435,
284,
3504,
1944,
486,
69890,
7,
19,
15,
17,
626,
286,
442,
6077,
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... | 7 |
#[test]
fn test_search_query_spaces_and_stuff() {
let query = SearchQuery {
query: "test??? wow".to_string(),
types: vec![SearchType::Album],
limit: 5,
offset: 0,
};
assert_eq!(
query.into_query_string(),
"type=albu... | rust_cleaned_test_functions.jsonl/52793 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 211
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10716,
5738,
67883,
8378,
95396,
368,
341,
286,
1077,
3239,
284,
7542,
2859,
341,
310,
3239,
25,
330,
1944,
33015,
35665,
3263,
983,
3904,
3148,
310,
4494,
25,
7486,
20703,
5890,
929,
486,
32378,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_message() {
let (mut connected_peer, mut remote_peer) = setup_peers();
let message: Vec<u8> = vec![];
let encrypted_message = connected_peer.encrypt_buf(&message).unwrap();
assert_eq!(encrypted_message.len(), 2 + 16 + 16);
let decrypted_message = r... | rust_cleaned_test_functions.jsonl/39154 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 225
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
6462,
368,
341,
286,
1077,
320,
6984,
8433,
45159,
11,
5206,
8699,
45159,
8,
284,
6505,
36367,
388,
1428,
286,
1077,
1943,
25,
11312,
34837,
23,
29,
284,
7486,
0,
15078,
286,
1077,
24455,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_macros_conv() {
let mut conv_map = parse(
SourceId::none(),
r#"
mod swig_foreign_types_map {
#![swig_foreigner_type="byte"]
#![swig_rust_type="jbyte"]
#![swig_foreigner_type="short"]
#![swig_rust_type="jshort"]
}
#[swig_code = "let {to_var}:... | rust_cleaned_test_functions.jsonl/18737 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1489
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
85904,
22716,
368,
341,
286,
1077,
5206,
5686,
5376,
284,
4715,
1006,
310,
8748,
764,
486,
6697,
3148,
310,
435,
2,
698,
2593,
2021,
343,
78983,
9763,
5376,
341,
262,
671,
20703,
2280,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_args_multiplexed_connection() {
let ctx = TestContext::new();
block_on_all(async move {
ctx.multiplexed_async_connection()
.and_then(|con| {
let cmds = (0..100).map(move |i| test_cmd(&con, i));
future::try_join_all(cmds).map_ok(|results... | rust_cleaned_test_functions.jsonl/75331 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 284
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8384,
91802,
2571,
291,
15866,
368,
341,
262,
1077,
5635,
284,
3393,
1972,
486,
931,
543,
262,
2504,
4470,
5705,
18285,
3271,
341,
286,
5635,
744,
9845,
2571,
291,
28346,
15866,
741,
310,
659,
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_dataspace_null() -> Result<()> {
let space = Dataspace::try_new(Extents::Null)?;
assert_eq!(space.ndim(), 0);
assert_eq!(space.shape(), vec![]);
assert_eq!(space.maxdims(), vec![]);
assert_eq!(space.size(), 0);
assert!(space.is_null());
ass... | rust_cleaned_test_functions.jsonl/101070 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 191
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46530,
1306,
15162,
368,
1464,
5714,
71698,
341,
286,
1077,
3550,
284,
422,
19346,
1306,
486,
1539,
5921,
7,
6756,
805,
486,
3280,
40007,
286,
2060,
10714,
10297,
8746,
80939,
1507,
220,
15,
317,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_deserialize_unknown_root_config() {
let value = toml::toml! {
unknown_key = "foo"
};
let deserializer = ValueDeserializer::new(&value);
let result = StarshipRootConfig::deserialize(deserializer).unwrap_err();
assert_eq!(
format!("{... | rust_cleaned_test_functions.jsonl/67386 | {
"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,
15768,
9050,
57507,
12993,
5332,
368,
341,
286,
1077,
897,
284,
311,
1014,
486,
37401,
75,
0,
341,
310,
9788,
3097,
284,
330,
7975,
698,
286,
2605,
286,
1077,
939,
41939,
284,
5162,
80097,
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_feat_aggregation_without_group_by() -> Result<()> {
setup_test_logger();
let source_input = gen_source_input();
let test_source = ForeignSource::new().unwrap();
let test_sink = ForeignSink::start().unwrap();
let ddls = vec![
"
CREATE SOURCE STREAM source_tr... | rust_cleaned_test_functions.jsonl/117007 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1092
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46753,
20587,
34442,
39904,
6288,
3710,
368,
1464,
5714,
71698,
341,
262,
6505,
4452,
27413,
1428,
262,
1077,
2530,
5898,
284,
4081,
10347,
5898,
1428,
262,
1077,
1273,
10347,
284,
19078,
3608,
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_is_descendant() {
let v1 = Value::from((1, 2, 3));
let v2 = Value::from((1, 2, v1.clone()));
let v3 = Value::from((1, 2, v2.clone()));
assert!(v3.is_descendant_value(&v2));
assert!(v3.is_descendant_value(&v1));
assert!(v3.is_descendant_value(&v3));... | rust_cleaned_test_functions.jsonl/62159 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 318
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
10986,
20372,
368,
341,
286,
1077,
348,
16,
284,
5162,
486,
1499,
1188,
16,
11,
220,
17,
11,
220,
18,
1106,
286,
1077,
348,
17,
284,
5162,
486,
1499,
1188,
16,
11,
220,
17,
11,
348,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_inx_d_rollover() {
let mut state = State8080::empty_state();
state.memory = vec![0x13];
state.d = 0x38;
state.e = 0xff;
emulate_8080_op(&mut state);
assert_eq!(state.d, 0x39);
assert_eq!(state.e, 0x00);
} | rust_cleaned_test_functions.jsonl/7752 | {
"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,
1243,
87,
814,
62,
43684,
423,
368,
341,
286,
1077,
5206,
1584,
284,
3234,
23,
15,
23,
15,
486,
3194,
4387,
543,
286,
1584,
36611,
284,
7486,
20703,
15,
87,
16,
18,
935,
286,
1584,
950,
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_program_with_tests() {
let content = b"// Start of the program
// Another comment
/>> 1: [1 2]
/>> 2: [2 4]
/<< 1: [-1 -2]
Node #1
==========
IN:1 -> 1
---------
MOV <1, >1
---------
1 -> #2:2
=======
// End comment, to conclude
";
let res = program(content);
let node... | rust_cleaned_test_functions.jsonl/90803 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 610
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25096,
6615,
32509,
368,
341,
286,
1077,
2213,
284,
293,
1,
322,
5145,
315,
279,
2025,
198,
322,
13293,
3980,
198,
14,
2452,
220,
16,
25,
508,
16,
220,
17,
921,
14,
2452,
220,
17,
25,
508,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_total_ord() {
let c = &[1, 2, 3];
[1, 2, 3, 4][..].cmp(c) == Greater;
let c = &[1, 2, 3, 4];
[1, 2, 3][..].cmp(c) == Less;
let c = &[1, 2, 3, 6];
[1, 2, 3, 4][..].cmp(c) == Equal;
let c = &[1, 2, 3, 4, 5, 6];
[1, 2, 3, 4, 5, 5, 5, 5... | rust_cleaned_test_functions.jsonl/111414 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 263
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10784,
67324,
368,
341,
286,
1077,
272,
284,
44590,
16,
11,
220,
17,
11,
220,
18,
935,
286,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
1457,
496,
936,
7293,
1337,
8,
621,
32281,
280,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_scoped_coil() {
let (_s, cfg) = start_dummy_server_with_cfg();
let mut trans = Transport::new_with_cfg("127.0.0.1", cfg).unwrap();
{
let mut auto = ScopedCoil::new(&mut trans, 0, CoilDropFunction::On).unwrap();
assert_eq!(auto.mut_transport().read... | rust_cleaned_test_functions.jsonl/46845 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 887
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13171,
16367,
11393,
321,
368,
341,
286,
1077,
5453,
82,
11,
13286,
8,
284,
1191,
60321,
12015,
6615,
18343,
543,
286,
1077,
5206,
1356,
284,
16742,
486,
931,
6615,
18343,
445,
16,
17,
22,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_split_check() {
let path = Builder::new().prefix("test-raftstore").tempdir().unwrap();
let path_str = path.path().to_str().unwrap();
let db_opts = DBOptions::new();
let cfs_opts = ALL_CFS
.iter()
.map(|cf| {
let mut cf_opts ... | rust_cleaned_test_functions.jsonl/43994 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1094
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
7200,
368,
341,
286,
1077,
1815,
284,
20626,
486,
931,
1005,
11849,
445,
1944,
12,
2944,
4314,
1827,
3888,
3741,
1005,
15454,
543,
286,
1077,
1815,
2895,
284,
1815,
3875,
1005,
983,
2895,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_expand_rule() {
// assert_err(
assert_err(
"($($i:ident);*) => ($i)",
"foo!{a}",
ExpandError::BindingError(String::from(
"expected simple binding, found nested binding `i`",
... | rust_cleaned_test_functions.jsonl/28816 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 300
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
67875,
21124,
368,
341,
1789,
286,
442,
2060,
9266,
1006,
73363,
23459,
286,
2060,
9266,
1006,
310,
330,
699,
699,
72,
25,
1713,
1215,
3764,
589,
1711,
72,
15752,
310,
330,
7975,
0,
90,
64,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_duplicate_toolchains() {
let db = Database::temp().unwrap();
let config = Config::default();
let ctx = ActionsCtx::new(&db, &config);
crate::crates::lists::setup_test_lists(&db, &config).unwrap();
// Ensure an experiment with duplicate toolchains can't b... | rust_cleaned_test_functions.jsonl/74501 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 454
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70434,
22785,
58358,
368,
341,
286,
1077,
2927,
284,
9994,
486,
3888,
1005,
15454,
543,
286,
1077,
2193,
284,
5532,
486,
2258,
543,
286,
1077,
5635,
284,
26722,
23684,
486,
931,
2099,
1999,
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_read_libpostal_contained_overrides() {
let yaml = r#"---
admin_level:
"2": "country"
"4": "state"
"5": "state_district"
"6": "state_district"
"8": "city"
"9": "suburb"
overrides:
contained_by:
relation:
... | rust_cleaned_test_functions.jsonl/72910 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 651
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
16142,
33170,
10260,
2627,
15431,
18245,
368,
341,
286,
1077,
32246,
284,
435,
55543,
10952,
262,
3986,
8274,
510,
286,
330,
17,
788,
330,
11141,
698,
286,
330,
19,
788,
330,
2454,
698,
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_many_n_m() {
init();
let p = elm_ref(b'a').of_many_n_m(1, 2).collect() + end();
let r = p.parse_as_result(b"");
assert!(r.is_err());
let (a, _) = p.parse_as_result(b"a").unwrap();
assert_eq!(a, vec![b'a']);
let (a, _) = p.parse_as_result(b"aa").unwrap();
assert... | rust_cleaned_test_functions.jsonl/16790 | {
"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,
22101,
1089,
717,
368,
341,
262,
2930,
543,
262,
1077,
281,
284,
42205,
7793,
1883,
25184,
1823,
1055,
22101,
1089,
717,
7,
16,
11,
220,
17,
568,
17384,
368,
488,
835,
1428,
262,
1077,
435,
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_carol_escrows_to_bob_transfers_to_alice() {
// Acting as carol
testing_env!(get_context(carol()));
let total_supply = 1_000_000_000_000_000u128;
let mut contract = FunToken::new(carol(), total_supply.to_string()).unwrap();
assert_eq!(contract.get_total_sup... | rust_cleaned_test_functions.jsonl/74525 | {
"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,
26616,
337,
92196,
1811,
2346,
880,
674,
7965,
49793,
2346,
8418,
558,
368,
341,
286,
442,
72689,
438,
1803,
337,
198,
286,
7497,
15879,
10297,
455,
8467,
42078,
337,
7392,
286,
1077,
2790,
65630,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_125() {
assert_eq!(Solution::is_palindrome(121), true);
assert_eq!(Solution::is_palindrome(-121), false);
assert_eq!(Solution::is_palindrome(10), false);
} | rust_cleaned_test_functions.jsonl/133302 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 97
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
16,
17,
20,
368,
341,
286,
2060,
10714,
10297,
36842,
486,
285,
73310,
36058,
7,
16,
17,
16,
701,
830,
317,
286,
2060,
10714,
10297,
36842,
486,
285,
73310,
36058,
4080,
16,
17,
16,
701,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_established_send() {
let mut s = socket_established();
// First roundtrip after establishing.
s.send_slice(b"abcdef").unwrap();
recv!(s, [TcpRepr {
seq_number: LOCAL_SEQ + 1,
ack_number: Some(REMOTE_SEQ + 1),
payload: &b"abcdef"... | rust_cleaned_test_functions.jsonl/1721 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 627
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18583,
5102,
291,
13565,
368,
341,
286,
1077,
5206,
274,
284,
7575,
18583,
5102,
291,
543,
286,
442,
5512,
4778,
32981,
1283,
30592,
624,
286,
274,
5219,
26488,
1883,
1,
41202,
1827,
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_inline_let_bind_literal_expr() {
check_assist(
inline_local_variable,
r"
fn bar(a: usize) {}
fn foo() {
let a$0 = 1;
a + 1;
if a > 10 {
}
while a > 10 {
}
let b = a * 10;
bar(a);
}",
r"
fn bar(a: usize) {}
fn foo() {
... | rust_cleaned_test_functions.jsonl/3221 | {
"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,
41871,
62,
1149,
27461,
34100,
21915,
368,
341,
286,
1779,
12083,
380,
1006,
310,
7381,
13564,
14635,
345,
310,
435,
698,
8822,
3619,
2877,
25,
22301,
8,
5613,
8822,
15229,
368,
341,
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_find_last() {
let inputs = vec![
("key1", 5),
("key3", 1),
("key5", 2),
("key7", 4),
("key9", 3),
];
let skl = construct_skl_from_nodes(inputs);
let last = skl.find_last();
unsafe {
as... | rust_cleaned_test_functions.jsonl/15460 | {
"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,
21814,
12195,
368,
341,
286,
1077,
11127,
284,
7486,
90515,
310,
3489,
792,
16,
497,
220,
20,
1326,
310,
3489,
792,
18,
497,
220,
16,
1326,
310,
3489,
792,
20,
497,
220,
17,
1326,
310,
3489,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dynamic_honey_badger_random_delivery_silent() {
let new_adversary = |_: usize, _: usize, _| SilentAdversary::new(MessageScheduler::Random);
test_dynamic_honey_badger_different_sizes(new_adversary, 10);
} | rust_cleaned_test_functions.jsonl/66065 | {
"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,
45992,
1523,
2534,
34199,
1389,
22644,
50562,
643,
68414,
368,
341,
262,
1077,
501,
10027,
3004,
658,
284,
760,
23211,
22301,
11,
58536,
22301,
11,
85137,
59455,
2589,
3004,
658,
486,
931,
29359,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_char_table() {
for (i, &v) in URI_CHARS.iter().enumerate() {
if v != 0 {
assert_eq!(i, v as usize);
}
}
} | rust_cleaned_test_functions.jsonl/29063 | {
"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,
9232,
5237,
368,
341,
262,
369,
320,
72,
11,
609,
85,
8,
304,
16020,
82319,
19471,
1005,
76569,
368,
341,
286,
421,
348,
961,
220,
15,
341,
310,
2060,
10714,
10297,
72,
11,
348,
438,
22301,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_is_captured_generic() {
assert_eq!(
is_captured_generic("$__captured$reifiedgeneric$function$1"),
Some((true, 1))
);
assert_eq!(
is_captured_generic("$__captured$reifiedgeneric$class$1"),
Some((fa... | rust_cleaned_test_functions.jsonl/77581 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 319
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
666,
80228,
41232,
368,
341,
310,
2060,
10714,
33673,
394,
374,
666,
80228,
41232,
20912,
563,
43203,
3073,
3,
265,
1870,
35787,
3,
1688,
3,
16,
4461,
394,
4329,
1188,
1866,
11,
220,
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_bivar_poly_to_from_bytes_large_degree() {
let mut rng = rand::thread_rng();
let degree = 9; // TODO pick a less magic value here
let bi_poly = BivarPoly::random(degree, &mut rng);
let bi_poly_bytes = bi_poly.to_bytes();
let dp1 = degree + 1;
let su... | rust_cleaned_test_functions.jsonl/49480 | {
"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,
880,
56398,
36133,
2346,
5673,
12524,
45228,
49524,
368,
341,
286,
1077,
5206,
28422,
284,
10382,
486,
4528,
66849,
543,
286,
1077,
8381,
284,
220,
24,
26,
442,
5343,
3735,
264,
2686,
10963,
897,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pdf() {
let f = |arg: f64| move |x: Gamma| x.pdf(arg);
let test = [
((1.0, 0.1), 1.0, 0.090483741803595961836995),
((1.0, 0.1), 10.0, 0.036787944117144234201693),
((1.0, 1.0), 1.0, 0.367879441171442321595523),
((1.0, 1.0), 10.0, 0.0... | rust_cleaned_test_functions.jsonl/39877 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 480
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39948,
368,
341,
286,
1077,
282,
284,
760,
858,
25,
282,
21,
19,
91,
3271,
760,
87,
25,
57682,
91,
856,
15995,
9404,
317,
286,
1077,
1273,
284,
2278,
310,
1781,
16,
13,
15,
11,
220,
15,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_slice_out_of_range_positive() {
let arr = [10000, 256, 1000];
assert!(Color::try_from(&arr[..]).is_err());
} | rust_cleaned_test_functions.jsonl/11978 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 73
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26488,
6068,
3575,
9698,
54160,
368,
341,
286,
1077,
2890,
284,
508,
16,
15,
15,
15,
15,
11,
220,
17,
20,
21,
11,
220,
16,
15,
15,
15,
935,
286,
2060,
10297,
1636,
486,
1539,
5673,
2099,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_build_crds_filter() {
let mut rng = thread_rng();
let thread_pool = ThreadPoolBuilder::new().build().unwrap();
let crds_gossip_pull = CrdsGossipPull::default();
let mut crds = Crds::default();
let keypairs: Vec<_> = repeat_with(Keypair::new).take(10_000).c... | rust_cleaned_test_functions.jsonl/112071 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 869
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20801,
32331,
5356,
8727,
368,
341,
286,
1077,
5206,
28422,
284,
4516,
66849,
543,
286,
1077,
4516,
15709,
284,
72716,
3297,
486,
931,
1005,
5834,
1005,
15454,
543,
286,
1077,
1560,
5356,
1889,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_encrypt_decrypt_correctness() {
let ElGamalKeypair { public, secret } = ElGamalKeypair::new_rand();
let amount: u32 = 57;
let ciphertext = ElGamal::encrypt(&public, amount);
let expected_instance = DiscreteLog {
generator: *G,
target: Scal... | rust_cleaned_test_functions.jsonl/36649 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 316
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66593,
80764,
31550,
2090,
368,
341,
286,
1077,
3984,
78884,
278,
6608,
1082,
1310,
314,
584,
11,
6234,
335,
284,
3984,
78884,
278,
6608,
1082,
1310,
486,
931,
33864,
543,
286,
1077,
3311,
25,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_custom_markov() {
let mut boxed_markov = markov::Chain::new();
let name_generator: &mut dyn NameGenerator = &mut boxed_markov as &mut dyn NameGenerator;
name_generator.feed("aabdc".to_string());
let mut markov = markov::Chain::new();
markov.feed("aabdc".... | rust_cleaned_test_functions.jsonl/114713 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 283
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15875,
18924,
859,
368,
341,
286,
1077,
5206,
73664,
18924,
859,
284,
1868,
859,
486,
18837,
486,
931,
1428,
286,
1077,
829,
25813,
25,
609,
6984,
31070,
3988,
12561,
284,
609,
6984,
73664,
18924,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_peer_connected_successfully() {
let mut pdb = get_db();
let random_peer = PeerId::random();
let (n_in, n_out) = (10, 20);
for _ in 0..n_in {
pdb.connect_ingoing(&random_peer);
}
for _ in 0..n_out {
pdb.connect_outgoing(&ran... | rust_cleaned_test_functions.jsonl/55880 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 450
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45159,
43276,
18632,
3641,
368,
341,
286,
1077,
5206,
47984,
284,
633,
8685,
543,
286,
1077,
4194,
45159,
284,
45147,
764,
486,
11463,
1428,
286,
1077,
320,
77,
1243,
11,
308,
6068,
8,
284,
320,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_device_success() {
let mut mock_nzxt_device_handle = setup_mocks();
// Mock the successful read of the device info.
mock_nzxt_device_handle
.expect_read_interrupt()
.returning(|_, _, _| Ok(READ_LENGTH as usize));
let mock_nzxt_device ... | rust_cleaned_test_functions.jsonl/78158 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 195
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
9204,
18632,
368,
341,
286,
1077,
5206,
7860,
1089,
89,
2252,
9204,
10630,
284,
6505,
717,
25183,
1428,
286,
442,
14563,
279,
6849,
1349,
315,
279,
3671,
3546,
624,
286,
7860,
1089,
89,
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_execute() {
let inputs: Vec<Instruction> = to_string_vector("test_inputs/day_8_part_1.txt")
.unwrap()
.into_iter()
.map(|s| Instruction::new(&s))
.collect();
let mut registers: HashMap<String, isize> = HashMap::new();
input... | rust_cleaned_test_functions.jsonl/89914 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 498
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44329,
368,
341,
286,
1077,
11127,
25,
11312,
27,
16664,
29,
284,
311,
3904,
12247,
445,
1944,
28557,
44739,
62,
23,
10495,
62,
16,
3909,
1138,
310,
659,
15454,
741,
310,
659,
18122,
11723,
741,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_merge_from_program_without_runner() {
let mut some =
document(json!({ "program": { "binary": "bin/hello_world", "runner": "elf" } }));
// fxbug.dev/79951: merging with a document that doesn't have a runner doesn't override the
// runner that we already have as... | rust_cleaned_test_functions.jsonl/34913 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 257
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
5673,
25096,
39904,
54828,
368,
341,
286,
1077,
5206,
1045,
4035,
310,
2197,
9304,
0,
2306,
330,
14906,
788,
314,
330,
25891,
788,
330,
6863,
7530,
4791,
31792,
497,
330,
41736,
788,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_arg_parser_flags() -> clap::Result<()> {
let app = parse_args();
let config = Configuration::from(app.get_matches_from_safe(vec!["test", "-r", "-c"])?);
assert_eq!(config.recursive, true);
assert_eq!(config.compact_output, true);
assert_eq!(config.paths.le... | rust_cleaned_test_functions.jsonl/89795 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 185
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6057,
18517,
14130,
368,
1464,
89577,
486,
2077,
71698,
341,
286,
1077,
906,
284,
4715,
8384,
543,
286,
1077,
2193,
284,
12221,
486,
1499,
11462,
670,
38344,
5673,
34067,
25592,
0,
1183,
1944,
497... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_install_help() {
let (_, mut ucmd) = at_and_ucmd!();
assert!(ucmd
.arg("--help")
.succeeds()
.no_stderr()
.stdout
.contains("Options:"));
} | rust_cleaned_test_functions.jsonl/124403 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34245,
26926,
368,
341,
262,
1077,
39464,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
1428,
262,
2060,
10297,
1754,
2277,
198,
286,
659,
858,
21549,
8653,
1138,
286,
659,
82,
29264,
82,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_undefined_fn() {
let stmt = Stmt::Expr(fn_call("f", vec![*literal(1f64)]));
assert_eq!(
interpret(stmt),
Err(CalcError::UndefinedFn(String::from("f")))
);
} | rust_cleaned_test_functions.jsonl/103403 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 131
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
9614,
15246,
368,
341,
286,
1077,
20020,
284,
97023,
486,
16041,
24008,
13429,
445,
69,
497,
7486,
20703,
9,
35785,
7,
16,
69,
21,
19,
7252,
3237,
286,
2060,
10714,
33673,
310,
14198,
47895,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_debug_raft_log() {
let (cluster, debug_client, store_id) = must_new_cluster_and_debug_client();
// Put some data.
let engine = cluster.get_raft_engine(store_id);
let (region_id, log_index) = (200, 200);
let key = keys::raft_log_key(region_id, log_index);
let mut entry = ... | rust_cleaned_test_functions.jsonl/8802 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 530
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15446,
62,
2944,
5224,
368,
341,
262,
1077,
320,
18855,
11,
7390,
8179,
11,
3553,
842,
8,
284,
1969,
5921,
28441,
8378,
15446,
8179,
1428,
262,
442,
10224,
1045,
821,
624,
262,
1077,
4712,
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_rotation_between_axis_vectors_vector2() {
let vector1: Unit<Vector2<f64>> = Unit::from_value(Vector2::unit_y());
let vector2: Unit<Vector2<f64>> = Unit::from_value(Vector2::unit_x());
let rotation = Rotation2::rotation_between_axis(&vector1, &vector2);
let vector ... | rust_cleaned_test_functions.jsonl/70474 | {
"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,
44813,
48302,
23567,
49158,
12247,
17,
368,
341,
286,
1077,
4621,
16,
25,
7954,
42195,
17,
63895,
21,
19,
2452,
284,
7954,
486,
1499,
3142,
20258,
17,
486,
3843,
4178,
1423,
286,
1077,
4621,
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_extension_successful_with_minimal_json_response() {
use self::colorful_extension::*;
let client = ColorfulClient::new(
ClientId::new("aaa".to_string()),
Some(ClientSecret::new("bbb".to_string())),
AuthUrl::new("https://example.com/auth".to_string()).unwrap(),
... | rust_cleaned_test_functions.jsonl/18609 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 975
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31035,
92951,
6615,
7260,
2861,
9455,
9655,
368,
341,
262,
990,
656,
486,
3423,
1262,
31035,
56162,
262,
1077,
2943,
284,
3478,
1262,
2959,
486,
931,
1006,
286,
8423,
764,
486,
931,
445,
32646,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_default_completions() {
let w = default_wordlist(2);
let c = w.get_completions("ar");
assert_eq!(c.len(), 2);
assert!(c.contains(&String::from("article-")));
assert!(c.contains(&String::from("armistice-")));
let c = w.get_completions("armis");
... | rust_cleaned_test_functions.jsonl/132787 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 711
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9993,
2965,
10819,
908,
368,
341,
286,
1077,
289,
284,
1638,
13533,
1607,
7,
17,
317,
286,
1077,
272,
284,
289,
670,
2965,
10819,
908,
445,
277,
797,
286,
2060,
10714,
10297,
66,
19406,
1507,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_str() -> Result<(), ParseError> {
use alternate_bases::Allele;
use reference_bases::Base;
let s = "chr1\t13\tnd0\tATCG\tA\t5.8\tPASS\tSVTYPE=DEL";
let record: Record = s.parse()?;
assert!(matches!(record.chromosome(), Chromosome::Name(name) if name ... | rust_cleaned_test_functions.jsonl/116553 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 461
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
2895,
368,
1464,
5714,
68843,
14775,
1454,
29,
341,
286,
990,
24609,
96290,
486,
70451,
273,
280,
286,
990,
5785,
96290,
486,
3978,
401,
286,
1077,
274,
284,
330,
16789,
16,
4955,
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... | 3 |
#[test]
fn test_builtin_functions() {
let tests = vec![
("len(\"\")", Object::Int(0)),
("len(\"four\")", Object::Int(4)),
("len(\"hello world\")", Object::Int(11)),
(
"len(1)",
Object::Error(String::from("argument to `len` not supported, got INTEGER"))... | rust_cleaned_test_functions.jsonl/84237 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 313
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73829,
31708,
368,
341,
262,
1077,
7032,
284,
7486,
90515,
286,
3489,
2892,
7,
22245,
899,
497,
3002,
486,
1072,
7,
15,
6965,
286,
3489,
2892,
36014,
34024,
62705,
497,
3002,
486,
1072,
7,
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... | 2 |
#[test]
fn test_logging_duration_too_short() {
let mut runner = Runner::new();
// Attempt to start logging with an interval of 100ms but a duration of 50ms. The request
// should fail as the logging session would not produce any samples.
let mut query = runner.proxy.start_loggin... | rust_cleaned_test_functions.jsonl/66697 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 419
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
59982,
25454,
2346,
78,
16673,
368,
341,
286,
1077,
5206,
22259,
284,
44946,
486,
931,
1428,
286,
442,
43517,
311,
1191,
8392,
448,
458,
9873,
315,
220,
16,
15,
15,
1011,
714,
264,
8090,
315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_criteria_scan_passes() {
let mut passing_criteria = ScanDir {
dir_files: &vec![PathBuf::from("package.json")],
files: &["package.json"],
extensions: &["js"],
folders: &["node_modules"],
};
assert_eq!(passing_criteria.scan()... | rust_cleaned_test_functions.jsonl/36955 | {
"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,
80990,
28857,
15464,
288,
368,
341,
286,
1077,
5206,
12299,
80990,
284,
31108,
6184,
341,
310,
5419,
10931,
25,
609,
4083,
20703,
1820,
15064,
486,
1499,
445,
1722,
4323,
899,
1259,
310,
3542,
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... | 1 |
#[test]
fn test_safe_checkout_blob_to_tree_with_locally_modified_blob() -> BitResult<()> {
BitRepo::with_minimal_repo(|repo| {
modify!(repo: "foo");
let target = commit! {
foo {
bar < "bar contents"
}
};
bit_checkout!(repo: &rev!(target... | rust_cleaned_test_functions.jsonl/62972 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 211
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34067,
68186,
45908,
2346,
11663,
6615,
13400,
745,
37749,
45908,
368,
1464,
6495,
2077,
71698,
341,
262,
6495,
25243,
486,
4197,
7260,
2861,
37784,
22428,
23476,
91,
341,
286,
5602,
10297,
23476,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_start_client_connections_succeeds() {
let mut test_values = test_setup();
// Start client connections
let start_fut = test_values.iface_manager.start_client_connections();
pin_mut!(start_fut);
assert_variant!(test_values.exec.run_until_stalled(&mut start_... | rust_cleaned_test_functions.jsonl/59191 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 433
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4906,
8179,
56402,
643,
29264,
82,
368,
341,
286,
1077,
5206,
1273,
9146,
284,
1273,
21363,
1428,
286,
442,
5145,
2943,
13234,
198,
286,
1077,
1191,
761,
332,
284,
1273,
9146,
35431,
578,
12144,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mem_reader() {
let mut reader = MemReader::new(vec!(0, 1, 2, 3, 4, 5, 6, 7));
let mut buf = [];
assert_eq!(reader.read(buf), Ok(0));
assert_eq!(reader.tell(), Ok(0));
let mut buf = [0];
assert_eq!(reader.read(buf), Ok(1));
assert_eq!(reader... | rust_cleaned_test_functions.jsonl/31077 | {
"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,
12976,
22306,
368,
341,
286,
1077,
5206,
6604,
284,
13550,
5062,
486,
931,
25592,
10297,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
11,
220,
22,
1106... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cmp_reg_reg() {
assert_emit!(0x44, 0x39, 0xf8; emit_cmp_reg_reg(0, R15, RAX));
assert_emit!(0x41, 0x39, 0xdf; emit_cmp_reg_reg(0, RBX, R15));
assert_emit!(0x39, 0xd8; emit_cmp_reg_reg(0, RBX, RAX));
assert_emit!(0x4C, 0x39, 0xf8; emit_cmp_reg_reg(1, R15, RAX));
... | rust_cleaned_test_functions.jsonl/85455 | {
"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,
35193,
4920,
4920,
368,
341,
286,
2060,
69082,
10297,
15,
87,
19,
19,
11,
220,
15,
87,
18,
24,
11,
220,
15,
5848,
23,
26,
16691,
35193,
4920,
4920,
7,
15,
11,
431,
16,
20,
11,
431,
2954,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pointer_with_pointer_ending_labels() {
let mut bytes: Vec<u8> = Vec::with_capacity(512);
let first = Name::from_str("ra.rb.rc").unwrap();
let second = Name::from_str("ra.rc").unwrap();
let third = Name::from_str("ra.rc").unwrap();
{
let mut e... | rust_cleaned_test_functions.jsonl/38205 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 522
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21425,
6615,
21425,
62,
2459,
14547,
368,
341,
286,
1077,
5206,
5820,
25,
11312,
34837,
23,
29,
284,
11312,
486,
4197,
35603,
7,
20,
16,
17,
626,
286,
1077,
1156,
284,
3988,
486,
1499,
2895,
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_fmt() {
let mut f1 = FlagVec::from_str("-0-\t#__1 \n--\r+* +!").unwrap();
assert_eq!(f1.is_set(0), false);
assert_eq!(f1.is_set(1), false);
assert_eq!(f1.is_set(2), false);
assert_eq!(f1.is_set(3), true);
assert_eq!(f1.is_set(4), false);
as... | rust_cleaned_test_functions.jsonl/24805 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 871
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38128,
368,
341,
286,
1077,
5206,
282,
16,
284,
22666,
10050,
486,
1499,
2895,
13645,
15,
30529,
83,
44087,
16,
1124,
77,
313,
59,
81,
10,
9,
488,
0,
1827,
15454,
543,
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,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_invalid_chunk_from_bytes() {
let data_length: u32 = 42;
let chunk_type = "RuSt".as_bytes();
let message_bytes = "This is where your secret message will be!".as_bytes();
let crc: u32 = 2882656333;
let chunk_data: Vec<u8> = data_length
.to_be_by... | rust_cleaned_test_functions.jsonl/95805 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 317
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
30539,
5673,
12524,
368,
341,
286,
1077,
821,
5118,
25,
575,
18,
17,
284,
220,
19,
17,
280,
286,
1077,
11879,
1819,
284,
330,
98625,
623,
3263,
300,
12524,
543,
286,
1077,
1943,
12524,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_simple_with_whitespaces() {
assert_template_result!(r#" worked "#, r#" {{ test }} "#, v!({"test": "worked"}));
assert_template_result!(
r#" worked wonderfully "#,
r#" {{ test }} "#,
v!({"test": "worked wonderfully"}),
);
} | rust_cleaned_test_functions.jsonl/72877 | {
"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,
30015,
6615,
36225,
3611,
27338,
368,
341,
262,
2060,
8693,
5287,
10297,
81,
55543,
220,
6439,
220,
5869,
11,
435,
55543,
220,
5867,
1273,
3869,
220,
5869,
11,
348,
0,
16864,
1944,
788,
330,
701... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_verify_config_missing_signatures_any_of() {
// build verification config:
let signatures_any_of: Vec<Signature> = vec![
generic_issuer("https://github.com/login/oauth", "user1@provider.com"),
generic_issuer("https://github.com/login/oauth", "user2@provider... | rust_cleaned_test_functions.jsonl/68179 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 622
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35638,
5332,
40447,
11172,
2789,
37248,
3575,
368,
341,
286,
442,
1936,
22901,
2193,
510,
286,
1077,
32628,
37248,
3575,
25,
11312,
27,
25088,
29,
284,
7486,
90515,
310,
13954,
62,
66817,
445,
242... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_remove_factors() {
for n in 2..200 {
let factors = PrimeFactors::compute(n);
for i in 0..=factors.get_power_of_two() {
if let Some(removed_factors) = factors
.clone()
.remove_factors(PrimeFactor { v... | rust_cleaned_test_functions.jsonl/33861 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 433
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
73040,
368,
341,
1789,
286,
369,
308,
304,
220,
17,
496,
17,
15,
15,
341,
310,
1077,
9363,
284,
12518,
97769,
486,
27706,
1445,
626,
310,
369,
600,
304,
220,
15,
496,
28,
69,
21161,
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_parsing_empty_valued_set_statement() {
let statement = get_statement!("SET MY_KEY");
assert_eq!(
statement,
Statement {
stype: StatementType::Fail,
key: None,
value: None
... | rust_cleaned_test_functions.jsonl/104588 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 219
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
28598,
15124,
6189,
3260,
2602,
37404,
368,
341,
310,
1077,
5114,
284,
633,
37404,
17223,
5884,
18224,
6600,
797,
310,
2060,
10714,
33673,
394,
5114,
345,
394,
21756,
341,
503,
357,
499,
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 |
#[test]
fn test_pop() {
let mut data = String::from_str("ประเทศไทย中华b¢€𤭢");
assert_eq!(data.pop().unwrap(), '𤭢'); // 4 bytes
assert_eq!(dunwrap(), '€'); // 3 bytes
assert_eq!(datwrap(), '¢'); // 2 bytes
assert_eq!(datarap(), 'b'); // 1 bytes
assert_eq!(datarap()... | rust_cleaned_test_functions.jsonl/53 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 223
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17061,
368,
341,
286,
1077,
5206,
821,
284,
923,
486,
1499,
2895,
445,
130391,
100849,
65,
56394,
15056,
101877,
255,
95,
797,
286,
2060,
10714,
10297,
691,
8288,
1005,
15454,
1507,
364,
101877,
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_is_cluster_nodes() {
let combos = [
//nodes
(b"cluster", b"nodes" as &[u8]),
(b"CLUSTER", b"NODES" as &[u8]),
(b"cluster", b"NODES" as &[u8]),
(b"CLUSTER", b"nodes" as &[u8]),
// replicas
(b"cluster", b"r... | rust_cleaned_test_functions.jsonl/119985 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 598
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
28441,
14896,
368,
341,
286,
1077,
70133,
284,
2278,
310,
442,
20008,
198,
310,
320,
65,
1,
18855,
497,
293,
1,
20008,
1,
438,
44590,
84,
23,
17036,
310,
320,
65,
1,
3140,
46009,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_regeneration() {
let setting_type = SettingType::Unknown;
let mut executor =
fasync::TestExecutor::new_with_fake_time().expect("Failed to create executor");
async fn run_once(setting_type: SettingType) -> (oneshot::Receiver<()>, TestEnvironment) {
let (done_tx, done... | rust_cleaned_test_functions.jsonl/89526 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1844
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74820,
368,
341,
262,
1077,
6243,
1819,
284,
20037,
929,
486,
13790,
401,
262,
1077,
5206,
31558,
4035,
286,
282,
7692,
486,
2271,
25255,
486,
931,
6615,
56881,
3009,
1005,
17119,
445,
9408,
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_options() {
let alignment = size2(8, 16);
let mut atlas = AtlasAllocator::with_options(
size2(2000, 1000),
&AllocatorOptions {
alignment,
vertical_shelves: true,
num_columns: 1,
},
);
assert!(atlas.is_empty());
asse... | rust_cleaned_test_functions.jsonl/26803 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 694
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8743,
368,
341,
262,
1077,
17189,
284,
1379,
17,
7,
23,
11,
220,
16,
21,
626,
262,
1077,
5206,
60932,
284,
42343,
42730,
486,
4197,
8743,
1006,
286,
1379,
17,
7,
17,
15,
15,
15,
11,
220,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_gga_south_west() {
let mut nmea = Nmea::new();
nmea.parse("$GPGGA,092750.000,5321.6802,S,00630.3372,W,1,8,1.03,61.7,M,55.2,M,,*6B")
.unwrap();
assert_eq!(nmea.latitude().unwrap(), -(53. + 21.6802 / 60.));
assert_eq!(nmea.longitude().unwrap(), -(6. + 30... | rust_cleaned_test_functions.jsonl/65853 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 200
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
6743,
643,
2898,
1670,
477,
368,
341,
286,
1077,
5206,
308,
2660,
64,
284,
451,
2660,
64,
486,
931,
543,
286,
308,
2660,
64,
4632,
20912,
38,
11383,
16128,
11,
15,
24,
17,
22,
20,
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_stdin_show_all() {
for same_param in vec!["-A", "--show-all"] {
new_ucmd!()
.args(&[same_param])
.pipe_in("\t\0\n")
.succeeds()
.stdout_only("^I^@$\n");
}
} | rust_cleaned_test_functions.jsonl/90935 | {
"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,
15656,
258,
15267,
5705,
368,
341,
262,
369,
1852,
4090,
304,
7486,
0,
1183,
12,
32,
497,
14482,
3445,
22346,
1341,
341,
286,
501,
68887,
2277,
0,
741,
310,
659,
2116,
2099,
58,
24063,
4090,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_valid_url_scheme() {
expect_ok!(UrlScheme, "fuch.sia-pkg+0");
expect_ok!(UrlScheme, &format!("{}", repeat("f").take(100).collect::<String>()));
} | rust_cleaned_test_functions.jsonl/98671 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 94
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8337,
2903,
53293,
368,
341,
286,
1720,
19817,
10297,
2864,
28906,
11,
330,
69,
1387,
514,
685,
2268,
7351,
10,
15,
797,
286,
1720,
19817,
10297,
2864,
28906,
11,
609,
2243,
79878,
13153,
445,
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 |
#[test]
fn test_bad() {
use crate::types::policy::PolicyError;
use crate::Pos;
fn check(fname: &str, e: &Error) {
let content = read_bad(fname);
let res = Microdesc::parse(&content);
assert!(res.is_err());
assert_eq!(&res.err().unwrap(), e)... | rust_cleaned_test_functions.jsonl/73582 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 400
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34199,
368,
341,
286,
990,
17717,
486,
9242,
486,
34790,
486,
13825,
1454,
280,
286,
990,
17717,
486,
4859,
280,
286,
5168,
1779,
32326,
25,
609,
495,
11,
384,
25,
609,
1454,
8,
341,
310,
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_filenames_with_spaces() {
let config = integration_test_utils::make_config_from_args(&[]);
let output =
integration_test_utils::run_delta(GIT_DIFF_NO_INDEX_FILENAMES_WITH_SPACES, &config);
let output = strip_ansi_codes(&output);
assert!(output.contains... | rust_cleaned_test_functions.jsonl/70117 | {
"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,
80632,
6615,
67883,
368,
341,
286,
1077,
2193,
284,
17590,
4452,
17309,
486,
6927,
5332,
5673,
8384,
2099,
56703,
286,
1077,
2550,
4035,
310,
17590,
4452,
17309,
486,
6108,
26710,
6699,
952,
53984,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lin_reg_const() {
for i in 2..255 {
let input = (i as ValueType + 56.0) / 16.3251;
let mut method = TestingMethod::new(i, input).unwrap();
let output = method.next(input);
test_const_float(&mut method, input, output);
}
} | rust_cleaned_test_functions.jsonl/69752 | {
"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,
24606,
4920,
13610,
368,
341,
197,
2023,
600,
304,
220,
17,
496,
17,
20,
20,
341,
298,
10217,
1946,
284,
320,
72,
438,
55545,
488,
220,
20,
21,
13,
15,
8,
608,
220,
16,
21,
13,
18,
17,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_config() {
let output = "{\"config\": \"some config data here\"}";
let o: Result<Config, serde_json::error::Error> = serde_json::from_str(output);
assert!(o.is_ok());
} | rust_cleaned_test_functions.jsonl/56070 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 98
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5332,
368,
341,
286,
1077,
2550,
284,
54734,
1676,
11693,
7245,
14689,
2193,
821,
1588,
2105,
26259,
286,
1077,
297,
25,
5714,
27,
2648,
11,
61570,
9455,
486,
841,
486,
1454,
29,
284,
61570,
945... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_rpc_get_max_slots() {
test_basic_slot("getMaxRetransmitSlot", 42);
test_basic_slot("getMaxShredInsertSlot", 43);
} | rust_cleaned_test_functions.jsonl/3048 | {
"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,
60799,
3062,
6345,
54161,
368,
341,
286,
1273,
34729,
27563,
445,
455,
5974,
12020,
33389,
1763,
19877,
497,
220,
19,
17,
317,
286,
1273,
34729,
27563,
445,
455,
5974,
2016,
1151,
13780,
19877,
49... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_0013() {
assert_eq!(Solution::roman_to_int("III".to_string()), 3);
assert_eq!(Solution::roman_to_int("IV".to_string()), 4);
assert_eq!(Solution::roman_to_int("IX".to_string()), 9);
assert_eq!(Solution::roman_to_int("MCMXCIV".to_string()), 1994);
assert_eq!... | rust_cleaned_test_functions.jsonl/120499 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 179
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
15,
15,
16,
18,
368,
341,
286,
2060,
10714,
10297,
36842,
486,
62014,
2346,
4042,
445,
22615,
3263,
983,
3904,
11858,
220,
18,
317,
286,
2060,
10714,
10297,
36842,
486,
62014,
2346,
4042,
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_nested_list_json_arrays() {
let c_field = Field::new(
"c",
DataType::Struct(vec![Field::new("d", DataType::Utf8, true)]),
true,
);
let a_struct_field = Field::new(
"a",
DataType::Struct(vec![
Fiel... | rust_cleaned_test_functions.jsonl/22596 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2242
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66279,
2019,
9455,
68983,
368,
341,
286,
1077,
272,
5013,
284,
8601,
486,
931,
1006,
310,
330,
66,
756,
310,
33172,
486,
9422,
25592,
20703,
1877,
486,
931,
445,
67,
497,
33172,
486,
38980,
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_rtc_read_write_and_event() {
let intr_evt = EventFd::new(libc::EFD_NONBLOCK).unwrap();
let mut rtc = Rtc::new(Arc::new(Box::new(TestInterrupt::new(
intr_evt.try_clone().unwrap(),
))));
let mut data = [0; 4];
// Read and write to the MR regist... | rust_cleaned_test_functions.jsonl/130818 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1543
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
10413,
6443,
9165,
8378,
6748,
368,
341,
286,
1077,
10582,
60019,
284,
3665,
74476,
486,
931,
44828,
66,
486,
36,
14596,
22128,
39964,
568,
15454,
1428,
286,
1077,
5206,
71842,
284,
431,
104... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_deserialize_envelope_empty_item_newline() {
// With terminating newline after item payload
let bytes = Bytes::from(
"\
{\"event_id\":\"9ec79c33ec9942ab8353589fcb2e04dc\",\"dsn\":\"https://e12d836b15bb49d7bbf99e64295d995b:@sentry.io/42\"}\n\
{... | rust_cleaned_test_functions.jsonl/103611 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 362
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
9050,
6205,
18853,
15124,
5634,
5921,
1056,
368,
341,
286,
442,
3085,
70581,
39027,
1283,
1509,
7729,
198,
286,
1077,
5820,
284,
30024,
486,
1499,
1006,
310,
93317,
1797,
314,
2105,
3087,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_native_libs_tracking_hash_different_order() {
let mut v1 = Options::default();
let mut v2 = Options::default();
let mut v3 = Options::default();
// Reference
v1.libs = vec![
(String::from("a"), None, Some(cstore::NativeStatic)),
(String::from("b"), None, Some... | rust_cleaned_test_functions.jsonl/31997 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 529
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44494,
16142,
82,
66105,
8950,
82741,
7869,
368,
341,
262,
1077,
5206,
348,
16,
284,
14566,
486,
2258,
543,
262,
1077,
5206,
348,
17,
284,
14566,
486,
2258,
543,
262,
1077,
5206,
348,
18,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_transparent_tuple_error_message() {
Python::with_gil(|py| {
let tup: PyObject = 1.into_py(py);
let tup = TransparentTuple::extract(tup.as_ref(py));
assert!(tup.is_err());
assert_eq!(
extract_traceback(py, tup.unwrap_err()),
"TypeError: ... | rust_cleaned_test_functions.jsonl/59476 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 216
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7965,
3765,
21773,
4096,
6462,
368,
341,
262,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
341,
286,
1077,
57385,
25,
15891,
284,
220,
16,
39860,
40291,
46827,
317,
286,
1077,
57385,
284,
89868,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ts_conflict_rc_check_ts() {
let k1 = Key::from_raw(b"k1");
let mut lock = Lock::new(
LockType::Put,
vec![],
100.into(),
3,
None,
100.into(),
1,
TimeStamp::zero(),
);
... | rust_cleaned_test_functions.jsonl/71662 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 776
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
25023,
16059,
21242,
30299,
7200,
25023,
368,
341,
286,
1077,
595,
16,
284,
5309,
486,
1499,
16067,
1883,
62911,
16,
797,
286,
1077,
5206,
5296,
284,
15701,
486,
931,
1006,
310,
15701,
929,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_valid_to_tpml_digest_conversion() {
let pcr_selection_list_1 = PcrSelectionListBuilder::new()
.with_selection(
HashingAlgorithm::Sha256,
&[
PcrSlot::Slot0,
PcrSlot::Slot1,
PcrSlot::Slot2,
PcrSlot:... | rust_cleaned_test_functions.jsonl/16365 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1528
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8337,
2346,
55191,
1014,
52994,
64132,
368,
341,
262,
1077,
281,
5082,
23672,
2019,
62,
16,
284,
393,
5082,
11177,
852,
3297,
486,
931,
741,
286,
659,
4197,
23672,
1006,
310,
6531,
287,
27847,
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... | 5 |
#[test]
fn test_parse_body() {
let body = "0.01 0.02 0.03 2/38 23618";
assert_eq!(
LoadClient::parse_body(body.to_string()),
LoadInfo {
load_1m: 0.01f32,
load_5m: 0.02f32,
load_15m: 0.03f32,
total_procs: 38u3... | rust_cleaned_test_functions.jsonl/93882 | {
"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,
21039,
14114,
368,
341,
286,
1077,
2487,
284,
330,
15,
13,
15,
16,
220,
15,
13,
15,
17,
220,
15,
13,
15,
18,
220,
17,
14,
18,
23,
220,
17,
18,
21,
16,
23,
876,
286,
2060,
10714,
33673,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_asteroids_from_str() {
let input = "
.#..#
.....
#####
....#
...##
";
let expected = vec_to_set(vec![
(1, 0), (4, 0),
(0, 2), (1, 2), (2, 2), (3, 2), (4, 2),
(4, 3),
(3, 4), (4, 4)
]);
assert_eq!(asteroids_from_str(input), expected);
} | rust_cleaned_test_functions.jsonl/46221 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
2300,
16960,
5673,
2895,
368,
341,
10217,
1946,
284,
6228,
197,
197,
43326,
496,
4956,
197,
197,
1934,
624,
197,
197,
77344,
197,
197,
1934,
4956,
197,
197,
1112,
22614,
197,
876,
10217,
360... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_subv_assign() {
let mut a = [1.2, 1.3, 1.4];
let b = [1.3, 1.5, 2.4];
a.subv_assign(&b);
let a_expected: [f64; 3] = [-0.1, -0.2, -1.0];
for i in 0..a.len() {
assert_approx_eq!(a[i], a_expected[i]);
}
} | rust_cleaned_test_functions.jsonl/66748 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 185
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
85,
20688,
368,
341,
286,
1077,
5206,
264,
284,
508,
16,
13,
17,
11,
220,
16,
13,
18,
11,
220,
16,
13,
19,
935,
286,
1077,
293,
284,
508,
16,
13,
18,
11,
220,
16,
13,
20,
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_bubble_sort() {
let mut v = vec![15, 6, 8, 10, 1, 3, 2, 0, -10, 4, -5];
bubble_sort(&mut v);
assert_eq!(v, vec![-10, -5, 0, 1, 2, 3, 4, 6, 8, 10, 15]);
} | rust_cleaned_test_functions.jsonl/122399 | {
"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,
880,
14600,
18435,
368,
341,
286,
1077,
5206,
348,
284,
7486,
20703,
16,
20,
11,
220,
21,
11,
220,
23,
11,
220,
16,
15,
11,
220,
16,
11,
220,
18,
11,
220,
17,
11,
220,
15,
11,
481,
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_get_scalar_path() {
let c = make();
assert_eq!(c.get("place.favorite").ok(), Some(false));
assert_eq!(
c.get("place.creator.name").ok(),
Some("John Smith".to_string())
);
} | rust_cleaned_test_functions.jsonl/39924 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 108
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
41652,
2638,
368,
341,
262,
1077,
272,
284,
1281,
1428,
262,
2060,
10714,
10297,
66,
670,
445,
2007,
91464,
1827,
562,
1507,
4329,
3576,
1106,
262,
2060,
10714,
33673,
286,
272,
670,
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 |
#[test]
fn test_width() {
let mut res = scan("01123fe071 432", "{2d}{3d}{4x}{2d} {3d}");
assert_eq!(res.next().unwrap(), "01");
assert_eq!(res.next().unwrap(), "123");
assert_eq!(res.next().unwrap(), "fe07");
assert_eq!(res.next().unwrap(), "1");
assert_eq!(res.next().unwrap(), "432");
} | rust_cleaned_test_functions.jsonl/50247 | {
"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,
7927,
368,
341,
262,
1077,
5206,
592,
284,
8569,
445,
15,
16,
16,
17,
18,
1859,
15,
22,
16,
220,
19,
18,
17,
497,
13868,
17,
67,
15170,
18,
67,
15170,
19,
87,
15170,
17,
67,
92,
314,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bloom_filter_membership() {
let mut rng = AesRng::new();
let n = 1000;
let nhashes = 3;
let mut filter = BloomFilter::new(n, nhashes);
for _ in 0..128 {
let x = rng.gen::<Block>();
filter.insert(&x);
assert!(filter.conta... | rust_cleaned_test_functions.jsonl/128706 | {
"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,
880,
18474,
8727,
84635,
368,
341,
286,
1077,
5206,
28422,
284,
362,
288,
49,
968,
486,
931,
543,
286,
1077,
308,
284,
220,
16,
15,
15,
15,
280,
286,
1077,
308,
8296,
288,
284,
220,
18,
280,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_vec_list_reserve() {
let mut list: VecList<i32> = VecList::new();
assert_eq!(list.capacity(), 0);
list.reserve(10);
let capacity = list.capacity();
assert!(capacity >= 10);
list.reserve(5);
assert_eq!(list.capacity(), capacity);
} | rust_cleaned_test_functions.jsonl/11549 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 149
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
2019,
89591,
368,
341,
286,
1077,
5206,
1140,
25,
11312,
852,
21897,
18,
17,
29,
284,
11312,
852,
486,
931,
543,
286,
2060,
10714,
10297,
1607,
59168,
1507,
220,
15,
626,
286,
1140,
48520... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nirmala() {
run_test(
&TEST_DATA,
"harfbuzz/good-nirmala.te",
"indic/Nirmala.ttf",
&[JOINER_GLYPH_INDEX],
5,
);
} | rust_cleaned_test_functions.jsonl/91177 | {
"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,
1089,
2853,
6053,
368,
341,
394,
1598,
4452,
1006,
503,
609,
10033,
7896,
345,
503,
330,
12982,
10798,
8889,
4846,
1386,
5279,
2853,
6053,
31853,
756,
503,
330,
85084,
20290,
2853,
6053,
45192,
75... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_regex_literal_continue_backslash() {
// backslash as second char
assert_parse_success!(
regex_literal,
"/a\\a/",
RegExpLiteral {
pattern: "a\\a".to_string(),
flags: String::new(),
}
);
} | rust_cleaned_test_functions.jsonl/66459 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 147
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41832,
34100,
75297,
3895,
50256,
368,
341,
262,
442,
1182,
50256,
438,
2086,
1161,
198,
262,
2060,
21039,
18632,
33673,
286,
20180,
34100,
345,
286,
3521,
64,
3422,
64,
35075,
286,
28487,
17350,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compile_with_dup_signer_mismatch() {
let program_id = Pubkey::new_unique();
let id0 = Pubkey::new_unique();
let compiled_keys = CompiledKeys::compile(
&[Instruction::new_with_bincode(
program_id,
&0,
vec![Account... | rust_cleaned_test_functions.jsonl/52063 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 465
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74170,
6615,
51932,
11172,
261,
717,
24976,
368,
341,
286,
1077,
2025,
842,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
877,
15,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
19697,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_append_jnit_report() {
let mut doc = initialise_junit_report().unwrap();
let mut testsuites = doc.get_root_element().expect("No root element");
create_junit_report(&mut doc, &mut testsuites, vec![]).unwrap();
let random_chars = std::time::SystemTime::now()
... | rust_cleaned_test_functions.jsonl/54761 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 806
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26041,
5374,
44068,
14813,
368,
341,
286,
1077,
5206,
4629,
284,
66166,
5374,
3843,
14813,
1005,
15454,
543,
286,
1077,
5206,
7032,
3083,
288,
284,
4629,
670,
12993,
7894,
1005,
17119,
445,
2753,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_factors_of_u64_max() {
// Factors of u64::MAX are the only ones for which
// dividing u64::MAX and u64::MAX - 1 yields different
let factors = [3, 5, 17, 257, 641, 65537, 6700417];
assert_eq!(factors.iter().product::<u64>(), u64::MAX);
f... | rust_cleaned_test_functions.jsonl/65997 | {
"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,
73040,
3575,
7300,
21,
19,
6345,
368,
341,
286,
442,
67218,
315,
575,
21,
19,
486,
10586,
525,
279,
1172,
6174,
369,
892,
198,
286,
442,
49702,
575,
21,
19,
486,
10586,
323,
575,
21,
19,
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... | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.