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_inter_lex() {
let j_inter = "public interface sample {";
let tokens = lex_contents(&j_inter.to_string());
assert_eq!(Token::LineNumber(String::from("1")), tokens[0]);
assert_eq!(Token::Keyword(String::from("public")), tokens[1]);
assert_eq!(Token::Keyword(String::from("interface")), tokens[2]);
assert_eq!(Token::Symbol(String::from("sample")), tokens[3]);
assert_eq!(Token::ExpressionEnd(String::from("{")), tokens[4]);
} | rust_cleaned_test_functions.jsonl/62781 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 181
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15318,
74547,
368,
341,
262,
1077,
502,
15318,
284,
330,
888,
3749,
6077,
314,
3302,
262,
1077,
11211,
284,
22429,
16682,
2099,
73,
15318,
2389,
3904,
5231,
262,
2060,
10714,
10297,
3323,
486,
736... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_wallet_epic_add() {
let mut e1 = Epic::new();
e1.set_handle("h1".to_string());
e1.set_title("t1".to_string());
e1.set_bgcolor("#ff0000".to_string());
let w1 = Wallet::new("../tmp/tests/wallet3".to_string());
assert!(w1.add_epic(e1));
} | rust_cleaned_test_functions.jsonl/83767 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 162
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62308,
12476,
292,
2891,
368,
341,
286,
1077,
5206,
384,
16,
284,
39367,
486,
931,
543,
286,
384,
16,
980,
10630,
445,
71,
16,
3263,
983,
3904,
1423,
286,
384,
16,
980,
6112,
445,
83,
16,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_threat_url() {
//TODO: This in a webproxy event
let log = "Aug 5 14:56:46 Ilija-PA-VM-2.al.com 1,2014/08/05 14:56:46,0123456789,THREAT,url,1,2014/08/05 14:56:40,192.168.8.89,173.194.41.175,10.193.17.8,173.194.41.175,allow_all,,,ssl,vsys1,Trust-L3,Untrust-L3,ethernet1/2,ethernet1/1,forward to panorama and splunk,2014/08/05 14:56:46,196863,1,55143,443,52716,443,0x408000,tcp,alert,\"www.google.nl/\",(9999),search-engines,informational,client-to-server,67483,0x0,192.168.0.0-192.168.255.255,US,0,,0,,";
let log = SiemLog::new(log.to_string(), 0, SiemIp::V4(0));
let siem_log = parse_log(log);
match siem_log {
Ok(log) => {
assert_eq!(log.service(), "THREAT");
assert_eq!(
log.field("observer.id"),
Some(&SiemField::from_str("0123456789"))
);
assert_eq!(
log.field("source.ip"),
Some(&SiemField::IP(SiemIp::from_ip_str("192.168.8.89").unwrap()))
);
assert_eq!(
log.field("destination.ip"),
Some(&SiemField::IP(SiemIp::from_ip_str("173.194.41.175").unwrap()))
);
assert_eq!(
log.field("rule.id"),
Some(&SiemField::U32(9999))
);
assert_eq!(
log.field("source.port"),
Some(&SiemField::U32(55143))
);
assert_eq!(
log.field("destination.port"),
Some(&SiemField::U32(443))
);
assert_eq!(
log.field("rule.name"),
Some(&SiemField::from_str(""))
);
assert_eq!(
log.field("network.direction"),
Some(&SiemField::from_str("client-to-server"))
);
assert_eq!(
log.field("event.outcome"),
Some(&SiemField::from_str("DETECTED"))
);
assert_eq!(
log.field("trace.id"),
Some(&SiemField::from_str("196863"))
);
assert_eq!(
log.field(field_dictionary::URL_FULL),
Some(&SiemField::from_str("www.google.nl/"))
);
assert_eq!(
log.field(field_dictionary::IN_INTERFACE),
Some(&SiemField::from_str("ethernet1/2"))
);
assert_eq!(
log.field(field_dictionary::OUT_INTERFACE),
Some(&SiemField::from_str("ethernet1/1"))
);
}
Err(_) => assert_eq!(1, 0),
}
} | rust_cleaned_test_functions.jsonl/87490 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1804
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
5854,
1222,
2903,
368,
341,
286,
442,
14732,
25,
1096,
304,
264,
3482,
22803,
1538,
198,
286,
1077,
1487,
284,
330,
21872,
220,
20,
220,
16,
19,
25,
20,
21,
25,
19,
21,
358,
742,
5580... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_log_batch_enc_dec() {
let region_id = 8;
let mut batch = LogBatch::default();
batch
.add_entries::<Entry>(region_id, &generate_entries(1, 11, Some(vec![b'x'; 1024])))
.unwrap();
batch.add_command(region_id, Command::Clean);
batch.put(region_id, b"key".to_vec(), b"value".to_vec());
batch.delete(region_id, b"key2".to_vec());
batch
.add_entries::<Entry>(region_id, &generate_entries(1, 11, Some(vec![b'x'; 1024])))
.unwrap();
let len = batch.finish_populate(0).unwrap();
let encoded = batch.encoded_bytes();
assert_eq!(len, encoded.len());
// decode item batch
let (offset, compression_type, len) = LogBatch::decode_header(&mut &*encoded).unwrap();
assert_eq!(encoded.len(), len);
let decoded_item_batch = LogItemBatch::decode(
&mut &encoded[offset..],
FileBlockHandle::dummy(LogQueue::Append),
compression_type,
)
.unwrap();
// decode and assert entries
let entries = &encoded[LOG_BATCH_HEADER_LEN..offset as usize];
for item in decoded_item_batch.items.iter() {
if let LogItemContent::EntryIndexes(entries_index) = &item.content {
let origin_entries = generate_entries(1, 11, Some(vec![b'x'; 1024]));
let decoded_entries =
decode_entries_from_bytes::<Entry>(entries, &entries_index.0, false);
assert_eq!(origin_entries, decoded_entries);
}
}
} | rust_cleaned_test_functions.jsonl/48884 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 788
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5224,
14534,
13781,
13783,
368,
341,
286,
1077,
5537,
842,
284,
220,
23,
280,
286,
1077,
5206,
7162,
284,
2835,
21074,
486,
2258,
543,
286,
7162,
198,
310,
659,
718,
26092,
27638,
5874,
2235,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_all_of_missing_match_header() {
let _m = mock("GET", "/")
.match_header("Via", Matcher::AllOf(vec![Matcher::Missing]))
.with_body("{}")
.create();
let (status_line, _, _) = request("GET /", "Via: one\r\n");
assert!(status_line.starts_with("HTTP/1.1 501 "));
let (status_line, _, _) = request("GET /", "Via: one\r\nVia: one\r\nVia: one\r\n");
assert!(status_line.starts_with("HTTP/1.1 501 "));
let (status_line, _, _) = request("GET /", "NotVia: one\r\n");
assert!(status_line.starts_with("HTTP/1.1 200 "));
let (status_line, _, _) = request("GET /", "Via: wrong\r\n");
assert!(status_line.starts_with("HTTP/1.1 501 "));
let (status_line, _, _) = request("GET /", "Via: wrong\r\nVia: one\r\n");
assert!(status_line.starts_with("HTTP/1.1 501 "));
let (status_line, _, _) = request("GET /", "Via: one\r\nVia: wrong\r\n");
assert!(status_line.starts_with("HTTP/1.1 501 "));
} | rust_cleaned_test_functions.jsonl/82413 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 445
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5705,
3575,
40447,
10708,
8757,
368,
341,
262,
1077,
716,
76,
284,
7860,
445,
3806,
497,
3521,
1138,
286,
659,
6347,
8757,
445,
54428,
497,
60632,
486,
2403,
2124,
25592,
20703,
37554,
486,
25080,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bank_0_votable() {
let (genesis_block, _) = GenesisBlock::new(500);
let bank = Arc::new(Bank::new(&genesis_block));
//set tick height to max
let max_tick_height = ((bank.slot + 1) * bank.ticks_per_slot - 1) as usize;
bank.tick_height.store(max_tick_height, Ordering::Relaxed);
assert!(bank.is_votable());
} | rust_cleaned_test_functions.jsonl/41913 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 177
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35733,
62,
15,
2273,
354,
480,
368,
341,
286,
1077,
320,
77894,
7113,
11,
27439,
284,
40788,
4713,
486,
931,
7,
20,
15,
15,
317,
286,
1077,
6073,
284,
19689,
486,
931,
5349,
1180,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_new() {
let level = Level::new(42).unwrap();
assert_tokens(
&level,
&[Token::NewtypeStruct { name: "Level" }, Token::U8(42)],
);
} | rust_cleaned_test_functions.jsonl/31783 | {
"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,
5921,
368,
341,
286,
1077,
2188,
284,
9395,
486,
931,
7,
19,
17,
568,
15454,
543,
286,
2060,
28838,
1006,
310,
609,
3294,
345,
310,
44590,
3323,
486,
3564,
1313,
9422,
314,
829,
25,
330,
4449,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_block_param() {
match Template::compile("{{#each people as |person|}}{{person}}{{/each}}") {
Ok(t) => {
if let HelperBlock(ref ht) = t.elements[0] {
if let Some(BlockParam::Single(Parameter::Name(ref n))) = ht.block_param {
assert_eq!(n, "person");
} else {
panic!("block param expected.")
}
} else {
panic!("Helper block expected");
}
}
Err(e) => panic!("{}", e),
}
match Template::compile("{{#each people as |val key|}}{{person}}{{/each}}") {
Ok(t) => {
if let HelperBlock(ref ht) = t.elements[0] {
if let Some(BlockParam::Pair((Parameter::Name(ref n1), Parameter::Name(ref n2)))) =
ht.block_param
{
assert_eq!(n1, "val");
assert_eq!(n2, "key");
} else {
panic!("helper block param expected.");
}
} else {
panic!("Helper block expected");
}
}
Err(e) => panic!("{}", e),
}
} | rust_cleaned_test_functions.jsonl/12010 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 688
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7113,
4090,
368,
341,
262,
2432,
14355,
486,
20433,
445,
2979,
2,
9547,
1251,
438,
760,
8987,
91,
77286,
8987,
77286,
14,
9547,
3417,
899,
341,
286,
7622,
1155,
8,
589,
341,
310,
421,
1077,
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... | 7 |
#[test]
fn test_read_invalid_segment_table() {
let mut buf = vec![];
buf.extend([0,2,0,0].iter().cloned()); // 513 segments
buf.extend([0; 513 * 4].iter().cloned());
assert!(read_segment_table(&mut Cursor::new(&buf[..]),
message::ReaderOptions::new()).is_err());
buf.clear();
buf.extend([0,0,0,0].iter().cloned()); // 1 segments
assert!(read_segment_table(&mut Cursor::new(&buf[..]),
message::ReaderOptions::new()).is_err());
buf.clear();
buf.extend([0,0,0,0].iter().cloned()); // 1 segments
buf.extend([0; 3].iter().cloned());
assert!(read_segment_table(&mut Cursor::new(&buf[..]),
message::ReaderOptions::new()).is_err());
buf.clear();
buf.extend([255,255,255,255].iter().cloned()); // 0 segments
assert!(read_segment_table(&mut Cursor::new(&buf[..]),
message::ReaderOptions::new()).is_err());
buf.clear();
} | rust_cleaned_test_functions.jsonl/116740 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 558
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
31433,
28061,
5237,
368,
1476,
286,
1077,
5206,
6607,
284,
7486,
0,
40901,
286,
6607,
15831,
2561,
15,
11,
17,
11,
15,
11,
15,
936,
2015,
1005,
564,
19684,
13426,
442,
220,
20,
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... | 1 |
#[test]
fn test_php() {
test_php_scripts(
env!("CARGO_BIN_EXE_hello"),
&[&Path::new(env!("CARGO_MANIFEST_DIR"))
.join("tests")
.join("php")
.join("test.php")],
);
} | rust_cleaned_test_functions.jsonl/47443 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 137
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
78547,
368,
341,
262,
1273,
78547,
35789,
1006,
286,
6105,
17223,
34,
7581,
46,
55720,
4966,
36,
96724,
4461,
286,
44590,
5,
1820,
486,
931,
16978,
17223,
34,
7581,
46,
25143,
91120,
8291,
5455,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_median_short() {
let even = [-1.0, 5.0, 0.0, -3.0, 10.0, -0.5, 4.0, 0.2, 1.0, 6.0];
let even = Data::new(even);
assert_eq!(even.median(), 0.6);
let odd = [-1.0, 5.0, 0.0, -3.0, 10.0, -0.5, 4.0, 0.2, 1.0];
let odd = Data::new(odd);
assert_eq!(odd.median(), 0.2);
} | rust_cleaned_test_functions.jsonl/81932 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 207
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
83003,
16673,
368,
341,
286,
1077,
1496,
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,
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_merge_metadata_from_pyproject_toml() {
let cargo_toml_str = fs_err::read_to_string("test-crates/pyo3-pure/Cargo.toml").unwrap();
let cargo_toml: CargoToml = toml::from_str(&cargo_toml_str).unwrap();
let metadata = Metadata21::from_cargo_toml(&cargo_toml, "test-crates/pyo3-pure").unwrap();
assert_eq!(
metadata.summary,
Some("Implements a dummy function in Rust".to_string())
);
assert_eq!(
metadata.description,
Some(fs_err::read_to_string("test-crates/pyo3-pure/Readme.md").unwrap())
);
assert_eq!(metadata.classifiers, &["Programming Language :: Rust"]);
assert_eq!(
metadata.maintainer_email,
Some("messense <messense@icloud.com>".to_string())
);
assert_eq!(metadata.scripts["get_42"], "pyo3_pure:DummyClass.get_42");
assert_eq!(
metadata.gui_scripts["get_42_gui"],
"pyo3_pure:DummyClass.get_42"
);
assert_eq!(metadata.provides_extra, &["test"]);
assert_eq!(
metadata.requires_dist,
&[
"attrs; extra == 'test'",
"boltons; (sys_platform == 'win32') and extra == 'test'"
]
)
} | rust_cleaned_test_functions.jsonl/77316 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 667
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
22220,
5673,
40291,
4987,
528,
316,
75,
368,
341,
286,
1077,
25652,
528,
316,
75,
2895,
284,
8619,
9266,
486,
878,
2346,
3904,
445,
1944,
47589,
973,
90834,
78,
18,
2268,
552,
11295,
1208... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_evaluate() {
assert_eq!(evaluate_expression("1 + 2 * 3 + 4 * 5 + 6"), 71);
assert_eq!(evaluate_expression("1 + (2 * 3) + (4 * (5 + 6))"), 51);
assert_eq!(evaluate_expression("2 * 3 + (4 * 5)"), 26);
assert_eq!(evaluate_expression("5 + (8 * 3 + 9 + 3 * 4 * 3)"), 437);
assert_eq!(
evaluate_expression("5 * 9 * (7 * 3 * 3 + 9 * 3 + (8 + 6 * 4))"),
12240
);
assert_eq!(
evaluate_expression("((2 + 4 * 9) * (6 + 9 * 8 + 6) + 6) + 2 + 4 * 2"),
13632
);
} | rust_cleaned_test_functions.jsonl/10832 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 308
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2204,
19642,
368,
341,
286,
2060,
10714,
10297,
47291,
28068,
445,
16,
488,
220,
17,
353,
220,
18,
488,
220,
19,
353,
220,
20,
488,
220,
21,
3975,
220,
22,
16,
317,
286,
2060,
10714,
10297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vector_3() {
let secp = Secp256k1::new();
let seed = Vec::from_hex("4b381541583be4423346c643850da4b320e46a87ae3d2a4e6da11eba819cd4acba45d239319ac14f863b8d5ab5a0d0c64d2e8a1e7d1457df2e5a3c51c73235be").unwrap();
// m
test_path(&secp, Groestlcoin, &seed, "m".parse().unwrap(),
"xprv9s21ZrQH143K25QhxbucbDDuQ4naNntJRi4KUfWT7xo4EKsHt2QJDu7KXp1A3u7Bi1j8ph3EGsZ9Xvz9dGuVrtHHs7pXeTzjuxBrCm3NxFr",
"xpub661MyMwAqRbcEZVB4dScxMAdx6d4nFc9nvyvH3v4gJL378CSRZiYmhRoP7mBy6gSPSCYk6SzXPTf3ND1cZAceL7SfJ1Z3GC8vBgp2fS2497");
// m/0h
test_path(&secp, Groestlcoin, &seed, "m/0h".parse().unwrap(),
"xprv9uPDJpEQgRQfDcW7BkF7eTya6RPxXeJCqCJGHuCJ4GiRVLzkTXBAJMu2qaMWPrS7AANYqdq6vcBcBUdJCVVFceUvJFjaPdGZ2y9WAEm9Q1g",
"xpub68NZiKmJWnxxS6aaHmn81bvJeTESw724CRDs6HbuccFQN9Ku14VQrADWgqbhhTHBaohPX4CjNLf9fq9MYo6oDaPPLPxSb7gwQN3ih5Ns1Xi");
} | rust_cleaned_test_functions.jsonl/2909 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 663
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12247,
62,
18,
368,
341,
286,
1077,
511,
4672,
284,
4520,
79,
17,
20,
21,
74,
16,
486,
931,
543,
286,
1077,
10320,
284,
11312,
486,
1499,
32655,
445,
19,
65,
18,
23,
16,
20,
19,
16,
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_ffi_result_from_result_ok() {
let res = Ok(999);
let ffi_res = FfiResult::from(res);
assert_eq!(FfiResult::Ok(util::into_raw(999)), ffi_res);
} | rust_cleaned_test_functions.jsonl/31439 | {
"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,
62,
53799,
5287,
5673,
5287,
19817,
368,
341,
286,
1077,
592,
284,
7622,
7,
24,
24,
24,
317,
286,
1077,
76956,
4918,
284,
434,
9983,
2077,
486,
1499,
4590,
317,
286,
2060,
10714,
10297,
37,
99... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_intersecting_values() {
let sudoku = create_sudoku(TEST_VALUES);
assert_eq!(
sudoku.get_intersecting_values(0),
nonzerou8_set!(1, 3, 5, 6, 7, 9)
);
assert_eq!(
sudoku.get_intersecting_values(40),
nonzerou8_set!(1, 3, 4, 6, 7, 8, 9)
);
assert_eq!(
sudoku.get_intersecting_values(80),
nonzerou8_set!(1, 2, 3, 5, 6, 7, 8, 9)
);
} | rust_cleaned_test_functions.jsonl/58572 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 299
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
72747,
287,
9146,
368,
341,
286,
1077,
90809,
284,
1855,
643,
68302,
50320,
58662,
626,
286,
2060,
10714,
33673,
310,
90809,
670,
72747,
287,
9146,
7,
15,
1326,
310,
2477,
7070,
283,
23,
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_chain_id_from_str() {
assert!(ChainId::from_str("").is_err());
assert!(ChainId::from_str("0").is_err());
assert!(ChainId::from_str("256").is_err());
assert!(ChainId::from_str("255255").is_err());
assert_eq!(ChainId::from_str("TESTING").unwrap(), ChainId::test());
assert_eq!(ChainId::from_str("255").unwrap(), ChainId::new(255));
} | rust_cleaned_test_functions.jsonl/4290 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 188
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30583,
842,
5673,
2895,
368,
341,
286,
2060,
10297,
18837,
764,
486,
1499,
2895,
80821,
285,
9266,
1423,
286,
2060,
10297,
18837,
764,
486,
1499,
2895,
445,
15,
1827,
285,
9266,
1423,
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_stake_state_calculate_rewards() {
let mut vote_state = VoteState::default();
// bootstrap means fully-vested stake at epoch 0
let mut stake = Stake::new(
1,
&Pubkey::default(),
&vote_state,
std::u64::MAX,
&Config::default(),
);
assert_eq!(
None,
stake.calculate_rewards(1_000_000_000.0, &vote_state, None)
);
// put 2 credits in at epoch 0
vote_state.increment_credits(0);
vote_state.increment_credits(0);
// this one should be able to collect exactly 2
assert_eq!(
Some((0, stake.delegation.stake * 2, 2)),
stake.calculate_rewards(1.0, &vote_state, None)
);
stake.credits_observed = 1;
assert_eq!(
Some((0, stake.delegation.stake * 1, 2)),
stake.calculate_rewards(1.0, &vote_state, None)
);
// put 1 credit in epoch 1
vote_state.increment_credits(1);
stake.credits_observed = 2;
// this one should be able to collect the one just added
assert_eq!(
Some((0, stake.delegation.stake * 1, 3)),
stake.calculate_rewards(1.0, &vote_state, None)
);
// put 1 credit in epoch 2
vote_state.increment_credits(2);
// this one should be able to collect 2 now
assert_eq!(
Some((0, stake.delegation.stake * 2, 4)),
stake.calculate_rewards(1.0, &vote_state, None)
);
stake.credits_observed = 0;
// this one should be able to collect everything from t=0 a warmed up stake of 2
assert_eq!(
Some((
0,
stake.delegation.stake * 2 // epoch 0
+ stake.delegation.stake * 1 // epoch 1
+ stake.delegation.stake * 1, // epoch 2
4
)),
stake.calculate_rewards(1.0, &vote_state, None)
);
// verify that None comes back on small redemptions where no one gets paid
vote_state.commission = 1;
assert_eq!(
None,
stake.calculate_rewards(1.0, &vote_state, None)
);
vote_state.commission = 99;
assert_eq!(
None,
stake.calculate_rewards(1.0, &vote_state, None)
);
} | rust_cleaned_test_functions.jsonl/39447 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1308
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1261,
726,
4387,
24005,
11207,
77997,
368,
341,
286,
1077,
5206,
6910,
4387,
284,
34034,
1397,
486,
2258,
543,
1789,
286,
442,
26925,
3363,
7225,
12,
7019,
291,
18279,
518,
16342,
220,
15,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_skip() {
let input = b" hello";
assert_eq!(skip_whitespace(input).0, b"hello");
let input = b"\n hello";
assert_eq!(skip_whitespace(input).0, b"hello");
let input = b"\t\n\r
hello";
assert_eq!(skip_whitespace(input).0, b"hello");
} | rust_cleaned_test_functions.jsonl/51086 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 174
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44830,
368,
341,
286,
1077,
1946,
284,
293,
1,
262,
23811,
876,
286,
2060,
10714,
10297,
20599,
86175,
5384,
568,
15,
11,
293,
1,
14990,
797,
286,
1077,
1946,
284,
293,
11934,
77,
286,
23811,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_g2_vectors() {
let g = G2P::generator();
// check point doubling
assert_eq!(g2f(90, 82), g + g);
// check point addition
assert_eq!((g + g) + (g + g), g + g + g + g);
// check point multiplication
assert_eq!(g * f101(6), g + g + g + g + g + g);
} | rust_cleaned_test_functions.jsonl/101614 | {
"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,
1889,
17,
49158,
368,
341,
286,
1077,
342,
284,
479,
17,
47,
486,
35851,
1428,
286,
442,
1779,
1459,
59015,
198,
286,
2060,
10714,
10297,
70,
17,
69,
7,
24,
15,
11,
220,
23,
17,
701,
342,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_insert_at_leaf_with_internal_created() {
let db = MockTreeStore::default();
let tree = JellyfishMerkleTree::new(&db);
let key1 = HashValue::new([0x00u8; HashValue::LENGTH]);
let value1 = Blob::from(vec![1u8, 2u8]);
let (_root0_hash, batch) = tree
.put_blob_set(None, vec![(key1, value1.clone())])
.unwrap();
assert!(batch.stale_node_index_batch.is_empty());
db.write_tree_update_batch(batch).unwrap();
assert_eq!(tree.get(_root0_hash, key1).unwrap().unwrap(), value1);
assert_eq!(db.num_nodes(), 1);
// Change the 1st nibble to 15.
let key2 = update_nibble(&key1, 0, 15);
let value2 = Blob::from(vec![3u8, 4u8]);
let (_root1_hash, batch) = tree
.put_blob_set(Some(_root0_hash), vec![(key2, value2.clone())])
.unwrap();
assert_eq!(batch.stale_node_index_batch.len(), 0);
db.write_tree_update_batch(batch).unwrap();
assert_eq!(tree.get(_root1_hash, key1).unwrap().unwrap(), value1);
assert!(tree.get(_root0_hash, key2).unwrap().is_none());
assert_eq!(tree.get(_root1_hash, key2).unwrap().unwrap(), value2);
// get # of nodes
assert_eq!(db.num_nodes(), 3);
let leaf1 = Node::new_leaf(key1, value1);
let leaf2 = Node::new_leaf(key2, value2);
let mut children = HashMap::new();
children.insert(
Nibble::from(0),
Child::new(leaf1.hash(), true /* is_leaf */),
);
children.insert(
Nibble::from(15),
Child::new(leaf2.hash(), true /* is_leaf */),
);
let internal = Node::new_internal(children);
assert_eq!(db.get_node(&leaf1.hash()).unwrap(), leaf1);
assert_eq!(db.get_node(&leaf2.hash()).unwrap(), leaf2);
assert_eq!(db.get_node(&internal.hash()).unwrap(), internal);
} | rust_cleaned_test_functions.jsonl/65887 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 789
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
3752,
38909,
6615,
23472,
27288,
368,
341,
262,
1077,
2927,
284,
14563,
6533,
6093,
486,
2258,
543,
262,
1077,
4916,
284,
73139,
18170,
44,
16754,
273,
6533,
486,
931,
2099,
1999,
626,
262,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_readwrite_p() {
use rustix::fs::{cwd, openat, Mode, OFlags};
use rustix::io::{pread, pwrite};
let tmp = tempfile::tempdir().unwrap();
let dir = openat(&cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap();
let foo = openat(
&dir,
"foo",
OFlags::RDWR | OFlags::CREATE | OFlags::TRUNC,
Mode::IRUSR | Mode::IWUSR,
)
.unwrap();
pwrite(&foo, b"hello", 200).unwrap();
pwrite(&foo, b"world", 300).unwrap();
let mut buf = [0_u8; 5];
pread(&foo, &mut buf, 200).unwrap();
assert_eq!(&buf, b"hello");
pread(&foo, &mut buf, 300).unwrap();
assert_eq!(&buf, b"world");
} | rust_cleaned_test_functions.jsonl/33395 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 324
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
4934,
620,
368,
341,
262,
990,
23071,
941,
486,
3848,
22964,
32165,
11,
1787,
266,
11,
14562,
11,
3008,
22851,
2440,
262,
990,
23071,
941,
486,
815,
22964,
20717,
11,
281,
4934,
2315,
262,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_bool() {
let mut buf = BytesMut::new();
buf.put_u32(0);
buf.put_u32(1);
buf.put_u32(2);
let mut buf = buf.freeze();
assert_eq!(buf.read_bool(), Ok(false));
assert_eq!(buf.read_bool(), Ok(true));
assert!(buf.read_bool().is_err());
} | rust_cleaned_test_functions.jsonl/38928 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 213
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
22159,
368,
341,
310,
1077,
5206,
6607,
284,
30024,
51440,
486,
931,
543,
310,
6607,
3597,
7300,
18,
17,
7,
15,
317,
310,
6607,
3597,
7300,
18,
17,
7,
16,
317,
310,
6607,
3597,
7300,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unshift() {
let mut x = vec![1, 2, 3];
x.unshift(0);
assert_eq!(x, vec![0, 1, 2, 3]);
} | rust_cleaned_test_functions.jsonl/75615 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 85
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
13418,
368,
341,
286,
1077,
5206,
856,
284,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
935,
286,
856,
51161,
7,
15,
317,
286,
2060,
10714,
10297,
87,
11,
7486,
20703,
15,
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 |
#[test]
fn test_fixed_size_binary_builder() {
let mut builder = FixedSizeBinaryBuilder::new(15, 5);
builder.append_value(b"hello").unwrap();
builder.append_null().unwrap();
builder.append_value(b"arrow").unwrap();
let fixed_size_binary_array: FixedSizeBinaryArray = builder.finish();
assert_eq!(
&DataType::FixedSizeBinary(5),
fixed_size_binary_array.data_type()
);
assert_eq!(3, fixed_size_binary_array.len());
assert_eq!(1, fixed_size_binary_array.null_count());
assert_eq!(10, fixed_size_binary_array.value_offset(2));
assert_eq!(5, fixed_size_binary_array.value_length());
} | rust_cleaned_test_functions.jsonl/30991 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 325
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37839,
2368,
31761,
28532,
368,
341,
286,
1077,
5206,
7363,
284,
20149,
1695,
21338,
3297,
486,
931,
7,
16,
20,
11,
220,
20,
626,
1789,
286,
7363,
2057,
3142,
1883,
1,
14990,
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_encrypt_decrypt_tags() {
let tags = serde_json::from_str(r#"{"tag1":"value1", "tag2":"value2", "~tag3":"value3"}"#).unwrap();
let tag_name_key = ChaCha20Poly1305IETF::generate_key();
let tag_value_key = ChaCha20Poly1305IETF::generate_key();
let hmac_key = HMACSHA256::generate_key();
let c = encrypt_tags(&tags, &tag_name_key, &tag_value_key, &hmac_key);
let u = decrypt_tags(&Some(c), &tag_name_key, &tag_value_key).unwrap().unwrap();
assert_eq!(tags, u);
} | rust_cleaned_test_functions.jsonl/101037 | {
"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,
66593,
80764,
16333,
368,
341,
286,
1077,
9492,
284,
61570,
9455,
486,
1499,
2895,
2601,
55543,
4913,
4578,
16,
3252,
957,
16,
497,
330,
4578,
17,
3252,
957,
17,
497,
51269,
4578,
18,
3252,
957,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_serialize() {
let frame = PingFrame::new_ack(0);
let expected: Vec<u8> =
raw_frame_from_parts(FrameHeader::new(8, 0x6, 1, 0), vec![0, 0, 0, 0, 0, 0, 0, 0])
.as_ref()
.to_owned();
let raw = frame.serialize_into_vec();
assert_eq!(expected, raw);
} | rust_cleaned_test_functions.jsonl/87851 | {
"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,
88686,
368,
341,
286,
1077,
4034,
284,
48657,
4369,
486,
931,
48447,
7,
15,
317,
286,
1077,
3601,
25,
11312,
34837,
23,
29,
4035,
310,
7112,
8929,
5673,
33217,
91008,
4047,
486,
931,
7,
23,
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_date_weekday() {
assert_eq!(NaiveDate::from_ymd(1582, 10, 15).weekday(), Weekday::Fri);
assert_eq!(NaiveDate::from_ymd(1875, 5, 20).weekday(), Weekday::Thu);
assert_eq!(NaiveDate::from_ymd(2000, 1, 1).weekday(), Weekday::Sat);
} | rust_cleaned_test_functions.jsonl/4763 | {
"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,
4164,
31277,
1292,
368,
341,
286,
2060,
10714,
10297,
16193,
533,
1916,
486,
1499,
62,
1600,
67,
7,
16,
20,
23,
17,
11,
220,
16,
15,
11,
220,
16,
20,
568,
77989,
1507,
10348,
1292,
486,
5388... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_discover_mutation_positions() -> Result<()> {
let module = WasmModule::from_file("testdata/simple_add/test.wasm")?;
let config = Config::default();
let engine = MutationEngine::new(&config, 100)?;
let positions = engine.discover_mutation_positions(&module).unwrap();
assert!(!positions.is_empty());
Ok(())
} | rust_cleaned_test_functions.jsonl/51513 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 161
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9932,
3688,
717,
22705,
37219,
368,
1464,
5714,
71698,
341,
286,
1077,
4688,
284,
467,
10530,
3332,
486,
1499,
2458,
445,
92425,
67195,
2891,
12697,
1418,
10530,
899,
69493,
286,
1077,
2193,
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_inner_hello() {
let client = Client::new(rocket()).unwrap();
let mut response = client.get("/").dispatch();
assert_eq!(response.body_string(), Some("Hello! Try /Rust%202015.".into()));
} | rust_cleaned_test_functions.jsonl/108600 | {
"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,
34345,
96724,
368,
341,
286,
1077,
2943,
284,
8423,
486,
931,
7,
46790,
6011,
15454,
543,
286,
1077,
5206,
2033,
284,
2943,
670,
4283,
1827,
18274,
543,
286,
2060,
10714,
10297,
2322,
5079,
3904,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_redeem_fails_with_amount_exceeds_vault_balance() {
run_test(|| {
ext::oracle::btc_to_dots::<Test>.mock_safe(|x| MockResult::Return(btcdot_parity(x)));
ext::vault_registry::get_vault_from_id::<Test>.mock_safe(|_| {
MockResult::Return(Ok(Vault {
id: BOB,
to_be_issued_tokens: 0,
issued_tokens: 10,
to_be_redeemed_tokens: 0,
btc_address: H160([0; 20]),
banned_until: None,
}))
});
<treasury::Module<Test>>::mint(ALICE, 2);
ext::vault_registry::ensure_not_banned::<Test>.mock_safe(|_, _| MockResult::Return(Ok(())));
let amount = 11;
assert_err!(
Redeem::request_redeem(
Origin::signed(ALICE),
amount,
H160::from_slice(&[0; 20]),
BOB
),
Error::AmountExceedsVaultBalance
);
})
} | rust_cleaned_test_functions.jsonl/26919 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 582
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7893,
1288,
450,
336,
761,
6209,
6615,
13471,
2702,
4635,
82,
2273,
945,
29396,
368,
341,
262,
1598,
4452,
79453,
341,
286,
1303,
486,
69631,
486,
92634,
2346,
814,
2412,
27638,
2271,
14276,
16712... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bordered_jpg_full() {
assert_borders_full!("bordered.jpg",
Borders {
top: 4,
right: 4,
bottom: 4,
left: 4,
});
} | rust_cleaned_test_functions.jsonl/48477 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 226
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
10544,
5374,
3517,
16372,
368,
341,
262,
2060,
880,
7917,
16372,
17223,
9461,
291,
4819,
756,
5108,
80712,
341,
6526,
1909,
25,
220,
19,
345,
6526,
1290,
25,
220,
19,
345,
6526,
5622,
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 |
#[test]
fn test_pillar1() {
let size = Size::new(8, 8);
let radius = 10;
let mut original = Vec2d::new(size, '.');
original.set(Point::new(size.width / 2, 2), '#');
let actual = visit_tiles(&original, size, radius);
let expected = "\n....?...\n....?...\n....#...\n........\n....x...\n........\n........\n........";
assert_eq!(actual, expected);
} | rust_cleaned_test_functions.jsonl/108556 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 188
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
483,
277,
16,
368,
341,
286,
1077,
1379,
284,
8478,
486,
931,
7,
23,
11,
220,
23,
317,
286,
1077,
10578,
284,
220,
16,
15,
280,
286,
1077,
5206,
4024,
284,
11312,
17,
67,
486,
931,
68... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_part_two() {
let mut image = Image::from_str(&INPUT).unwrap();
let tile = image.get_final_image();
assert_eq!(273, tile.find_sea_monsters());
} | rust_cleaned_test_functions.jsonl/82493 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 91
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10495,
23241,
368,
341,
286,
1077,
5206,
2168,
284,
4654,
486,
1499,
2895,
2099,
29421,
568,
15454,
1428,
286,
1077,
10023,
284,
2168,
670,
20676,
4954,
1428,
286,
2060,
10714,
10297,
17,
22,
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 |
#[test]
fn test_2020_01_15_00_00_58() {
new_test_ext().execute_with(|| {
for x in 0..320 {
let _ = Heap::push(x);
}
let mut item = 0;
while let Some(x) = Heap::pop() {
assert!(item <= x, "error");
item = x;
println!("{}", item);
}
})
} | rust_cleaned_test_functions.jsonl/131005 | {
"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,
62,
17,
15,
17,
15,
62,
15,
16,
62,
16,
20,
62,
15,
15,
62,
15,
15,
62,
20,
23,
368,
341,
197,
8638,
4452,
9927,
1005,
10257,
6615,
79453,
341,
298,
2023,
856,
304,
220,
15,
496,
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... | 4 |
#[test]
fn test_mismatch_get() {
let mut map = PolyMap::new();
map.insert("a", 0xAAAAAAAA_u32);
let _a: Option<&i32> = map.get("a");
} | rust_cleaned_test_functions.jsonl/18699 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 89
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
24976,
3062,
368,
341,
286,
1077,
5206,
2415,
284,
18767,
2227,
486,
931,
1428,
286,
2415,
7030,
445,
64,
497,
220,
15,
87,
57905,
7300,
18,
17,
317,
286,
1077,
716,
64,
25,
6959,
52244,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_keypair_with_network() {
//from keypair
let keypair: KeyPair = generate_testkey();
let document: IotaDocument = IotaDocument::from_keypair_with_network(&keypair, "dev").unwrap();
compare_document_testnet(&document);
} | rust_cleaned_test_functions.jsonl/84330 | {
"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,
5673,
3097,
12670,
6615,
20966,
368,
341,
262,
442,
1499,
1376,
12670,
198,
262,
1077,
1376,
12670,
25,
5309,
12443,
284,
6923,
4452,
792,
543,
262,
1077,
2197,
25,
358,
6089,
7524,
284,
358,
60... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_start_update_during_update_replies_with_in_progress() {
let mut pool = LocalPool::new();
let spawner = pool.spawner();
let response = json!({"response":{
"server": "prod",
"protocol": "3.0",
"app": [{
"appid": "{00000000-0000-0000-0000-000000000001}",
"status": "ok",
"updatecheck": {
"status": "ok"
}
}],
}});
let response = serde_json::to_vec(&response).unwrap();
let http = MockHttpRequest::new(hyper::Response::new(response.into()));
let (send_install, mut recv_install) = mpsc::channel(0);
let (mut ctl, state_machine) = pool.run_until(
StateMachineBuilder::new(
StubPolicyEngine,
http,
BlockingInstaller { on_install: send_install },
StubTimer,
StubMetricsReporter,
Rc::new(Mutex::new(StubStorage)),
config_generator(),
make_test_app_set(),
)
.start(),
);
let observer = TestObserver::default();
spawner.spawn_local(observer.observe_until_terminal(state_machine)).unwrap();
let unblock_install = pool.run_until(recv_install.next()).unwrap();
pool.run_until_stalled();
assert_eq!(
observer.take_states(),
vec![State::CheckingForUpdates, State::InstallingUpdate]
);
pool.run_until(async {
assert_eq!(
ctl.start_update_check(CheckOptions::default()).await,
Ok(StartUpdateCheckResponse::AlreadyRunning)
);
});
pool.run_until_stalled();
assert_eq!(observer.take_states(), vec![]);
unblock_install.send(Ok(())).unwrap();
pool.run_until_stalled();
assert_eq!(observer.take_states(), vec![State::WaitingForReboot]);
} | rust_cleaned_test_functions.jsonl/126422 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 998
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4906,
8882,
814,
1677,
8882,
1288,
7202,
6615,
1243,
27200,
368,
341,
286,
1077,
5206,
7314,
284,
8774,
10551,
486,
931,
543,
286,
1077,
978,
67193,
284,
7314,
8572,
67193,
1428,
286,
1077,
2033,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_write_padded_offset() {
let rng = &mut XorShiftRng::from_seed(TEST_SEED);
let len = 1016;
let data: Vec<u8> = (0..len).map(|_| rng.gen()).collect();
let mut padded = Vec::new();
let mut reader = Fr32Reader::new(Cursor::new(&data));
reader
.read_to_end(&mut padded)
.expect("in-memory read failed");
{
let mut unpadded = Vec::new();
write_unpadded(&padded, &mut unpadded, 0, 1016).expect("un-padded write failed: 1016");
let expected = &data[0..1016];
assert_eq!(expected.len(), unpadded.len());
assert_eq!(expected, &unpadded[..]);
}
{
let mut unpadded = Vec::new();
write_unpadded(&padded, &mut unpadded, 0, 44).expect("un-padded write failed: 44");
let expected = &data[0..44];
assert_eq!(expected.len(), unpadded.len());
assert_eq!(expected, &unpadded[..]);
}
let excessive_len = 35;
for start in (1016 - excessive_len + 2)..1016 {
assert!(write_unpadded(&padded, &mut Vec::new(), start, excessive_len).is_err());
}
} | rust_cleaned_test_functions.jsonl/75458 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 601
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
9165,
620,
16828,
6917,
368,
341,
286,
1077,
28422,
284,
609,
6984,
1599,
269,
24841,
49,
968,
486,
1499,
33809,
50320,
3620,
1479,
626,
286,
1077,
2422,
284,
220,
16,
15,
16,
21,
280,
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_extract_str() {
Python::with_gil(|py| {
let s = "Hello Python";
let py_string = s.to_object(py);
let s2: &str = FromPyObject::extract(py_string.as_ref(py)).unwrap();
assert_eq!(s, s2);
})
} | rust_cleaned_test_functions.jsonl/118013 | {
"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,
39123,
2895,
368,
341,
286,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
341,
310,
1077,
274,
284,
330,
9707,
13027,
876,
310,
1077,
4510,
3904,
284,
274,
2389,
5314,
46827,
626,
310,
1077,
274... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_resolve() {
let tag_filter = TagFilter::new(
vec!["b".to_string(), "c".to_string(), "d".to_string()],
vec![],
);
assert_eq!(
resolve(
"tests/fixtures/resolve_tags/a/b",
"tests/fixtures/resolve_tags/a/b/c/d"
)
.unwrap(),
tag_filter
);
} | rust_cleaned_test_functions.jsonl/40676 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 248
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77291,
368,
341,
286,
1077,
4772,
8727,
284,
12353,
5632,
486,
931,
1006,
310,
7486,
0,
1183,
65,
3263,
983,
3904,
1507,
330,
66,
3263,
983,
3904,
1507,
330,
67,
3263,
983,
3904,
73845,
310,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_scaling_user_fee_by_one_cent() {
let provided_fee = BigDecimal::from_str("0.015").unwrap();
let provided_fee_scaled_by_cent = BigDecimal::from_str("0.025").unwrap();
let scaled_fee = scale_user_fee_up(provided_fee);
assert_eq!(provided_fee_scaled_by_cent, scaled_fee);
} | rust_cleaned_test_functions.jsonl/19257 | {
"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,
79216,
3317,
34305,
3710,
11667,
32591,
368,
341,
286,
1077,
3897,
34305,
284,
20618,
486,
1499,
2895,
445,
15,
13,
15,
16,
20,
1827,
15454,
543,
286,
1077,
3897,
34305,
61715,
3710,
32591,
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_add() {
assert_eq!(
add("key", "value", None, None),
"add key 0 0 5\r\nvalue\r\n"
);
} | rust_cleaned_test_functions.jsonl/26809 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 95
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
368,
341,
286,
2060,
10714,
33673,
310,
912,
445,
792,
497,
330,
957,
497,
2240,
11,
2240,
1326,
310,
330,
718,
1376,
220,
15,
220,
15,
220,
20,
12016,
1699,
957,
12016,
1699,
698,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_statediff_serialize() {
let t = StateDiff(map![
Address::from_low_u64_be(42) => AccountDiff {
balance: Diff::Same,
nonce: Diff::Born(1.into()),
code: Diff::Same,
storage: map![
H256::from_low_u64_be(42) => Diff::Same
]
},
Address::from_low_u64_be(69) => AccountDiff {
balance: Diff::Same,
nonce: Diff::Changed(ChangedType { from: 1.into(), to: 0.into() }),
code: Diff::Died(vec![96].into()),
storage: map![],
}
]);
let serialized = serde_json::to_string(&t).unwrap();
assert_eq!(serialized, r#"{"0x000000000000000000000000000000000000002a":{"balance":"=","nonce":{"+":"0x1"},"code":"=","storage":{"0x000000000000000000000000000000000000000000000000000000000000002a":"="}},"0x0000000000000000000000000000000000000045":{"balance":"=","nonce":{"*":{"from":"0x1","to":"0x0"}},"code":{"-":"0x60"},"storage":{}}}"#);
} | rust_cleaned_test_functions.jsonl/39052 | {
"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,
1261,
657,
3092,
88686,
368,
341,
197,
10217,
259,
284,
3234,
21751,
9147,
90515,
298,
98090,
486,
1499,
23767,
7300,
21,
19,
21263,
7,
19,
17,
8,
589,
8615,
21751,
341,
571,
2233,
4978,
25,
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_lookup_isp() {
use super::geoip2::Isp;
let _ = env_logger::try_init();
let filename = "test-data/test-data/GeoIP2-ISP-Test.mmdb";
let reader = Reader::open_readfile(filename).unwrap();
let ip: IpAddr = FromStr::from_str("12.87.118.123").unwrap();
let isp: Isp = reader.lookup(ip).unwrap();
assert_eq!(isp.autonomous_system_number, Some(7018));
assert_eq!(isp.isp, Some("AT&T Services"));
assert_eq!(isp.organization, Some("AT&T Worldnet Services"));
} | rust_cleaned_test_functions.jsonl/42017 | {
"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,
27464,
6892,
79,
368,
341,
262,
990,
2256,
486,
13052,
573,
17,
486,
40,
2154,
280,
262,
1077,
716,
284,
6105,
27413,
486,
1539,
6137,
1428,
262,
1077,
3899,
284,
330,
1944,
13945,
12697,
13945,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_tree_into_modified_file() -> BitResult<()> {
BitRepo::with_minimal_repo(|repo| {
let ours = commit! {
foo < "modified foo contents"
};
let theirs = commit! {
foo {
bar < "bar contents"
}
};
let conflicts = repo.three_way_merge(ours, theirs)?.into_conflicts();
let mut conflicts = conflicts.into_iter();
assert_eq!(
conflicts.next().unwrap(),
Conflict::new_with_type(p!("foo"), ConflictType::ModifyDelete)
);
assert_eq!(cat!(repo: "foo~HEAD"), "modified foo contents");
assert_eq!(cat!(repo: "foo/bar"), "bar contents");
Ok(())
})
} | rust_cleaned_test_functions.jsonl/94161 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 363
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
11663,
45514,
37749,
2458,
368,
1464,
6495,
2077,
71698,
341,
262,
6495,
25243,
486,
4197,
7260,
2861,
37784,
22428,
23476,
91,
341,
286,
1077,
11350,
284,
5266,
0,
341,
310,
15229,
366,
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_regex_functions() {
assert_eq!(
eval("str::regex_matches(\"foobar\", \"[ob]{3}\")"),
Ok(Value::Boolean(true))
);
assert_eq!(
eval("str::regex_matches(\"gazonk\", \"[ob]{3}\")"),
Ok(Value::Boolean(false))
);
match eval("str::regex_matches(\"foo\", \"[\")") {
Err(EvalexprError::InvalidRegex { regex, message }) => {
assert_eq!(regex, "[");
assert!(message.contains("unclosed character class"));
},
v => panic!("{:?}", v),
};
assert_eq!(
eval("str::regex_replace(\"foobar\", \".*?(o+)\", \"b$1\")"),
Ok(Value::String("boobar".to_owned()))
);
assert_eq!(
eval("str::regex_replace(\"foobar\", \".*?(i+)\", \"b$1\")"),
Ok(Value::String("foobar".to_owned()))
);
} | rust_cleaned_test_functions.jsonl/42981 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 426
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41832,
31708,
368,
341,
262,
2060,
10714,
33673,
286,
5603,
445,
495,
486,
26387,
38344,
36014,
50267,
16215,
7245,
58,
674,
15370,
18,
11035,
899,
4461,
286,
7622,
25346,
486,
6890,
3715,
1171,
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_many_blocks() {
let mut log = new_record_test();
for i in 0..100_000 {
log.write(num_to_string(i).as_str());
}
for i in 0..100_000 {
let s = log.read();
assert_eq!(num_to_string(i), s)
}
assert_eq!(EOF, log.read())
} | rust_cleaned_test_functions.jsonl/46680 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 188
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22101,
25201,
368,
341,
286,
1077,
5206,
1487,
284,
501,
14192,
4452,
543,
286,
369,
600,
304,
220,
15,
496,
16,
15,
15,
62,
15,
15,
15,
341,
310,
1487,
3836,
8068,
2346,
3904,
1956,
568,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_u8x16_except_first_not_all() {
let x1 = u8x16::new(1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
let x2 = u8x16::splat(2);
assert!(!(x1.eq(x2)).all());
} | rust_cleaned_test_functions.jsonl/43260 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 129
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7300,
23,
87,
16,
21,
54633,
12978,
7913,
5705,
368,
341,
286,
1077,
856,
16,
284,
575,
23,
87,
16,
21,
486,
931,
7,
16,
11,
220,
17,
11,
220,
17,
11,
220,
17,
11,
220,
17,
11,
220,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_one() {
let one: f64 = 1.0f64;
assert_eq!(1.0, one);
assert!(!one.is_infinite());
assert!(one.is_finite());
assert!(one.is_sign_positive());
assert!(!one.is_sign_negative());
assert!(!one.is_nan());
assert!(one.is_normal());
assert_eq!(Fp::Normal, one.classify());
} | rust_cleaned_test_functions.jsonl/7819 | {
"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,
11667,
368,
341,
286,
1077,
825,
25,
282,
21,
19,
284,
220,
16,
13,
15,
69,
21,
19,
280,
286,
2060,
10714,
10297,
16,
13,
15,
11,
825,
317,
286,
2060,
0,
3471,
603,
2079,
1243,
25722,
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_mv_custom_backup_suffix() {
let (at, mut ucmd) = at_and_ucmd!();
let file_a = "test_mv_custom_backup_suffix_file_a";
let file_b = "test_mv_custom_backup_suffix_file_b";
let suffix = "super-suffix-of-the-century";
at.touch(file_a);
at.touch(file_b);
ucmd.arg("-b")
.arg(format!("--suffix={}", suffix))
.arg(file_a)
.arg(file_b)
.succeeds()
.no_stderr();
assert!(!at.file_exists(file_a));
assert!(at.file_exists(file_b));
assert!(at.file_exists(&format!("{}{}", file_b, suffix)));
} | rust_cleaned_test_functions.jsonl/41615 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 304
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73187,
15875,
44710,
37151,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
1077,
1034,
4306,
284,
330,
1944,
73187,
15875,
44710,
37151,
2458,
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_new_ice_protocol() {
let tests = vec![
("Unspecified", RTCIceProtocol::Unspecified),
("udp", RTCIceProtocol::Udp),
("tcp", RTCIceProtocol::Tcp),
("UDP", RTCIceProtocol::Udp),
("TCP", RTCIceProtocol::Tcp),
];
for (proto_string, expected_proto) in tests {
let actual = RTCIceProtocol::from(proto_string);
assert_eq!(expected_proto, actual);
}
} | rust_cleaned_test_functions.jsonl/133805 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 259
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
62,
558,
34880,
368,
341,
286,
1077,
7032,
284,
7486,
90515,
310,
3489,
1806,
53434,
497,
35047,
51330,
20689,
486,
1806,
53434,
1326,
310,
3489,
31101,
497,
35047,
51330,
20689,
486,
52,
97... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_str_to_type() {
assert_eq!(
tvm_str_to_type(CompleteStr("float24")).unwrap().1,
DataType {
code: DLDataTypeCode_kDLFloat as usize,
bits: 24,
lanes: 1
}
);
assert_eq!(
tvm_str_to_type(CompleteStr("uint111x44")).unwrap().1,
DataType {
code: DLDataTypeCode_kDLUInt as usize,
bits: 111,
lanes: 44
}
);
} | rust_cleaned_test_functions.jsonl/30925 | {
"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,
2895,
2346,
1819,
368,
341,
262,
2060,
10714,
33673,
414,
259,
7338,
2895,
2346,
1819,
7,
12548,
2580,
445,
3649,
17,
19,
15197,
15454,
1005,
16,
345,
414,
33172,
341,
286,
2038,
25,
32975,
2265... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_whitespace_3() {
let s = to_chars(" ++ -- / \"literal\"");
let cur = &mut 0;
expect_next_token(&s, cur, Token::Increment);
expect_next_token(&s, cur, Token::Decrement);
expect_next_token(&s, cur, Token::Divide);
expect_next_token(&s, cur, to_string_literal("\"literal\""));
} | rust_cleaned_test_functions.jsonl/21021 | {
"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,
86175,
62,
18,
368,
341,
286,
1077,
274,
284,
311,
37418,
445,
3443,
220,
1177,
608,
7245,
35785,
88385,
286,
1077,
2847,
284,
609,
6984,
220,
15,
280,
286,
1720,
11257,
6458,
2099,
82,
11,
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_locator_new_from_parts() {
let manufacturer = Manufacturer::Ledger;
let manufacturer_str = "ledger";
let pubkey = Pubkey::new_unique();
let pubkey_str = pubkey.to_string();
let expect = Locator {
manufacturer,
pubkey: None,
};
assert!(matches!(
Locator::new_from_parts(manufacturer, None::<Pubkey>),
Ok(e) if e == expect,
));
assert!(matches!(
Locator::new_from_parts(manufacturer_str, None::<Pubkey>),
Ok(e) if e == expect,
));
let expect = Locator {
manufacturer,
pubkey: Some(pubkey),
};
assert!(matches!(
Locator::new_from_parts(manufacturer, Some(pubkey)),
Ok(e) if e == expect,
));
assert!(matches!(
Locator::new_from_parts(manufacturer_str, Some(pubkey_str.as_str())),
Ok(e) if e == expect,
));
assert!(matches!(
Locator::new_from_parts("bad-manufacturer", None::<Pubkey>),
Err(LocatorError::ManufacturerError(e)) if e == ManufacturerError,
));
assert!(matches!(
Locator::new_from_parts(manufacturer, Some("bad-pubkey")),
Err(LocatorError::PubkeyError(e)) if e == ParsePubkeyError::Invalid,
));
} | rust_cleaned_test_functions.jsonl/35016 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 702
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75344,
5921,
5673,
33217,
368,
341,
286,
1077,
13963,
284,
34451,
486,
60850,
1389,
280,
286,
1077,
13963,
2895,
284,
330,
50704,
876,
286,
1077,
95116,
284,
22611,
792,
486,
931,
21218,
543,
286,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
#[test]
fn test_convert_object() {
let b = ast::BaseNode::default();
let pkg = parse_package(r#"{ a: 10 }"#);
let want = Package {
loc: b.location.clone(),
package: "main".to_string(),
files: vec![File {
loc: b.location.clone(),
package: None,
imports: Vec::new(),
body: vec![Statement::Expr(ExprStmt {
loc: b.location.clone(),
expression: Expression::Object(Box::new(ObjectExpr {
loc: b.location.clone(),
typ: type_info(),
with: None,
properties: vec![Property {
loc: b.location.clone(),
key: Identifier {
loc: b.location.clone(),
name: Symbol::from("a"),
},
value: Expression::Integer(IntegerLit {
loc: b.location.clone(),
value: 10,
}),
}],
})),
})],
}],
};
let got = test_convert(pkg).unwrap();
assert_eq!(want, got);
} | rust_cleaned_test_functions.jsonl/132514 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 872
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
5314,
368,
341,
286,
1077,
293,
284,
11763,
486,
3978,
1955,
486,
2258,
543,
286,
1077,
24793,
284,
4715,
26328,
2601,
2,
14129,
264,
25,
220,
16,
15,
335,
57676,
317,
286,
1077,
1366,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_date_from_str() {
// valid cases
let valid = [
"-0000000123456-1-2",
" -123456 - 1 - 2 ",
"-12345-1-2",
"-1234-12-31",
"-7-6-5",
"350-2-28",
"360-02-29",
"0360-02-29",
"2015-2 -18",
"+70-2-18",
"+70000-2-18",
"+00007-2-18",
];
for &s in &valid {
let d = match s.parse::<NaiveDate>() {
Ok(d) => d,
Err(e) => panic!("parsing `{}` has failed: {}", s, e)
};
let s_ = format!("{:?}", d);
let d_ = match s_.parse::<NaiveDate>() {
Ok(d) => d,
Err(e) => panic!("`{}` is parsed into `{:?}`, but reparsing that has failed: {}",
s, d, e)
};
assert!(d == d_, "`{}` is parsed into `{:?}`, but reparsed result \
`{:?}` does not match", s, d, d_);
}
// some invalid cases
assert!("".parse::<NaiveDate>().is_err());
assert!("x".parse::<NaiveDate>().is_err());
assert!("2014".parse::<NaiveDate>().is_err());
assert!("2014-01".parse::<NaiveDate>().is_err());
assert!("2014-01-00".parse::<NaiveDate>().is_err());
assert!("2014-13-57".parse::<NaiveDate>().is_err());
assert!("9999999-9-9".parse::<NaiveDate>().is_err()); // out-of-bounds
} | rust_cleaned_test_functions.jsonl/4773 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 921
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4164,
5673,
2895,
368,
341,
286,
442,
2697,
5048,
198,
286,
1077,
2697,
284,
2278,
310,
6523,
15,
15,
15,
15,
15,
15,
15,
16,
17,
18,
19,
20,
21,
12,
16,
12,
17,
756,
310,
330,
262,
481,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_read_channel_config_wrong_version() {
let data = vec![
0xa4, 0x9e, 0x79, 0x5a, // magic
2, 0, // version
55, 0, // data_len
0xcc, 0xa3, 0xdd, 0xeb, // data_checksum
0xad, 0xf4, 0xd5, 0xd9, // header_checksum
];
sys_mock::set_data(data);
assert_matches!(read_channel_config(), Err(ChannelConfigError::Version(2)));
} | rust_cleaned_test_functions.jsonl/43606 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 239
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
14571,
5332,
75198,
9438,
368,
341,
286,
1077,
821,
284,
7486,
90515,
310,
220,
15,
9591,
19,
11,
220,
15,
87,
24,
68,
11,
220,
15,
87,
22,
24,
11,
220,
15,
87,
20,
64,
11,
442,
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_add_stake_to_neuron_hotkey_account_ok() {
new_test_ext().execute_with(|| {
let hotkey_id = 5445;
let coldkey_id = 5443433;
let amount: u64 = 10000;
assert_ok!(Subtensor::set_registeration_key(<<Test as Config>::Origin>::root(), 0));
let neuron = register_ok_neuron(0,0,hotkey_id, coldkey_id);
assert_eq!(Subtensor::get_total_stake(), 0);
// Gogogo
Subtensor::add_stake_to_neuron_hotkey_account(neuron.uid, amount);
assert_eq!(Subtensor::get_stake_of_neuron_hotkey_account_by_uid(neuron.uid), amount);
// The total stake should have been increased by the amount -> 0 + amount = amount
assert_eq!(Subtensor::get_total_stake(), amount);
});
} | rust_cleaned_test_functions.jsonl/17164 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 289
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
1261,
726,
2346,
13925,
36090,
33433,
792,
13500,
19817,
368,
341,
8638,
4452,
9927,
1005,
10257,
6615,
79453,
341,
197,
10217,
4017,
792,
842,
284,
220,
20,
19,
19,
20,
280,
197,
10217,
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... | 2 |
#[test]
fn test_term_with_unstable_snapshot() {
let storagesnapi = 10064;
let unstablesnapi = storagesnapi + 5;
let store = MemStorage::new();
store
.wl()
.apply_snapshot(new_snapshot(storagesnapi, 1))
.expect("apply failed.");
let mut raft_log = RaftLog::new(store, default_logger());
raft_log.restore(new_snapshot(unstablesnapi, 1));
let tests = vec![
// cannot get term from storage
(storagesnapi, 0),
// cannot get term from the gap between storage ents and unstable snapshot
(storagesnapi + 1, 0),
(unstablesnapi - 1, 0),
// get term from unstable snapshot index
(unstablesnapi, 1),
];
for (i, &(index, w)) in tests.iter().enumerate() {
let term = raft_log.term(index).expect("");
if term != w {
panic!("#{}: at = {}, want {}", i, term, w);
}
}
} | rust_cleaned_test_functions.jsonl/48409 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 519
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17464,
6615,
4907,
27992,
53265,
368,
341,
286,
1077,
33689,
1134,
77,
2068,
284,
220,
16,
15,
15,
21,
19,
280,
286,
1077,
64790,
4788,
77,
2068,
284,
33689,
1134,
77,
2068,
488,
220,
20,
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... | 3 |
#[test]
fn test_duration_overflow_struct() {
assert_de_tokens_error::<Duration>(
&[
Token::Struct {
name: "Duration",
len: 2,
},
Token::Str("secs"),
Token::U64(u64::max_value()),
Token::Str("nanos"),
Token::U32(1_000_000_000),
Token::StructEnd,
],
"overflow deserializing Duration",
);
} | rust_cleaned_test_functions.jsonl/129550 | {
"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,
25454,
79073,
15126,
368,
341,
262,
2060,
2259,
28838,
4096,
27638,
12945,
17055,
286,
609,
9640,
310,
9660,
486,
9422,
341,
394,
829,
25,
330,
12945,
756,
394,
2422,
25,
220,
17,
345,
310,
1153... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_no_documentation() {
let schema =
Schema::from_str(r#"{"type": "enum", "name": "Coin", "symbols": ["heads", "tails"]}"#)
.unwrap();
let doc = match schema.top_node().inner {
SchemaPiece::Enum { doc, .. } => doc.clone(),
_ => panic!(),
};
assert!(doc.is_none());
} | rust_cleaned_test_functions.jsonl/23011 | {
"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,
6536,
26231,
367,
368,
341,
286,
1077,
10802,
4035,
310,
12539,
486,
1499,
2895,
2601,
55543,
4913,
1313,
788,
330,
9018,
497,
330,
606,
788,
330,
41180,
497,
330,
67426,
788,
4383,
35810,
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_output_utf8_error() {
use std::ffi::OsString;
use std::os::unix::ffi::OsStringExt;
let mut cmd = process::Command::new("printf");
cmd.arg(OsString::from_vec(b"\xFF".to_vec()));
match output(cmd) {
Err(OutputError::Utf8(_)) => {}
result => panic!("expected utf8 output error but got: {:?}", result),
}
} | rust_cleaned_test_functions.jsonl/74399 | {
"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,
7645,
39453,
23,
4096,
368,
341,
220,
990,
1460,
486,
53799,
486,
28867,
703,
280,
220,
990,
1460,
486,
436,
486,
56646,
486,
53799,
486,
28867,
703,
6756,
401,
220,
1077,
5206,
5439,
284,
1882,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_chrony_time_offset() {
let s = r#"
Remote address : 10.73.10.10 (0A490A0A)
Remote port : 123
Local address : 10.73.10.12 (0A490A0C)
Leap status : Normal
Version : 4
Mode : Server
Stratum : 11
Poll interval : 4 (16 seconds)
Precision : -25 (0.000000030 seconds)
Root delay : 0.000000 seconds
Root dispersion : 0.011124 seconds
Reference ID : 7F7F0100 ()
Reference time : Fri Sep 13 08:03:04 2019
Offset : +0.000026767 seconds
Peer delay : 0.000403893 seconds
Peer dispersion : 0.000000056 seconds
Response time : 0.000079196 seconds
Jitter asymmetry: +0.00
NTP tests : 111 111 1111
Interleaved : No
Authenticated : No
TX timestamping : Kernel
RX timestamping : Kernel
Total TX : 1129
Total RX : 1129
Total valid RX : 1129"#;
assert_eq!(
parse_chrony_time_offset(s),
Some("0.000026767 seconds".to_string().into())
);
} | rust_cleaned_test_functions.jsonl/14478 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 449
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
4138,
2248,
88,
3009,
6917,
368,
341,
286,
1077,
274,
284,
435,
2,
1837,
24703,
2621,
220,
549,
220,
16,
15,
13,
22,
18,
13,
16,
15,
13,
16,
15,
320,
15,
32,
19,
24,
15,
32,
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_cpu_physical_bits() {
let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
let guest = Guest::new(Box::new(focal));
let max_phys_bits: u8 = 36;
let mut child = GuestCommand::new(&guest)
.args(&["--cpus", &format!("max_phys_bits={}", max_phys_bits)])
.args(&["--memory", "size=512M"])
.args(&["--kernel", direct_kernel_boot_path().to_str().unwrap()])
.args(&["--cmdline", DIRECT_KERNEL_BOOT_CMDLINE])
.default_disks()
.default_net()
.capture_output()
.spawn()
.unwrap();
let r = std::panic::catch_unwind(|| {
guest.wait_vm_boot(None).unwrap();
assert!(
guest
.ssh_command("lscpu | grep \"Address sizes:\" | cut -f 2 -d \":\" | sed \"s# *##\" | cut -f 1 -d \" \"")
.unwrap()
.trim()
.parse::<u8>()
.unwrap_or(max_phys_bits + 1) <= max_phys_bits,
);
});
let _ = child.kill();
let output = child.wait_with_output().unwrap();
handle_child_output(r, &output);
} | rust_cleaned_test_functions.jsonl/29356 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 784
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21795,
84980,
20034,
368,
341,
310,
1077,
41099,
284,
34960,
47583,
2648,
486,
931,
7,
3788,
49533,
19121,
4708,
2389,
3904,
1423,
310,
1077,
8640,
284,
26215,
486,
931,
67758,
486,
931,
955,
3683... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_doc_url_inherent_method() {
check(
r#"
pub struct Foo;
impl Foo {
pub fn met$0hod() {}
}
"#,
expect![[r##"https://docs.rs/test/*/test/struct.Foo.html#method.method"##]],
);
} | rust_cleaned_test_functions.jsonl/61957 | {
"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,
18869,
2903,
1243,
37538,
9032,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
9585,
2036,
33428,
401,
6383,
33428,
341,
262,
6675,
5168,
2270,
3,
15,
71,
347,
368,
5613,
630,
57676,
345,
310,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_test_ledger_blocks() {
let blocks_and_transactions = get_test_ledger_blocks(3);
assert_eq!(
blocks_and_transactions.len(),
3,
"{:#?}",
blocks_and_transactions
);
let blocks: Vec<Block> = blocks_and_transactions
.iter()
.map(|(block, _transactions)| block.clone())
.collect();
// The first block must be the origin block.
let origin_block: &Block = blocks.get(0).unwrap();
assert_eq!(origin_block.parent_id.as_ref(), [0u8; 32]);
assert_eq!(origin_block.index, 0);
// Each block's parent_id must be the block_id of the previous block.
let mut previous_block = origin_block;
for block in blocks[1..].iter() {
assert_eq!(block.parent_id, previous_block.id);
previous_block = block;
}
// Each block's ID must agree with the block content hashes.
for (block, _transactions) in blocks_and_transactions.iter() {
let derived_block_id = compute_block_id(
block.version,
&block.parent_id,
block.index,
block.cumulative_txo_count,
&block.root_element,
&block.contents_hash,
);
assert_eq!(block.id, derived_block_id);
}
// Contents hashes maust match contents
for (block, block_contents) in blocks_and_transactions {
assert_eq!(block.contents_hash, block_contents.hash());
}
} | rust_cleaned_test_functions.jsonl/20318 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 780
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
4452,
38367,
1389,
25201,
368,
341,
286,
1077,
10010,
8378,
68182,
284,
633,
4452,
38367,
1389,
25201,
7,
18,
317,
286,
2060,
10714,
33673,
310,
10010,
8378,
68182,
19406,
3148,
310,
220,
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_in_place_iterator_specialization() {
let src: Box<[usize]> = Box::new([1, 2, 3]);
let src_ptr = src.as_ptr();
let sink: Box<_> = src.into_vec().into_iter().map(std::convert::identity).collect();
let sink_ptr = sink.as_ptr();
assert_eq!(src_ptr, sink_ptr);
} | rust_cleaned_test_functions.jsonl/80831 | {
"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,
1243,
34548,
13491,
41629,
2022,
368,
341,
262,
1077,
2286,
25,
8261,
66746,
51878,
25669,
284,
8261,
486,
931,
2561,
16,
11,
220,
17,
11,
220,
18,
2558,
262,
1077,
2286,
4348,
284,
2286,
5357,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tiledinputpart_num_x_levels_success() {
let input = MultiPartInputFile::new(&*SRC_IMAGE_PATH, 0, true).unwrap();
let tiled_input_part = super::TiledInputPart::new(&input, 0);
let num_x_levels = tiled_input_part.num_x_levels();
assert_eq!(num_x_levels, 1);
} | rust_cleaned_test_functions.jsonl/59297 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 145
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
2181,
1355,
4480,
4273,
3212,
37819,
18632,
368,
341,
286,
1077,
1946,
284,
17439,
5800,
2505,
1703,
486,
931,
2099,
9,
56017,
19121,
7944,
11,
220,
15,
11,
830,
568,
15454,
543,
286,
1077,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_corner() {
for &d in &[(1 << 63) - 1, 1 << 63, (1 << 63) + 1, std::u64::MAX] {
let cd = ConstDiv::new(d);
for &n in &[0, 1, d - 1, d, d.saturating_add(1), d.saturating_mul(2)] {
assert_eq!(cd.quot(n), n / d);
assert_eq!(cd.rem(n), n % d);
}
}
} | rust_cleaned_test_functions.jsonl/120666 | {
"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,
66884,
368,
341,
262,
369,
609,
67,
304,
609,
9697,
16,
1115,
220,
21,
18,
8,
481,
220,
16,
11,
220,
16,
1115,
220,
21,
18,
11,
320,
16,
1115,
220,
21,
18,
8,
488,
220,
16,
11,
1460,
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_macro_expand_normal() {
let def = do_limited_resolve(
r#"
macro_rules! foo {
($ident:ident) => { struct $ident {} }
}
foo!(Bar);
"#,
16,
16,
);
assert_eq!(def.poison_macros.len(), 0);
} | rust_cleaned_test_functions.jsonl/18468 | {
"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,
58810,
67875,
13973,
368,
341,
286,
1077,
707,
284,
653,
907,
31511,
77291,
1006,
310,
435,
2,
698,
286,
18072,
21407,
0,
15229,
341,
310,
1711,
1713,
25,
1713,
8,
589,
314,
2036,
400,
1713,
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_prefix_is_removed_from_key() {
env::set_var("B_A_C", "abc");
let environment = Environment::with_prefix("B");
assert!(environment.collect().unwrap().contains_key("a_c"));
env::remove_var("B_A_C");
} | rust_cleaned_test_functions.jsonl/22983 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 102
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13974,
6892,
68248,
5673,
3097,
368,
341,
262,
6105,
486,
746,
4612,
445,
33,
1566,
920,
497,
330,
13683,
3071,
262,
1077,
4573,
284,
11586,
486,
4197,
13974,
445,
33,
3071,
262,
2060,
10297,
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 |
#[test]
fn test_parse_query_to_ast_ab_c() {
test_parse_query_to_logical_ast_helper(
"(+title:a +title:b) title:c",
"((+Term(field=0,bytes=[97]) +Term(field=0,bytes=[98])) Term(field=0,bytes=[99]))",
false,
);
test_parse_query_to_logical_ast_helper(
"(+title:a +title:b) title:c",
"(+(+Term(field=0,bytes=[97]) +Term(field=0,bytes=[98])) +Term(field=0,bytes=[99]))",
true,
);
} | rust_cleaned_test_functions.jsonl/27033 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 277
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
5738,
2346,
48019,
22885,
666,
368,
341,
286,
1273,
21039,
5738,
2346,
86484,
48019,
10418,
1006,
310,
11993,
10,
2102,
43833,
488,
2102,
43973,
8,
2265,
48031,
756,
310,
330,
1188,
10,
172... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_opt_only_end() {
let args = vec!["--".to_owned()];
match Options::new().optflag("t", "test", "testing").parse(&args) {
Ok(ref m) => {
assert!(!m.opt_present("test"));
assert!(!m.opt_present("t"));
assert_eq!(m.free.len(), 0);
}
_ => panic!(),
}
} | rust_cleaned_test_functions.jsonl/52365 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 182
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15032,
18410,
6213,
368,
341,
262,
1077,
2827,
284,
7486,
0,
1183,
313,
3263,
983,
51973,
33800,
262,
2432,
14566,
486,
931,
1005,
2912,
9903,
445,
83,
497,
330,
1944,
497,
330,
8840,
1827,
6400... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_pos_merge() {
let test = |name, (exp_start, exp_end), ((fst_start, fst_end), (snd_start, snd_end))| {
assert_eq!(
Ok(make_pos("a", exp_start, exp_end)),
Pos::merge(
&make_pos("a", fst_start, fst_end),
&make_pos("a", snd_start, snd_end)
),
"{}",
name
);
// Run this again because we want to test that we get the same
// result regardless of order.
assert_eq!(
Ok(make_pos("a", exp_start, exp_end)),
Pos::merge(
&make_pos("a", snd_start, snd_end),
&make_pos("a", fst_start, fst_end),
),
"{} (reversed)",
name
);
};
test(
"basic test",
((0, 0, 0), (0, 0, 5)),
(((0, 0, 0), (0, 0, 2)), ((0, 0, 2), (0, 0, 5))),
);
test(
"merge should work with gaps",
((0, 0, 0), (0, 0, 15)),
(((0, 0, 0), (0, 0, 5)), ((0, 0, 10), (0, 0, 15))),
);
test(
"merge should work with overlaps",
((0, 0, 0), (0, 0, 15)),
(((0, 0, 0), (0, 0, 12)), ((0, 0, 7), (0, 0, 15))),
);
test(
"merge should work between lines",
((0, 0, 0), (2, 20, 25)),
(((0, 0, 0), (1, 10, 15)), ((1, 10, 20), (2, 20, 25))),
);
assert_eq!(
Err("Position in separate files |a and |b".to_string()),
Pos::merge(
&make_pos("a", (0, 0, 0), (0, 0, 0)),
&make_pos("b", (0, 0, 0), (0, 0, 0))
),
"should reject merges with different filenames"
);
} | rust_cleaned_test_functions.jsonl/1048 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1152
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6479,
20888,
368,
341,
286,
1077,
1273,
284,
760,
606,
11,
320,
4580,
4906,
11,
1343,
6213,
701,
1781,
49494,
4906,
11,
48434,
6213,
701,
320,
46395,
4906,
11,
28612,
6213,
593,
91,
341,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_frob_table_noop() {
let mut toml = toml! {
[package]
name = "foo"
version = "1.0"
[dependencies]
bar = "1.0"
[dev-dependencies]
baz = "1.0"
[target."cfg(unix)".dependencies]
quux = "1.0"
};
let result = toml.clone();
assert!(!frob_table(toml.as_table_mut().unwrap(), "foo", "1.0"));
assert_eq!(toml, result);
} | rust_cleaned_test_functions.jsonl/64641 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 294
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
22740,
5237,
6536,
453,
368,
341,
286,
1077,
5206,
311,
1014,
284,
311,
1014,
0,
341,
310,
508,
1722,
921,
310,
829,
284,
330,
7975,
698,
310,
2319,
284,
330,
16,
13,
15,
1837,
310,
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_split_stereo() {
let f2 = vec![1.0, 1.0, 2.0, 2.0, 3.0, 3.0];
let (f_left, f_right) = split_stereo_wave(f2);
assert_eq!(f_left, f_right);
} | rust_cleaned_test_functions.jsonl/39991 | {
"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,
17052,
1261,
64853,
368,
341,
286,
1077,
282,
17,
284,
7486,
20703,
16,
13,
15,
11,
220,
16,
13,
15,
11,
220,
17,
13,
15,
11,
220,
17,
13,
15,
11,
220,
18,
13,
15,
11,
220,
18,
13,
15,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dual_vec_cbrt() {
let res = DualVec64::<2>::new(1.2, StaticVec::new_vec([1.0, 1.0])).cbrt();
assert!((res.re - 1.06265856918261).abs() < 1e-12);
assert!((res.eps[0] - 0.295182935884059).abs() < 1e-12);
assert!((res.eps[1] - 0.295182935884059).abs() < 1e-12);
} | rust_cleaned_test_functions.jsonl/28603 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 161
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
96772,
13251,
666,
1323,
83,
368,
341,
262,
1077,
592,
284,
33659,
10050,
21,
19,
27638,
17,
6831,
931,
7,
16,
13,
17,
11,
23105,
10050,
486,
931,
13251,
2561,
16,
13,
15,
11,
220,
16,
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_iterate_into_string() {
let words = vec!["hello", " ", "world"];
let capitalized_words = words.into_iter().map(capitalize_first).collect::<String>();
assert_eq!(capitalized_words, "Hello World");
} | rust_cleaned_test_functions.jsonl/50864 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11723,
349,
45514,
3904,
368,
341,
286,
1077,
4244,
284,
7486,
0,
1183,
14990,
497,
330,
3670,
330,
14615,
6332,
286,
1077,
97321,
18981,
284,
4244,
39860,
11723,
1005,
2186,
51386,
34313,
12978,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_typeid_unsized_types() {
trait Z {}
struct X(str);
struct Y(dyn Z + 'static);
assert_eq!(TypeId::of::<X>(), TypeId::of::<X>());
assert_eq!(TypeId::of::<Y>(), TypeId::of::<Y>());
assert!(TypeId::of::<X>() != TypeId::of::<Y>());
} | rust_cleaned_test_functions.jsonl/132745 | {
"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,
1819,
307,
4907,
82,
1506,
9763,
368,
341,
262,
17567,
1863,
5613,
262,
2036,
1599,
4199,
317,
262,
2036,
809,
1500,
1872,
1863,
488,
364,
1978,
626,
262,
2060,
10714,
10297,
31934,
486,
1055,
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_scm_credentials() {
use nix::sys::uio::IoVec;
use nix::unistd::{close, getpid, getuid, getgid};
use nix::sys::socket::{socketpair, sendmsg, recvmsg,
AddressFamily, SockType, SockFlag,
ControlMessage, ControlMessageOwned, MsgFlags,
UnixCredentials};
#[cfg(any(target_os = "android", target_os = "linux"))]
use nix::sys::socket::{setsockopt, sockopt::PassCred};
let (send, recv) = socketpair(AddressFamily::Unix, SockType::Stream, None, SockFlag::empty())
.unwrap();
#[cfg(any(target_os = "android", target_os = "linux"))]
setsockopt(recv, PassCred, &true).unwrap();
{
let iov = [IoVec::from_slice(b"hello")];
#[cfg(any(target_os = "android", target_os = "linux"))]
let cred = UnixCredentials::new();
#[cfg(any(target_os = "android", target_os = "linux"))]
let cmsg = ControlMessage::ScmCredentials(&cred);
#[cfg(any(target_os = "freebsd", target_os = "dragonfly"))]
let cmsg = ControlMessage::ScmCreds;
assert_eq!(sendmsg(send, &iov, &[cmsg], MsgFlags::empty(), None).unwrap(), 5);
close(send).unwrap();
}
{
let mut buf = [0u8; 5];
let iov = [IoVec::from_mut_slice(&mut buf[..])];
let mut cmsgspace = cmsg_space!(UnixCredentials);
let msg = recvmsg(recv, &iov, Some(&mut cmsgspace), MsgFlags::empty()).unwrap();
let mut received_cred = None;
for cmsg in msg.cmsgs() {
let cred = match cmsg {
#[cfg(any(target_os = "android", target_os = "linux"))]
ControlMessageOwned::ScmCredentials(cred) => cred,
#[cfg(any(target_os = "freebsd", target_os = "dragonfly"))]
ControlMessageOwned::ScmCreds(cred) => cred,
other => panic!("unexpected cmsg {:?}", other),
};
assert!(received_cred.is_none());
assert_eq!(cred.pid(), getpid().as_raw());
assert_eq!(cred.uid(), getuid().as_raw());
assert_eq!(cred.gid(), getgid().as_raw());
received_cred = Some(cred);
}
received_cred.expect("no creds received");
assert_eq!(msg.bytes, 5);
assert!(!msg.flags.intersects(MsgFlags::MSG_TRUNC | MsgFlags::MSG_CTRUNC));
close(recv).unwrap();
}
} | rust_cleaned_test_functions.jsonl/134663 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1189
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
6226,
47396,
368,
341,
262,
990,
308,
941,
486,
7791,
486,
84,
815,
486,
42799,
10050,
280,
262,
990,
308,
941,
486,
27483,
22964,
5552,
11,
95378,
11,
633,
2423,
11,
633,
34849,
2440,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_variant_str_iter_nth() {
let v = Variant::array_from_iter::<String, _>([
"0".to_string().to_variant(),
"1".to_string().to_variant(),
"2".to_string().to_variant(),
"3".to_string().to_variant(),
"4".to_string().to_variant(),
"5".to_string().to_variant(),
]);
let mut iter = v.array_iter_str().unwrap();
assert_eq!(iter.len(), 6);
assert_eq!(iter.nth(1), Some("1"));
assert_eq!(iter.len(), 4);
assert_eq!(iter.next(), Some("2"));
assert_eq!(iter.nth_back(2), Some("3"));
assert_eq!(iter.len(), 0);
assert_eq!(iter.next(), None);
assert_eq!(iter.next_back(), None);
} | rust_cleaned_test_functions.jsonl/89147 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 403
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46112,
2895,
11723,
78342,
368,
341,
286,
1077,
348,
284,
39292,
486,
1653,
5673,
11723,
27638,
703,
11,
716,
2235,
9640,
310,
330,
15,
3263,
983,
3904,
1005,
983,
46112,
3148,
310,
330,
16,
326... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fs_update_event_error() {
let m = GuestMemory::new(&[(GuestAddress(0), 0x10000)]).unwrap();
let (mut h, _vq) = default_test_blockepollhandler(&m);
// This should panic because payload is empty for event type FS_UPDATE_EVENT.
let r = h.handle_event(FS_UPDATE_EVENT, 0, EpollHandlerPayload::Empty);
match r {
Err(DeviceError::PayloadExpected) => (),
_ => panic!("invalid"),
}
} | rust_cleaned_test_functions.jsonl/57137 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 213
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34470,
8882,
6748,
4096,
368,
341,
286,
1077,
296,
284,
26215,
10642,
486,
931,
2099,
9697,
37804,
4286,
7,
15,
701,
220,
15,
87,
16,
15,
15,
15,
15,
7252,
568,
15454,
543,
286,
1077,
320,
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... | 2 |
#[test]
fn test_expr() {
check(
r#"
macro_rules! m {
($e:expr) => { fn bar() { $e; } }
}
m! { 2 + 2 * baz(3).quux() }
"#,
expect![[r#"
macro_rules! m {
($e:expr) => { fn bar() { $e; } }
}
fn bar() {
2+2*baz(3).quux();
}
"#]],
)
} | rust_cleaned_test_functions.jsonl/85224 | {
"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,
21915,
368,
341,
262,
1779,
1006,
286,
435,
2,
698,
32606,
21407,
0,
296,
341,
262,
1711,
68,
96011,
8,
589,
314,
5168,
3619,
368,
314,
400,
68,
26,
335,
456,
630,
76,
0,
314,
220,
17,
488... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_scan() {
let table_id = 1;
let pk = table::encode_row_key(table_id, 1);
let pv = b"value1";
let test_data = vec![
(pk.clone(), pv.to_vec()),
(table::encode_row_key(table_id, 2), b"value2".to_vec()),
];
let mut test_store = TestStore::new(&test_data);
let (snapshot, start_ts) = test_store.get_snapshot();
let store = SnapshotStore::new(snapshot, start_ts, IsolationLevel::SI, true);
let range = get_range(table_id, i64::MIN, i64::MAX);
let mut scanner = Scanner::new(&store, ScanOn::Table, false, false, range).unwrap();
for &(ref k, ref v) in &test_data {
let (key, value) = scanner.next_row().unwrap().unwrap();
assert_eq!(k, &key);
assert_eq!(*v, value);
}
assert!(scanner.next_row().unwrap().is_none());
} | rust_cleaned_test_functions.jsonl/121694 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 445
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28857,
368,
341,
286,
1077,
1965,
842,
284,
220,
16,
280,
286,
1077,
22458,
284,
1965,
486,
6180,
8530,
3097,
15761,
842,
11,
220,
16,
317,
286,
1077,
33491,
284,
293,
63307,
16,
876,
286,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_good_port_values() {
// Take the lock so changing the environment doesn't cause races.
let _env_lock = ENV_LOCK.lock().unwrap();
env::set_var(CONFIG_ENV, "stage");
check_config!(RocketConfig::parse(r#"
[stage]
port = 100
"#.to_string(), TEST_CONFIG_FILENAME), {
default_config(Staging).port(100)
});
check_config!(RocketConfig::parse(r#"
[stage]
port = 6000
"#.to_string(), TEST_CONFIG_FILENAME), {
default_config(Staging).port(6000)
});
check_config!(RocketConfig::parse(r#"
[stage]
port = 65535
"#.to_string(), TEST_CONFIG_FILENAME), {
default_config(Staging).port(65535)
});
} | rust_cleaned_test_functions.jsonl/35242 | {
"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,
44781,
8716,
9146,
368,
341,
286,
442,
11778,
279,
5296,
773,
10018,
279,
4573,
3171,
944,
5240,
20588,
624,
286,
1077,
716,
3160,
9818,
284,
32791,
27661,
21003,
1005,
15454,
543,
286,
6105,
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_usage_description_wrapping() {
// indentation should be 24 spaces
// lines wrap after 78: or rather descriptions wrap after 54
let optgroups = vec!(
optflag("k", "kiwi",
"This is a long description which won't be wrapped..+.."),
optflag("a", "apple",
"This is a long description which _will_ be wrapped..+.."));
let expected =
"Usage: fruits
Options:
-k --kiwi This is a long description which won't be wrapped..+..
-a --apple This is a long description which _will_ be
wrapped..+..
";
let usage = usage("Usage: fruits", optgroups.as_slice());
debug!("expected: <<{}>>", expected);
debug!("generated: <<{}>>", usage);
assert!(usage == expected)
} | rust_cleaned_test_functions.jsonl/11206 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 371
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31507,
11448,
44074,
3629,
368,
341,
286,
442,
69592,
1265,
387,
220,
17,
19,
12621,
198,
286,
442,
5128,
15061,
1283,
220,
22,
23,
25,
476,
4751,
27787,
15061,
1283,
220,
20,
19,
271,
286,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_width() {
let input: [u8; 8] = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00];
let expected_output = unindent(
"
0000000 000000 000000
0000004 000000 000000
0000010
",
);
new_ucmd!()
.arg("-w4")
.arg("-v")
.run_piped_stdin(&input[..])
.success()
.no_stderr()
.stdout_is(expected_output);
} | rust_cleaned_test_functions.jsonl/48808 | {
"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,
7927,
368,
341,
262,
1077,
1946,
25,
508,
84,
23,
26,
220,
23,
60,
284,
508,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
220,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_create_datetime_full_from_int() {
assert_eq!(Value::DateTime(DateTime::new(Date::new_str("2012", "01", "03"), Some(Time::new_str(
"03", "30", "30", Some("3030"), Some(TimeOffset::Time(TimeOffsetAmount::new_str(
"+", "07", "45"
)))
)))), Value::datetime_full_from_int(2012, 1, 3, 3, 30, 30, 3030, "+", 7, 45).unwrap());
} | rust_cleaned_test_functions.jsonl/86229 | {
"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,
8657,
28943,
16372,
5673,
4042,
368,
341,
262,
2060,
10714,
10297,
1130,
486,
7689,
32083,
486,
931,
19987,
486,
931,
2895,
445,
17,
15,
16,
17,
497,
330,
15,
16,
497,
330,
15,
18,
3975,
4329,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_btreemap_from_unit() {
assert_de_tokens_error::<BTreeMap<isize, isize>>(
&[Token::Unit],
"invalid type: unit value, expected a map",
);
} | rust_cleaned_test_functions.jsonl/129540 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 91
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
10157,
42040,
5673,
14832,
368,
341,
262,
2060,
2259,
28838,
4096,
27638,
33,
6533,
2227,
27,
285,
551,
11,
91373,
97238,
286,
44590,
3323,
486,
4562,
1259,
286,
330,
11808,
943,
25,
4982,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_source_location_queries() {
let mut db = HeliosDatabase::default();
db.set_source(FILE_ID, Arc::new(SOURCE.to_string()));
assert_eq!(db.source(FILE_ID), Arc::new(SOURCE.to_string()));
assert_eq!(db.source_len(FILE_ID), 31);
let indexes = vec![0, 10, 20, 21, 31];
assert_eq!(db.source_line_indexes(FILE_ID), Arc::new(indexes));
assert_eq!(db.source_line_start(FILE_ID, 0), 0);
assert_eq!(db.source_line_start(FILE_ID, 1), 10);
assert_eq!(db.source_line_start(FILE_ID, 2), 20);
assert_eq!(db.source_line_start(FILE_ID, 3), 21);
assert_eq!(db.source_line_start(FILE_ID, 4), 31);
assert_eq!(db.source_line_range(FILE_ID, 0), 0..10);
assert_eq!(db.source_line_range(FILE_ID, 1), 10..20);
assert_eq!(db.source_line_range(FILE_ID, 2), 20..21);
assert_eq!(db.source_line_range(FILE_ID, 3), 21..31);
assert_eq!(db.source_line_range(FILE_ID, 4), 31..31);
assert_eq!(db.source_line_index(FILE_ID, 0), 0);
assert_eq!(db.source_line_index(FILE_ID, 1), 0);
assert_eq!(db.source_line_index(FILE_ID, 5), 0);
assert_eq!(db.source_line_index(FILE_ID, 9), 0);
assert_eq!(db.source_line_index(FILE_ID, 10), 1);
assert_eq!(db.source_line_index(FILE_ID, 11), 1);
assert_eq!(db.source_line_index(FILE_ID, 15), 1);
assert_eq!(db.source_line_index(FILE_ID, 19), 1);
assert_eq!(db.source_line_index(FILE_ID, 20), 2);
assert_eq!(db.source_line_index(FILE_ID, 21), 3);
assert_eq!(db.source_line_index(FILE_ID, 22), 3);
assert_eq!(db.source_line_index(FILE_ID, 26), 3);
assert_eq!(db.source_line_index(FILE_ID, 30), 3);
assert_eq!(db.source_line_index(FILE_ID, 31), 4);
assert_eq!(db.source_column_index(FILE_ID, 0, 0), 0);
assert_eq!(db.source_column_index(FILE_ID, 0, 1), 1);
assert_eq!(db.source_column_index(FILE_ID, 0, 5), 5);
assert_eq!(db.source_column_index(FILE_ID, 0, 9), 9);
assert_eq!(db.source_column_index(FILE_ID, 1, 10), 0);
assert_eq!(db.source_column_index(FILE_ID, 1, 11), 1);
assert_eq!(db.source_column_index(FILE_ID, 1, 15), 5);
assert_eq!(db.source_column_index(FILE_ID, 1, 19), 9);
assert_eq!(db.source_column_index(FILE_ID, 2, 20), 0);
assert_eq!(db.source_column_index(FILE_ID, 3, 21), 0);
assert_eq!(db.source_column_index(FILE_ID, 3, 22), 1);
assert_eq!(db.source_column_index(FILE_ID, 3, 26), 5);
assert_eq!(db.source_column_index(FILE_ID, 3, 30), 9);
assert_eq!(db.source_column_index(FILE_ID, 4, 31), 0);
assert_eq!(db.source_position_at_offset(FILE_ID, 0), (0, 0));
assert_eq!(db.source_position_at_offset(FILE_ID, 1), (0, 1));
assert_eq!(db.source_position_at_offset(FILE_ID, 5), (0, 5));
assert_eq!(db.source_position_at_offset(FILE_ID, 9), (0, 9));
assert_eq!(db.source_position_at_offset(FILE_ID, 10), (1, 0));
assert_eq!(db.source_position_at_offset(FILE_ID, 11), (1, 1));
assert_eq!(db.source_position_at_offset(FILE_ID, 15), (1, 5));
assert_eq!(db.source_position_at_offset(FILE_ID, 19), (1, 9));
assert_eq!(db.source_position_at_offset(FILE_ID, 20), (2, 0));
assert_eq!(db.source_position_at_offset(FILE_ID, 21), (3, 0));
assert_eq!(db.source_position_at_offset(FILE_ID, 22), (3, 1));
assert_eq!(db.source_position_at_offset(FILE_ID, 26), (3, 5));
assert_eq!(db.source_position_at_offset(FILE_ID, 30), (3, 9));
assert_eq!(db.source_position_at_offset(FILE_ID, 31), (4, 0));
} | rust_cleaned_test_functions.jsonl/98549 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1804
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10347,
13126,
65588,
368,
341,
286,
1077,
5206,
2927,
284,
15806,
3530,
5988,
486,
2258,
543,
286,
2927,
980,
10347,
33293,
3450,
11,
19689,
486,
931,
3759,
13077,
2389,
3904,
25138,
286,
2060,
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_branch_truncate_to() {
let hdr: MapxOrdRawKeyVs<usize> = MapxOrdRawKeyVs::new();
let vn = VersionName(b"manster0");
pnk!(hdr.version_create(vn));
let mkey0 = <usize as ValueEnDe>::encode(&1);
let mvalue0 = 1;
pnk!(hdr.insert(mkey0.clone(), mvalue0));
pnk!(hdr.version_create(VersionName(b"manster1")));
let mkey1 = <usize as ValueEnDe>::encode(&2);
let mvalue1 = 2;
pnk!(hdr.insert(mkey1.clone(), mvalue1));
pnk!(hdr.branch_truncate_to(INITIAL_BRANCH_NAME, vn));
assert!(hdr.get(&mkey1).is_none());
} | rust_cleaned_test_functions.jsonl/53982 | {
"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,
28031,
3547,
26900,
2346,
368,
341,
262,
1077,
36615,
25,
5027,
87,
24621,
20015,
1592,
51737,
90244,
29,
284,
5027,
87,
24621,
20015,
1592,
51737,
486,
931,
543,
262,
1077,
51017,
284,
6079,
675,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_node_types_with_fields_on_hidden_tokens() {
let node_types = get_node_types(InputGrammar {
name: String::new(),
extra_symbols: Vec::new(),
external_tokens: Vec::new(),
expected_conflicts: Vec::new(),
variables_to_inline: Vec::new(),
word_token: None,
supertype_symbols: vec![],
variables: vec![Variable {
name: "script".to_string(),
kind: VariableType::Named,
rule: Rule::seq(vec![
Rule::field("a".to_string(), Rule::pattern("hi")),
Rule::field("b".to_string(), Rule::pattern("bye")),
]),
}],
});
assert_eq!(
node_types,
[NodeInfoJSON {
kind: "script".to_string(),
named: true,
fields: Some(BTreeMap::new()),
children: None,
subtypes: None
}]
);
} | rust_cleaned_test_functions.jsonl/8323 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 595
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5084,
9763,
6615,
12132,
4470,
26739,
28838,
368,
341,
286,
1077,
2436,
9763,
284,
633,
5084,
9763,
29773,
97178,
341,
310,
829,
25,
923,
486,
931,
3148,
310,
4960,
55752,
25,
11312,
486,
931,
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_write_three_byte_uint() {
let value = 0x01_23_45;
let mut buffer: Vec<u8> = vec![];
DecodedUInt::write_u64(&mut buffer, value).expect(WRITE_ERROR_MESSAGE);
let expected_bytes: &[u8] = &[0x01, 0x23, 0x45];
assert_eq!(expected_bytes, buffer.as_slice());
} | rust_cleaned_test_functions.jsonl/30849 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 161
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
50016,
19737,
15807,
368,
341,
286,
1077,
897,
284,
220,
15,
87,
15,
16,
62,
17,
18,
62,
19,
20,
280,
286,
1077,
5206,
4147,
25,
11312,
34837,
23,
29,
284,
7486,
0,
15078,
286,
3714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nonatomic() -> Result<()> {
let query: Query = parse(
r###"
from employees
take 20
filter country == "USA"
group [title, country] (
aggregate [
salary = average salary
]
)
group [title, country] (
aggregate [
sum_gross_cost = average salary
]
)
sort sum_gross_cost
"###,
)?;
assert_display_snapshot!((resolve_and_translate(query)?), @r###"
WITH table_0 AS (
SELECT
employees.*
FROM
employees
LIMIT
20
), table_1 AS (
SELECT
title,
country,
AVG(salary) AS salary
FROM
table_0
WHERE
country = 'USA'
GROUP BY
title,
country
)
SELECT
title,
country,
AVG(salary) AS sum_gross_cost
FROM
table_1
GROUP BY
title,
country
ORDER BY
sum_gross_cost
"###);
Ok(())
} | rust_cleaned_test_functions.jsonl/62559 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 788
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21637,
6618,
368,
1464,
5714,
71698,
341,
1789,
286,
1077,
3239,
25,
11361,
284,
4715,
1006,
310,
435,
14374,
698,
310,
504,
8256,
198,
310,
1896,
220,
17,
15,
198,
310,
4051,
3146,
621,
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... | 3 |
#[test]
fn test_split_stdin_num_chunks() {
new_ucmd!()
.args(&["--number=1"])
.fails()
.code_is(1)
.stderr_only("split: -: cannot determine file size");
} | rust_cleaned_test_functions.jsonl/25865 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 106
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
15656,
258,
4273,
65470,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
313,
4082,
28,
16,
14108,
286,
659,
59631,
741,
286,
659,
1851,
6892,
7,
16,
340,
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 |
#[test]
fn test_copy_within_panics_src_out_of_bounds() {
let mut bytes = *b"Hello, World!";
bytes.copy_within(usize::max_value()..=usize::max_value(), 0);
} | rust_cleaned_test_functions.jsonl/18108 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 82
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16096,
72385,
71099,
1211,
16274,
6068,
3575,
36878,
368,
341,
262,
1077,
5206,
5820,
284,
353,
65,
1,
9707,
11,
4337,
26782,
1066,
262,
5820,
12232,
72385,
7,
51878,
486,
2810,
3142,
368,
496,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_printf_format() {
let s = "%-# 15a\\r\\\"\\\\\\a\\b\\e\\f\\v%+020.-23w\\x12\\167\\132\\112\\n";
let expected = vec![
Token::Directive {
flag: F_LEFT | F_ALTER | F_SPACE,
width: 15,
precision: -1,
format: 'a',
},
Token::Char('\r'),
Token::Char('"'),
Token::Char('\\'),
Token::Char('\x07'),
Token::Char('\x08'),
Token::Char('\x1B'),
Token::Char('\x0C'),
Token::Char('\x0B'),
Token::Directive {
flag: F_SIGN | F_ZERO,
width: 20,
precision: -1,
format: 'w',
},
Token::Char('\x12'),
Token::Char('w'),
Token::Char('Z'),
Token::Char('J'),
Token::Char('\n'),
];
assert_eq!(&expected, &Stater::generate_tokens(s, true).unwrap());
} | rust_cleaned_test_functions.jsonl/90493 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 624
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21823,
8955,
368,
341,
286,
1077,
274,
284,
5962,
12,
2,
220,
16,
20,
64,
3422,
81,
3422,
2105,
51007,
3422,
64,
3422,
65,
3422,
68,
3422,
69,
3422,
85,
4,
10,
15,
17,
15,
12612,
17,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ecdsa_no_support_for_missing_transcript_params() {
ic_test_utilities::artifact_pool_config::with_test_pool_config(|pool_config| {
with_test_replica_logger(|logger| {
let (mut ecdsa_pool, pre_signer) =
create_pre_signer_dependencies(pool_config, logger);
let id = create_transcript_id(1);
let dealing = create_dealing(id, NODE_2);
let change_set = vec![EcdsaChangeAction::AddToValidated(
EcdsaMessage::EcdsaSignedDealing(dealing),
)];
ecdsa_pool.apply_changes(change_set);
let block_reader =
TestEcdsaBlockReader::for_pre_signer_test(Height::from(100), vec![]);
let change_set = pre_signer.send_dealing_support(&ecdsa_pool, &block_reader);
assert!(change_set.is_empty());
})
})
} | rust_cleaned_test_functions.jsonl/86719 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 505
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36844,
96780,
6536,
25827,
5478,
40447,
7965,
1228,
6745,
368,
341,
286,
17902,
4452,
94044,
486,
63722,
15709,
5332,
486,
4197,
4452,
15709,
5332,
22428,
10285,
5332,
91,
341,
310,
448,
4452,
25533... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nonconformant() {
check_not_parses("");
check_not_parses("foo");
check_not_parses("v");
check_not_parses("v-1");
check_not_parses("valpha");
check_not_parses("vbeta3");
check_not_parses("vv1");
check_not_parses("v1alpha1hi");
check_not_parses("v1zeta3");
} | rust_cleaned_test_functions.jsonl/116489 | {
"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,
21637,
443,
627,
517,
368,
341,
286,
1779,
7913,
77113,
288,
13056,
286,
1779,
7913,
77113,
288,
445,
7975,
797,
286,
1779,
7913,
77113,
288,
445,
85,
797,
286,
1779,
7913,
77113,
288,
445,
85,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.