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_multiple_with_nulls() {
let array1 = StringArray::from(vec!["hello", "world"]).data();
let array2 = StringArray::from(vec![Some("1"), None]).data();
let arrays = vec![array1.as_ref(), array2.as_ref()];
let mut mutable = MutableArrayData::new(arrays, false, 5);
... | rust_cleaned_test_functions.jsonl/102342 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 280
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45233,
6615,
15162,
82,
368,
341,
286,
1077,
1334,
16,
284,
923,
1857,
486,
1499,
25592,
0,
1183,
14990,
497,
330,
14615,
45014,
691,
543,
286,
1077,
1334,
17,
284,
923,
1857,
486,
1499,
25592,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_custom_signal_handler_instance_calling_another_instance() -> Result<()> {
let engine = Engine::new(&Config::default());
let store = Store::new(&engine);
// instance1 which defines 'read'
let module1 = Module::new(&engine, WAT1)?;
let instance1 = Instance:... | rust_cleaned_test_functions.jsonl/19981 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 633
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15875,
21137,
10183,
11904,
13429,
287,
12008,
1575,
11904,
368,
1464,
5714,
71698,
341,
286,
1077,
4712,
284,
8200,
486,
931,
2099,
2648,
486,
2258,
1423,
286,
1077,
3553,
284,
9129,
486,
931,
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... | 6 |
#[test]
fn test_white_space_omitter() {
let source = "hello~ {{~world~}} \n !{{~#if true}}else{{/if~}}".to_string();
let t = Template::compile(source).ok().unwrap();
assert_eq!(t.elements.len(), 4);
assert_eq!(t.elements[0], RawString("hello~".to_string()));
assert_eq!(
t.elem... | rust_cleaned_test_functions.jsonl/12004 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 550
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44431,
14663,
62,
316,
3248,
368,
341,
262,
1077,
2530,
284,
330,
14990,
93,
257,
5867,
93,
14615,
93,
3417,
1124,
77,
220,
753,
2979,
93,
2,
333,
830,
3417,
1503,
2979,
14,
333,
93,
3417,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_str() {
let s = "this is a test";
let v = s.to_variant();
assert_eq!(v.str(), Some(s));
assert_eq!(42u32.to_variant().str(), None);
} | rust_cleaned_test_functions.jsonl/30212 | {
"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,
2895,
368,
341,
286,
1077,
274,
284,
330,
574,
374,
264,
1273,
876,
286,
1077,
348,
284,
274,
2389,
46112,
543,
286,
2060,
10714,
10297,
85,
9528,
1507,
4329,
1141,
1106,
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 |
#[test]
fn test_subtraction() {
let a = Scalar::zero();
let b = Scalar::one();
let c = Scalar::_sub_mod(&a, &b, 12289);
assert_eq!(c.rep, 12288);
} | rust_cleaned_test_functions.jsonl/1928 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 103
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
26425,
368,
341,
286,
1077,
264,
284,
35176,
486,
14154,
543,
286,
1077,
293,
284,
35176,
486,
603,
543,
286,
1077,
272,
284,
35176,
13541,
1966,
7480,
2099,
64,
11,
609,
65,
11,
220,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parser_renderer_many_to_many_via_ast() {
let ast = parse_to_ast(MANY_TO_MANY_DATAMODEL).expect("failed to parse");
let rendered = render_schema_ast_to_string(&ast);
print!("{}", rendered);
assert_eq!(rendered, MANY_TO_MANY_DATAMODEL);
} | rust_cleaned_test_functions.jsonl/33284 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 123
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18517,
52345,
22101,
2346,
22101,
80710,
48019,
368,
341,
262,
1077,
11763,
284,
4715,
2346,
48019,
3189,
17293,
8650,
97374,
36347,
1402,
2880,
43,
568,
17119,
445,
16091,
311,
4715,
797,
262,
1077... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_graham_hull_ccw() {
let initial = vec![
(1.0, 0.0),
(2.0, 1.0),
(1.75, 1.1),
(1.0, 2.0),
(0.0, 1.0),
(1.0, 0.0),
];
test_convexity(&initial);
} | rust_cleaned_test_functions.jsonl/127229 | {
"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,
15682,
1466,
309,
1523,
617,
28955,
86,
368,
341,
286,
1077,
2856,
284,
7486,
90515,
310,
320,
16,
13,
15,
11,
220,
15,
13,
15,
1326,
310,
320,
17,
13,
15,
11,
220,
16,
13,
15,
1326,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_quantile_vec() {
let mut h = Histogram::configure()
.max_value(1_000)
.precision(4)
.build()
.unwrap();
for i in 100..200 {
h.increment(i).ok().expect("error");
}
let pct = vec![0.0, 10.0, 25.0, 50.0, 7... | rust_cleaned_test_functions.jsonl/82157 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 415
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53346,
457,
13251,
368,
341,
286,
1077,
5206,
305,
284,
82138,
486,
21002,
741,
310,
659,
2810,
3142,
7,
16,
62,
15,
15,
15,
340,
310,
659,
27182,
7,
19,
340,
310,
659,
5834,
741,
310,
659,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_two_event_messages()
{
let payload = vec![
0x00, 0x00,
0x00,
0x02,
0x72, 0xe9, 0xe2, 0x84,
0x11, 0x63, 0x88, 0x88,
0x07,
0x00,
0x00,
0x00,
0x00, 0x00, 0x00, 0x45,
0x00, 0x00, 0x16, 0x8e,
0x00, 0x00, 0x45, 0x2b,
0xf3, 0x04, 0x02, 0x00, 0x02, 0x00, 0x6c, 0x00... | rust_cleaned_test_functions.jsonl/81444 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 860
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23241,
6748,
23428,
741,
515,
10217,
7729,
284,
7486,
90515,
197,
197,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
715,
197,
197,
15,
87,
15,
15,
11,
715,
197,
197,
15,
87,
15,
17,
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_wildcard() {
quick_test(
"SELECT * from person",
"Projection: #person.id, #person.first_name, #person.last_name, #person.age, #person.state, #person.salary, #person.birth_date, #person.😀\
\n TableScan: person projection=None",
);
} | rust_cleaned_test_functions.jsonl/62893 | {
"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,
1670,
695,
4951,
368,
341,
286,
3974,
4452,
1006,
310,
330,
4858,
353,
504,
1697,
756,
310,
330,
46321,
25,
671,
8987,
1764,
11,
671,
8987,
7389,
1269,
11,
671,
8987,
9110,
1269,
11,
671,
8987... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_filter_in_groupby_agg() -> Result<()> {
// This tests if the fitler is correctly handled by the binary expression.
// but the group tuples could still be untouched leading to out of bounds aggregation.
let df = df![
"a" => [1, 1, 2],
"b" => [1, 2, 3]
]?;
... | rust_cleaned_test_functions.jsonl/22407 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 450
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8727,
1243,
6288,
1694,
83534,
368,
1464,
5714,
71698,
341,
262,
442,
1096,
7032,
421,
279,
4946,
1536,
374,
12440,
17608,
553,
279,
7868,
7493,
624,
1066,
262,
442,
714,
279,
1874,
45225,
1410,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_to_from_u64() {
assert_eq!(1u64, U256::from(1u64).low_u64());
assert_eq!(11u64, U256::from(11u64).low_u64());
assert_eq!(111u64, U256::from(111u64).low_u64());
} | rust_cleaned_test_functions.jsonl/103848 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
5673,
7300,
21,
19,
368,
341,
286,
2060,
10714,
10297,
16,
84,
21,
19,
11,
547,
17,
20,
21,
486,
1499,
7,
16,
84,
21,
19,
568,
10303,
7300,
21,
19,
1423,
286,
2060,
10714,
10297,
16,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_push_path() {
let mut items = Vec::new();
let mut paths: HashMap<&Path, usize> = HashMap::new();
FileTreeItems::push_dirs(
Path::new("a/b/c"),
&mut items,
&mut paths,
&BTreeSet::new(),
)
.unwrap();
assert_eq!(*paths.get(&Path::new("a")).unwrap(), 1);
FileTreeItems::p... | rust_cleaned_test_functions.jsonl/129785 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 234
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14218,
2638,
368,
341,
197,
10217,
5206,
3589,
284,
11312,
486,
931,
543,
197,
10217,
5206,
12716,
25,
10528,
52244,
1820,
11,
22301,
29,
284,
10528,
486,
931,
1428,
197,
24848,
6533,
4353,
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_triplet_optional_list_column() {
let path = vec!["a", "list", "element", "list", "element", "list", "element"];
let values = vec![
Field::Str("a".to_string()),
Field::Str("b".to_string()),
Field::Str("c".to_string()),
Field::Str("d"... | rust_cleaned_test_functions.jsonl/43017 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 647
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
63883,
1149,
74644,
2019,
8744,
368,
341,
286,
1077,
1815,
284,
7486,
0,
1183,
64,
497,
330,
1607,
497,
330,
6101,
497,
330,
1607,
497,
330,
6101,
497,
330,
1607,
497,
330,
6101,
6332,
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_cli_request_airdrop() {
let mint_keypair = Keypair::new();
let mint_pubkey = mint_keypair.pubkey();
let faucet_addr = run_local_faucet(mint_keypair, None);
let test_validator = TestValidator::with_no_fees(mint_pubkey, Some(faucet_addr));
let mut bob_config = CliConfig::recen... | rust_cleaned_test_functions.jsonl/22552 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 379
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
47147,
7893,
50827,
6719,
368,
341,
262,
1077,
28337,
3097,
12670,
284,
6569,
1082,
1310,
486,
931,
543,
262,
1077,
28337,
34014,
792,
284,
28337,
3097,
12670,
47773,
792,
543,
262,
1077,
71453,
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_basic_state_synchronization() {
// - Kill one node and continue submitting transactions to the others.
// - Restart the node
// - Wait for all the nodes to catch up
// - Verify that the restarted node has synced up with the submitted transactions.
let (mut swarm, mu... | rust_cleaned_test_functions.jsonl/80406 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1263
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34729,
4387,
643,
67929,
368,
341,
9401,
262,
442,
481,
26835,
825,
2436,
323,
3060,
33094,
14131,
311,
279,
3800,
624,
262,
442,
481,
56801,
279,
2436,
198,
262,
442,
481,
13824,
369,
678,
279,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_single_binary_jit() -> Result<()> {
let schema = Arc::new(Schema::new(vec![Field::new("a", Binary, true)]));
let values: Vec<Option<&[u8]>> =
vec![Some(b"one"), Some(b"two"), None, Some(b""), Some(b"three")];
let a = BinaryArray::from_opt_vec(values);
... | rust_cleaned_test_functions.jsonl/17022 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 498
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19487,
31761,
5374,
275,
368,
1464,
5714,
71698,
341,
286,
1077,
10802,
284,
19689,
486,
931,
3759,
3416,
486,
931,
25592,
20703,
1877,
486,
931,
445,
64,
497,
17718,
11,
830,
7252,
1106,
286,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_append_tokens() {
let mut a = quote!(a);
let b = quote!(b);
a.append_all(b);
assert_eq!("a b", a.to_string());
} | rust_cleaned_test_functions.jsonl/53415 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 78
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26041,
28838,
368,
341,
262,
1077,
5206,
264,
284,
12641,
10297,
64,
317,
262,
1077,
293,
284,
12641,
10297,
65,
317,
262,
264,
2057,
5705,
1883,
317,
262,
2060,
10714,
17223,
64,
293,
497,
264,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_adjust_lockouts_after_replay_time_warped() {
let mut tower = Tower::new_for_tests(10, 0.9);
tower.vote_state.votes.push_back(Lockout::new(1));
tower.vote_state.votes.push_back(Lockout::new(0));
let vote = Vote::new(vec![0], Hash::default());
tower.last_vot... | rust_cleaned_test_functions.jsonl/61173 | {
"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,
44153,
9818,
11672,
19844,
1288,
1363,
3009,
90539,
6874,
368,
341,
286,
1077,
5206,
21271,
284,
21938,
486,
931,
5478,
32509,
7,
16,
15,
11,
220,
15,
13,
24,
317,
286,
21271,
79422,
4387,
3133,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_table_scope()
{
Lua::new().context(|lua| {
let globals = lua.globals();
lua.load(
r#"
touter = {
tin = {1, 2, 3}
}
"#,
)
.exec()
.unwrap();
// lua.
le... | rust_cleaned_test_functions.jsonl/80281 | {
"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,
5237,
23199,
741,
515,
262,
37662,
486,
931,
1005,
2147,
22428,
27623,
91,
341,
286,
1077,
37785,
284,
20357,
1302,
16616,
543,
286,
20357,
5104,
1006,
310,
435,
2,
698,
394,
259,
2676,
284,
341... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_package_set_with_a_lot() {
let package_set = PackageSetBuilder::named(Name::from_str("gpg").unwrap())
.description("Gnu Privacy Guard")
.env_var("gpg_home", "{{home}}/.gnupg")
.package_actions(&[
PackageBuilder::named(Name::from_str("gpg").unwrap()).build(... | rust_cleaned_test_functions.jsonl/25404 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 723
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26328,
2602,
6615,
4306,
91849,
368,
341,
262,
1077,
6328,
2602,
284,
16906,
1649,
3297,
486,
30245,
21182,
486,
1499,
2895,
445,
70,
3517,
1827,
15454,
2398,
286,
659,
4684,
445,
38,
8933,
18874,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_str() {
assert_eq!(
QueryOutputFormat::from_str("pretty").unwrap(),
QueryOutputFormat::Pretty
);
assert_eq!(
QueryOutputFormat::from_str("pRetty").unwrap(),
QueryOutputFormat::Pretty
);
assert_eq!(
... | rust_cleaned_test_functions.jsonl/76593 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 501
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
2895,
368,
341,
286,
2060,
10714,
33673,
310,
11361,
5097,
4061,
486,
1499,
2895,
445,
32955,
1827,
15454,
3148,
310,
11361,
5097,
4061,
486,
51940,
198,
286,
1439,
286,
2060,
10714,
33673,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_aes256_cfb128() {
let pt = "6bc1bee22e409f96e93d7e117393172a";
let ct = "dc7e84bfda79164b7ecd8486985d3860";
let key = "603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4";
let iv = "000102030405060708090a0b0c0d0e0f";
cipher_test(super::Ciphe... | rust_cleaned_test_functions.jsonl/110546 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 208
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
90958,
17,
20,
21,
666,
10798,
16,
17,
23,
368,
341,
286,
1077,
10817,
284,
330,
21,
8904,
16,
32031,
17,
17,
68,
19,
15,
24,
69,
24,
21,
68,
24,
18,
67,
22,
68,
16,
16,
22,
18,
24,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fetch_string_once_with_redirect() {
let http_server_guard = crate::test_util::http_server();
let url = Url::parse("http://127.0.0.1:4546/package.json").unwrap();
let target_url = Url::parse("http://localhost:4545/package.json").unwrap();
tokio_util::init(|| {
let ... | rust_cleaned_test_functions.jsonl/112155 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 199
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11803,
3904,
7630,
6615,
30043,
368,
341,
262,
1077,
1758,
12015,
36796,
284,
17717,
486,
1944,
18974,
486,
1254,
12015,
543,
1066,
262,
1077,
2515,
284,
22840,
486,
6400,
445,
1254,
1110,
16,
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... | 2 |
#[test]
fn test_vote_process_instruction_decode_bail() {
assert_eq!(
super::process_instruction(
&Pubkey::default(),
&[],
&mut MockInvokeContext::new(vec![])
),
Err(InstructionError::NotEnoughAccountKeys),
);
... | rust_cleaned_test_functions.jsonl/97472 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 180
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54360,
11305,
54923,
15227,
880,
604,
368,
341,
286,
2060,
10714,
33673,
310,
2256,
486,
4630,
54923,
1006,
394,
609,
29162,
792,
486,
2258,
3148,
394,
44590,
1259,
394,
609,
6984,
14563,
17604,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_directory() {
new_ucmd!()
.args(&["/root/alpha/beta/gamma/delta/epsilon/omega/"])
.succeeds()
.stdout_only("omega\n");
} | rust_cleaned_test_functions.jsonl/82219 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 96
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14846,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
14,
2888,
14,
7141,
3470,
1915,
4846,
13099,
3446,
5964,
14,
31767,
14,
32696,
14,
14108,
286,
659,
82,
29264,
82,
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 |
#[test]
fn test_hsv2hsv() {
let hsv_vec = vec!["hsv(180,100%,50%)", "hsv(400,100%,50%)"];
let test_result = vec![
vec!["hsv(180,100%,50%)", "HSV(180,100%,50%)", "hsv(180,100%,50%)", "hsv(180,100%,50%)", "HSV(180,100%,50%)", "HSV(180,100%,50%)", "hsv(180,100%,50%)", "HSV(180,100%,50%)", ],
vec!["hsv(40... | rust_cleaned_test_functions.jsonl/35857 | {
"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,
1523,
3492,
17,
71,
3492,
368,
341,
197,
10217,
82333,
13251,
284,
7486,
0,
1183,
71,
3492,
7,
16,
23,
15,
11,
16,
15,
15,
13384,
20,
15,
11334,
497,
330,
71,
3492,
7,
19,
15,
15,
11,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_generate_mac(){
let shared_secret = "secreto";
let nonce = "nonce";
let user = "user";
let password = "password";
let admin = false;
let user_type = None;
let result = generate_mac(shared_secret, nonce, user, password, admin, user_type);
assert_eq!(result, "3b56e9... | rust_cleaned_test_functions.jsonl/50920 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 153
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48851,
22802,
3032,
262,
1077,
6094,
21962,
284,
330,
325,
837,
983,
876,
262,
1077,
39676,
284,
330,
39593,
876,
262,
1077,
1196,
284,
330,
872,
876,
262,
1077,
3552,
284,
330,
3833,
876,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_erc20_transfer() {
// Given token with initial state.
let (env, mut token) = setup();
let owner = env.get_account(0);
let recipient = env.get_account(1);
let amount = U256::one();
let initial_supply = U256::from(INITIAL_SUPPLY);
// When transfer more then owned.
... | rust_cleaned_test_functions.jsonl/61314 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 420
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
2962,
17,
15,
35403,
368,
341,
262,
442,
16246,
3950,
448,
2856,
1584,
624,
262,
1077,
320,
3160,
11,
5206,
3950,
8,
284,
6505,
543,
262,
1077,
6372,
284,
6105,
670,
13500,
7,
15,
317,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_matches_invalid_unsupported_option() {
let opts = crate::parsers::parse_options();
let argv = ["hl".to_string(), "--bogus".to_string()];
let matches = crate::parsers::parse_matches(&argv, opts);
assert!(matches.is_err());
} | rust_cleaned_test_functions.jsonl/132816 | {
"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,
21039,
38344,
31433,
4907,
18216,
9672,
368,
341,
286,
1077,
12185,
284,
17717,
486,
88564,
486,
6400,
8743,
543,
286,
1077,
10213,
284,
4383,
17958,
3263,
983,
3904,
1507,
14482,
65,
538,
355,
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_seq_empty() {
let gil = Python::acquire_gil();
let py = gil.python();
let v : Vec<i32> = vec![];
let seq = v.to_py_object(py).into_object().cast_into::<PySequence>(py).unwrap();
assert_eq!(0, seq.len(py).unwrap());
let needle = 7i32.to_py_object(p... | rust_cleaned_test_functions.jsonl/22525 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 199
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14486,
15124,
368,
341,
286,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
286,
1077,
4510,
284,
342,
321,
43193,
543,
286,
1077,
348,
549,
11312,
21897,
18,
17,
29,
284,
7486,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cast_utf8_to_date64() {
let a = StringArray::from(vec![
"2000-01-01T12:00:00", // date + time valid
"2020-12-15T12:34:56", // date + time valid
"2020-2-2T12:34:56", // valid date time without leading 0s
"2000-00-00T12:00:00", // invalid m... | rust_cleaned_test_functions.jsonl/45441 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 620
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5303,
39453,
23,
2346,
4164,
21,
19,
368,
341,
286,
1077,
264,
284,
923,
1857,
486,
1499,
25592,
90515,
310,
330,
17,
15,
15,
15,
12,
15,
16,
12,
15,
16,
51,
16,
17,
25,
15,
15,
25,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_short_roundtrip() {
let con : [u8; 8] = [
0x38, 0xa7, 0xe6, 0x55,
0xbf, 0x62, 0xf5, 0xf7
];
let header = super::Header::Short {
key_phase: false,
ptype: super::ShortType::Two,
dst_cid: ConnectionId::new(&con),
... | rust_cleaned_test_functions.jsonl/95399 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 339
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16673,
29896,
32981,
368,
341,
286,
1077,
390,
549,
508,
84,
23,
26,
220,
23,
60,
284,
2278,
310,
220,
15,
87,
18,
23,
11,
220,
15,
9591,
22,
11,
220,
15,
8371,
21,
11,
220,
15,
87,
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_affine_mul_0() {
let affine0 = Affine([[1., 2.], [3., 4.]], [5., 6.]);
let affine1 = Affine([[1., 6.], [2., 5.]], [3., 4.]);
approx_eq!(f64, 5., Affine::mul_0(&affine0, &affine1, 0, 0));
approx_eq!(f64, 16., Affine::mul_0(&affine0, &affine1, 0, 1));
... | rust_cleaned_test_functions.jsonl/102298 | {
"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,
48914,
482,
24944,
62,
15,
368,
341,
286,
1077,
68809,
15,
284,
9748,
482,
27119,
16,
2572,
220,
17,
13,
1125,
508,
18,
2572,
220,
19,
13,
20492,
508,
20,
2572,
220,
21,
13,
2558,
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_write_csv_custom_options() {
let schema = Schema::new(vec![
Field::new("c1", DataType::Utf8, false),
Field::new("c2", DataType::Float64, true),
Field::new("c3", DataType::UInt32, false),
Field::new("c4", DataType::Boolean, true),
... | rust_cleaned_test_functions.jsonl/39023 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1121
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
14020,
15875,
8743,
368,
341,
286,
1077,
10802,
284,
12539,
486,
931,
25592,
90515,
310,
8601,
486,
931,
445,
66,
16,
497,
33172,
486,
38980,
23,
11,
895,
1326,
310,
8601,
486,
931,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_read_input_registers() {
let (_s, cfg) = start_dummy_server_with_cfg();
let mut trans = Transport::new_with_cfg("127.0.0.1", cfg).unwrap();
assert_eq!(trans.read_input_registers(0, 5).unwrap().len(), 5);
assert!(trans.read_input_registers(0, 5).unwrap().iter().all... | rust_cleaned_test_functions.jsonl/46835 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 160
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
5898,
78360,
368,
341,
286,
1077,
5453,
82,
11,
13286,
8,
284,
1191,
60321,
12015,
6615,
18343,
543,
286,
1077,
5206,
1356,
284,
16742,
486,
931,
6615,
18343,
445,
16,
17,
22,
13,
15,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_add() {
assert_eq!(
parse("+ 2 weeks").unwrap().1,
PeriodOp::Add(Period::Week(2))
);
assert_eq!(
parse(" + 2 weeks").unwrap().1,
PeriodOp::Add(Period::Week(2))
);
} | rust_cleaned_test_functions.jsonl/120253 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 165
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
34973,
220,
17,
5555,
1827,
15454,
1005,
16,
345,
310,
25492,
7125,
486,
2212,
7,
23750,
486,
17053,
7,
17,
1171,
286,
3475,
286,
2060,
10714,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_key_with_slash() {
let mut r = Registry::new();
assert!(r
.register_template_string("t", "{{#each .}}{{@key}}: {{this}}\n{{/each}}")
.is_ok());
let r = r.render("t", &json!({"/foo": "bar"})).expect("should work");
assert_eq!(r, "/foo: bar\n");
} | rust_cleaned_test_functions.jsonl/14270 | {
"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,
3097,
6615,
11886,
988,
368,
341,
262,
1077,
5206,
435,
284,
32112,
486,
931,
1428,
262,
2060,
10297,
81,
198,
286,
659,
6343,
8693,
3904,
445,
83,
497,
47219,
2,
9547,
659,
77286,
31,
792,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_write_to_resized_buffer() {
let mut repr = Repr::new("");
// reserve additional bytes
repr.reserve(100);
assert!(repr.is_heap_allocated());
let slice = unsafe { repr.as_mut_slice() };
let long_word = "hello, I am a very long string that should b... | rust_cleaned_test_functions.jsonl/14390 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 241
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
2346,
4918,
1506,
7776,
368,
341,
286,
1077,
5206,
30636,
284,
1032,
649,
486,
931,
56141,
286,
442,
20499,
5107,
5820,
198,
286,
30636,
48520,
7,
16,
15,
15,
317,
286,
2060,
10297,
30837,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fq2_invert() {
use super::fq::FqRepr;
use ff::PrimeField;
assert!(bool::from(Fq2::zero().invert().is_none()));
let a = Fq2 {
c0: Fq::from_repr(FqRepr([
0x05, 0x1d, 0x3f, 0x92, 0x53, 0xe2, 0x51, 0x6f, 0x1c, 0x20, 0x2d, 0x8e, 0xd9, 0x7a,
0xfb, 0x45... | rust_cleaned_test_functions.jsonl/45343 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1393
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
80,
17,
1243,
1621,
368,
341,
262,
990,
2256,
486,
63919,
486,
37,
80,
693,
649,
280,
262,
990,
25539,
486,
32306,
1877,
401,
262,
2060,
10297,
2641,
486,
1499,
7832,
80,
17,
486,
14154,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_device_tree() {
let mut device_tree = DeviceTree::new();
assert_eq!(device_tree.0.len(), 0);
let id = String::from("id1");
device_tree.insert(id.clone(), DeviceNode::new(id.clone(), None));
assert_eq!(device_tree.0.len(), 1);
let... | rust_cleaned_test_functions.jsonl/25667 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2212
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9204,
11663,
368,
341,
1789,
286,
1077,
5206,
3671,
11663,
284,
13903,
6533,
486,
931,
543,
286,
2060,
10714,
10297,
6111,
11663,
13,
15,
19406,
1507,
220,
15,
626,
1789,
286,
1077,
877,
284,
92... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_pragma_query_row() {
let db = checked_memory_handle();
assert_eq!(
"memory",
db.query_row::<String, _, _>("PRAGMA journal_mode", NO_PARAMS, |r| r.get(0))
.unwrap()
);
assert_eq!(
"off",
db.query_row:... | rust_cleaned_test_functions.jsonl/25513 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 255
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
4101,
1728,
5738,
8530,
368,
341,
286,
1077,
2927,
284,
10067,
19195,
10630,
1428,
286,
2060,
10714,
33673,
310,
330,
17269,
756,
310,
2927,
4786,
8530,
27638,
703,
11,
8358,
716,
13211,
6480... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_push_bytes() {
let mut s = String::from_str("ABC");
unsafe {
s.push_bytes([ 'D' as u8 ]);
}
assert_eq!(s.as_slice(), "ABCD");
} | rust_cleaned_test_functions.jsonl/113362 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14218,
12524,
368,
341,
286,
1077,
5206,
274,
284,
923,
486,
1499,
2895,
445,
25411,
797,
286,
19860,
341,
310,
274,
2552,
12524,
2561,
364,
35,
6,
438,
575,
23,
13201,
286,
456,
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 |
#[test]
fn test_credential_def_identifiers() {
let cred1 = CredInfo {
requested_attr: "height_1".to_string(),
referent: LICENCE_CRED_ID.to_string(),
schema_id: SCHEMA_ID.to_string(),
cred_def_id: CRED_DEF_ID.to_string(),
rev_reg_id: Some(REV_RE... | rust_cleaned_test_functions.jsonl/106026 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2132
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
30320,
7844,
38399,
11836,
368,
341,
286,
1077,
4187,
16,
284,
356,
1151,
1731,
341,
310,
11223,
10422,
25,
330,
2563,
62,
16,
3263,
983,
3904,
3148,
310,
8300,
306,
25,
83238,
10150,
920,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rm_errors() {
let (at, mut ucmd) = testing(UTIL_NAME);
let dir = "test_rm_errors_directory";
let file_a = "test_rm_errors_directory/test_rm_errors_file_a";
let file_b = "test_rm_errors_directory/test_rm_errors_file_b";
at.mkdir(dir);
at.touch(file_a);
at.touch(file_b... | rust_cleaned_test_functions.jsonl/61417 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 265
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58537,
20196,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
7497,
7,
36969,
4708,
317,
262,
1077,
5419,
284,
330,
1944,
58537,
20196,
14846,
876,
262,
1077,
1034,
4306,
284,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_emit_u32() {
let mut masm = MacroAssembler::new();
masm.emit_u32(0x11223344);
assert_eq!(&[0x44, 0x33, 0x22, 0x11], masm.buffer());
masm.emit_u32_at(0, 0x55667788);
assert_eq!(&[0x88, 0x77, 0x66, 0x55], masm.buffer());
} | rust_cleaned_test_functions.jsonl/67128 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 167
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
69082,
7300,
18,
17,
368,
341,
286,
1077,
5206,
9243,
76,
284,
53317,
77858,
486,
931,
543,
286,
9243,
76,
16812,
7300,
18,
17,
7,
15,
87,
16,
16,
17,
17,
18,
18,
19,
19,
317,
286,
2060,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_header_error_if_0() {
new_ucmd!()
.args(&["--header=0"])
.run()
.stderr_is("numfmt: invalid header value '0'");
} | rust_cleaned_test_functions.jsonl/45997 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 90
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8757,
4096,
11119,
62,
15,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
313,
2708,
28,
15,
14108,
286,
659,
6108,
741,
286,
659,
36422,
6892,
445,
2413,
12501,
25,
8318... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_replace_add_use_no_anchor() {
check_assist(
replace_qualified_name_with_use,
"
std::fmt::Debug<|>
",
"
use std::fmt::Debug;
Debug<|>
",
);
} | rust_cleaned_test_functions.jsonl/19560 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 136
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10633,
2891,
15951,
6536,
56532,
368,
341,
286,
1779,
12083,
380,
1006,
310,
8290,
62,
36335,
1269,
6615,
15951,
345,
310,
6228,
1834,
486,
12501,
486,
7939,
27,
91,
397,
262,
21796,
310,
6228,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_list_json_equal() {
// Test equal case
let arrow_array = create_list_array(
&mut ListBuilder::new(Int32Builder::new(10)),
&[Some(&[1, 2, 3]), None, Some(&[4, 5, 6])],
)
.unwrap();
let json_array: Value = serde_json::from_str(
... | rust_cleaned_test_functions.jsonl/895 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 933
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2019,
9455,
11478,
368,
341,
286,
442,
3393,
6144,
1142,
198,
286,
1077,
17921,
3858,
284,
1855,
2019,
3858,
1006,
310,
609,
6984,
1759,
3297,
486,
931,
24123,
18,
17,
3297,
486,
931,
7,
16,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_try_from() {
let gil = Python::acquire_gil();
let py = gil.python();
let list: &PyAny = vec![3, 6, 5, 4, 7].to_object(py).into_ref(py);
let dict: &PyAny = vec![("reverse", true)].into_py_dict(py).as_ref();
assert!(PyList::try_from(list).is_ok());
... | rust_cleaned_test_functions.jsonl/57741 | {
"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,
53283,
5673,
368,
341,
286,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
286,
1077,
4510,
284,
342,
321,
43193,
543,
286,
1077,
1140,
25,
609,
13828,
8610,
284,
7486,
20703,
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_explicit_peer_gets_connected() {
let (mut gs, _, _) = inject_nodes1()
.peer_no(0)
.topics(Vec::new())
.to_subscribe(true)
.create_network();
//create new peer
let peer = PeerId::random();
//add peer as explicit pee... | rust_cleaned_test_functions.jsonl/66892 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 514
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14214,
6026,
45159,
3062,
82,
43276,
368,
341,
286,
1077,
320,
6984,
28081,
11,
8358,
27439,
284,
15551,
14896,
16,
741,
310,
659,
16537,
6536,
7,
15,
340,
310,
659,
55152,
49923,
486,
931,
2398... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_from_fp() {
let mut rng = OsRng;
let v = rng.next_u64();
let e = Fp::new(v);
let e_fp6 = Fp6::new([v, 0, 0, 0, 0, 0]);
let array: [Fp; 6] = [
e,
Fp::zero(),
Fp::zero(),
Fp::zero(),
Fp::zero(),
... | rust_cleaned_test_functions.jsonl/132395 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 285
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
34160,
368,
341,
286,
1077,
5206,
28422,
284,
15433,
49,
968,
280,
286,
1077,
348,
284,
28422,
4529,
7300,
21,
19,
543,
286,
1077,
384,
284,
434,
79,
486,
931,
3747,
626,
286,
1077,
384,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_process_testing_n_times_panic() {
let _args = FakeParentArgs::with(&["git blame once", "git blame twice"]);
assert_eq!(
calling_process_cmdline(ProcInfo::new(), guess_git_blame_filename_extension),
Some("once".into())
);
assert_eq!(
... | rust_cleaned_test_functions.jsonl/95002 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 214
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
70962,
1089,
22353,
620,
31270,
368,
341,
286,
1077,
716,
2116,
284,
36965,
8387,
4117,
486,
4197,
2099,
1183,
12882,
18555,
3055,
497,
330,
12882,
18555,
10917,
15049,
286,
2060,
10714,
3367... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_stake_merge_ix() {
let destination_stake_pubkey = Pubkey::new_unique();
let source_stake_pubkey = Pubkey::new_unique();
let authorized_pubkey = Pubkey::new_unique();
let instructions = instruction::merge(
&destination_stake_pubkey,
&s... | rust_cleaned_test_functions.jsonl/117971 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 700
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
1261,
726,
20888,
62686,
368,
341,
286,
1077,
9106,
1261,
726,
34014,
792,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
2530,
1261,
726,
34014,
792,
284,
22611,
792,
486,
931,
21218,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_du_invalid_size() {
let args = &["block-size", "threshold"];
for s in args {
new_ucmd!()
.arg(format!("--{}=1fb4t", s))
.arg("/tmp")
.fails()
.code_is(1)
.stderr_only(format!("du: invalid --{} argument '1fb4t'", s));
... | rust_cleaned_test_functions.jsonl/23731 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 345
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
84,
31433,
2368,
368,
341,
262,
1077,
2827,
284,
609,
1183,
4574,
7174,
497,
330,
28902,
6332,
262,
369,
274,
304,
2827,
341,
286,
501,
68887,
2277,
0,
741,
310,
659,
858,
20698,
17223,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_benchmark_id_make_long_directory_name_unique() {
let long_name = (0..MAX_DIRECTORY_NAME_LEN).map(|_| 'a').collect::<String>();
let existing_id = BenchmarkId::new(long_name, None, None, None);
let mut directories = HashSet::new();
directories.insert(existing_id.as_... | rust_cleaned_test_functions.jsonl/51508 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 225
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
39381,
842,
28230,
17799,
14846,
1269,
21218,
368,
341,
286,
1077,
1293,
1269,
284,
320,
15,
496,
10586,
43814,
4708,
15536,
568,
2186,
22428,
35395,
364,
64,
1823,
17384,
27638,
703,
3913,
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_nist_params() {
let alice = begin_dh_nist();
let bob = begin_dh_nist();
assert_eq!(
alice.gen_shared(&bob.gen_pub()),
bob.gen_shared(&alice.gen_pub())
)
} | rust_cleaned_test_functions.jsonl/85590 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 136
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
380,
6745,
368,
341,
286,
1077,
70433,
284,
3161,
814,
71,
1089,
380,
543,
286,
1077,
35192,
284,
3161,
814,
71,
1089,
380,
543,
286,
2060,
10714,
33673,
310,
70433,
22822,
20405,
2099,
47... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_destruct_path_empty() {
// Arrange
let path = "";
// Act
let result = destruct_path(path);
// Assert
assert!(result.is_empty());
} | rust_cleaned_test_functions.jsonl/94246 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 105
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2259,
1235,
2638,
15124,
368,
341,
286,
442,
40580,
198,
286,
1077,
1815,
284,
21238,
286,
442,
3218,
198,
286,
1077,
1102,
284,
20780,
2638,
5581,
626,
286,
442,
5319,
198,
286,
2060,
10297,
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 |
#[test]
fn test_f32x4_only_last_any() {
let x1 = f32x4::new(2.0, 2.0, 2.0, 1.0);
let x2 = f32x4::splat(1.0);
assert!((x1.eq(x2)).any());
} | rust_cleaned_test_functions.jsonl/43321 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
18,
17,
87,
19,
18410,
12195,
37248,
368,
341,
286,
1077,
856,
16,
284,
282,
18,
17,
87,
19,
486,
931,
7,
17,
13,
15,
11,
220,
17,
13,
15,
11,
220,
17,
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_two_plus_lines_exact_fit() {
let config =
make_config_from_args(&["--side-by-side", "--width", "33", "--line-fill-method=ansi"]);
let output = run_delta(TWO_PLUS_LINES_DIFF, &config);
let mut lines = output.lines().skip(crate::config::HEADER_LEN);
let ... | rust_cleaned_test_functions.jsonl/72597 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 302
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23241,
28043,
18323,
71084,
32416,
368,
341,
286,
1077,
2193,
4035,
310,
1281,
5332,
5673,
8384,
2099,
1183,
313,
2929,
14319,
24067,
497,
14482,
3098,
497,
330,
18,
18,
497,
14482,
1056,
58987,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rfc2822() {
use crate::front_matter;
let contents = r#"
[frontMatter]
title = "Hello World"
tags = ["first tag", "second tag"]
created = "2009-12-30"
description = "A run around the world"
published = true
---
this."#;
let (fm, _) =
front_matter::parse_front_m... | rust_cleaned_test_functions.jsonl/43341 | {
"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,
1710,
8316,
17,
23,
17,
17,
368,
341,
286,
990,
17717,
486,
6951,
717,
1650,
280,
286,
1077,
8794,
284,
435,
2,
698,
58,
6951,
44,
1650,
921,
2102,
284,
330,
9707,
4337,
698,
14082,
284,
438... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_total_ord() {
assert_eq!("1234".cmp("123"), Greater);
assert_eq!("123".cmp("1234"), Less);
assert_eq!("1234".cmp("1234"), Equal);
assert_eq!("12345555".cmp("123456"), Less);
assert_eq!("22".cmp("1234"), Greater);
} | rust_cleaned_test_functions.jsonl/17627 | {
"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,
10784,
67324,
368,
341,
262,
2060,
10714,
17223,
16,
17,
18,
19,
3263,
7293,
445,
16,
17,
18,
3975,
32281,
317,
262,
2060,
10714,
17223,
16,
17,
18,
3263,
7293,
445,
16,
17,
18,
19,
3975,
96... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_map_array_builder() {
let string_builder = StringBuilder::new(4);
let int_builder = Int32Builder::new(4);
let mut builder = MapBuilder::new(None, string_builder, int_builder);
let string_builder = builder.keys();
string_builder.append_value("joe").unwrap... | rust_cleaned_test_functions.jsonl/87816 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 859
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5376,
3858,
28532,
368,
341,
286,
1077,
914,
28532,
284,
11410,
486,
931,
7,
19,
317,
286,
1077,
526,
28532,
284,
1333,
18,
17,
3297,
486,
931,
7,
19,
626,
286,
1077,
5206,
7363,
284,
5027,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_subtraction() {
let mut tmp = LARGEST;
tmp -= &LARGEST;
assert_eq!(tmp, Scalar::zero());
assert_eq!(Scalar::one() - Scalar::zero(), Scalar::one());
} | rust_cleaned_test_functions.jsonl/14277 | {
"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,
5228,
26425,
368,
341,
286,
1077,
5206,
4174,
284,
444,
7581,
5177,
280,
286,
4174,
5982,
609,
43,
7581,
5177,
401,
286,
2060,
10714,
10297,
5173,
11,
35176,
486,
14154,
5231,
286,
2060,
10714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_is_mate_with_partial_state_repeat_move_kinds_with_kaku_gote() {
let kinds:Vec<KomaKind> = vec![ GKaku, GKakuN ];
let positions:Vec<(u32,u32)> = vec![
(0,4),(4,0),(4,8),(8,4)
];
let mvs:Vec<(u32,u32)> = vec![
(2,2),(6,2),(6,6),(2,6)
];
let occ_positions:Vec<(u32,u32)> = ve... | rust_cleaned_test_functions.jsonl/72982 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 977
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
717,
349,
6615,
52068,
4387,
41975,
17134,
4698,
8673,
6615,
4698,
23557,
1889,
1272,
368,
972,
10217,
12829,
25,
10050,
28239,
7786,
10629,
29,
284,
7486,
20703,
97409,
23557,
11,
97409,
2355... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_upcoming_utc() {
let expression = "0 0,30 0,6,12,18 1,15 Jan-March Thurs";
let schedule = schedule(expression.as_bytes());
assert!(schedule.is_done());
let schedule = schedule.unwrap().1;
let mut upcoming = schedule.upcoming(Utc);
let next1 = upcoming.next();
assert!(... | rust_cleaned_test_functions.jsonl/125946 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 250
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8237,
4959,
84259,
368,
341,
262,
1077,
7493,
284,
330,
15,
220,
15,
11,
18,
15,
220,
15,
11,
21,
11,
16,
17,
11,
16,
23,
220,
16,
11,
16,
20,
4350,
5251,
1113,
82685,
876,
262,
1077,
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... | 1 |
#[test]
fn test_parse_time_with_tz() -> Result<()> {
let ctx_with_tz = |tz: &str| {
let mut cfg = EvalConfig::default();
let raw = tz.as_bytes();
// brutally turn timezone in format +08:00 into offset in minute
let offset = if raw[0] == b'-' { -1 } else { ... | rust_cleaned_test_functions.jsonl/84835 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1909
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
3009,
6615,
528,
89,
368,
1464,
5714,
71698,
341,
286,
1077,
5635,
6615,
528,
89,
284,
760,
37592,
25,
609,
495,
91,
341,
310,
1077,
5206,
13286,
284,
58239,
2648,
486,
2258,
543,
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... | 6 |
#[test]
fn test_update_data_with_decorator() {
let mut handlebars = Registry::new();
handlebars.register_template_string("t0", "{{hello}}{{*foo}}{{hello}}".to_string())
.unwrap();
let data = btreemap! {
"hello".to_string() => "world".to_string()
};
... | rust_cleaned_test_functions.jsonl/83318 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1625
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
1769,
6615,
87252,
368,
341,
286,
1077,
5206,
3705,
24950,
284,
32112,
486,
931,
543,
286,
3705,
24950,
9929,
8693,
3904,
445,
83,
15,
497,
47219,
14990,
77286,
9,
7975,
77286,
14990,
3417,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parse_key_with_info_and_description() {
let text = "AAAAA-BBBBB-CCCCC-DDDD [Store] -> Some game";
let parsed_input = parse_message(text);
assert_eq!(parsed_input.value, "AAAAA-BBBBB-CCCCC-DDDD");
assert_eq!(parsed_input.description, Some(format!("Some game")));
... | rust_cleaned_test_functions.jsonl/97563 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 208
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
3097,
6615,
3109,
8378,
11448,
368,
341,
286,
1077,
1467,
284,
330,
25699,
32,
7671,
73442,
12,
47932,
34,
40175,
4103,
508,
6093,
60,
1464,
4329,
1809,
876,
286,
1077,
15676,
5898,
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_as_ptr_zero_size() {
let vec = LocalVec::<u8, 0>::new();
let ptr = vec.as_ptr();
assert!(ptr.is_null());
} | rust_cleaned_test_functions.jsonl/126351 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 86
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11898,
4348,
19359,
2368,
368,
341,
286,
1077,
7486,
284,
8774,
10050,
27638,
84,
23,
11,
220,
15,
6831,
931,
543,
286,
1077,
10087,
284,
7486,
5357,
4348,
543,
286,
2060,
10297,
3505,
2079,
151... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_should_work() {
let pair = Pair::from_seed(
&hex!("9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60")
);
let public = pair.public();
assert_eq!(
public,
Public::from_full(
&hex!("8db55b05db86c0b1786ca49f095d76344c9e6056b2f02701a7e7f3c20aabfd913ebbe148d... | rust_cleaned_test_functions.jsonl/23551 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 378
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12247,
43378,
11498,
368,
341,
197,
10217,
6716,
284,
25995,
486,
1499,
33809,
1006,
298,
197,
5,
17308,
17223,
24,
67,
21,
16,
65,
16,
24,
450,
72554,
20,
64,
21,
15,
4645,
23,
19,
19,
2577... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_enrich_tensor() {
let tp = pb::TensorProto {
dtype: pb::DataType::DtString.into(),
string_val: vec![Bytes::from_static(b"foo")],
..Default::default()
};
let v = EventValue::Summary(SummaryValue(Box::new(Value::Te... | rust_cleaned_test_functions.jsonl/6203 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 280
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6205,
13851,
23188,
368,
341,
310,
1077,
18101,
284,
17310,
486,
25336,
31549,
341,
394,
13231,
25,
17310,
486,
22653,
486,
69079,
703,
39860,
3148,
394,
914,
6189,
25,
7486,
20703,
7078,
486,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_height_index() {
let mut index = HeightIndex::new();
use std::collections::HashSet;
let mut elems = HashSet::new();
let num_heights = 1000;
let num_elems = 1000;
for e in 0..num_elems {
elems.insert(e);
}
let elems: V... | rust_cleaned_test_functions.jsonl/5877 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 335
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9561,
3560,
368,
341,
286,
1077,
5206,
1922,
284,
21432,
1552,
486,
931,
1428,
286,
990,
1460,
486,
51137,
486,
44601,
280,
286,
1077,
5206,
55968,
284,
18931,
486,
931,
1428,
286,
1077,
1629,
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... | 4 |
#[test]
fn test_no_close() {
let mut builder = Path::builder();
builder.begin(point(1.0, 1.0));
builder.line_to(point(5.0, 1.0));
builder.line_to(point(1.0, 5.0));
builder.end(false);
test_path(builder.build().as_slice());
} | rust_cleaned_test_functions.jsonl/102436 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 117
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
12704,
368,
341,
262,
1077,
5206,
7363,
284,
7933,
486,
17850,
1428,
262,
7363,
6848,
20235,
7,
16,
13,
15,
11,
220,
16,
13,
15,
1106,
262,
7363,
10932,
2346,
20235,
7,
20,
13,
15,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_max_encoded_bytes_size() {
let n = bytes::ENC_GROUP_SIZE;
let tbl: Vec<(usize, usize)> = vec![(0, n + 1), (n / 2, n + 1), (n, 2 * (n + 1))];
for (x, y) in tbl {
assert_eq!(max_encoded_bytes_size(x), y);
}
} | rust_cleaned_test_functions.jsonl/55212 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 158
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6345,
73069,
12524,
2368,
368,
341,
286,
1077,
308,
284,
5820,
486,
16226,
20130,
4098,
280,
286,
1077,
21173,
25,
11312,
28706,
51878,
11,
22301,
16018,
284,
7486,
0,
9697,
15,
11,
308,
488,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_link_multiple_values() {
let first_link = LinkValue::new("/TheBook/chapter2")
.push_rel(RelationType::Previous)
.set_title_star("UTF-8'de'letztes%20Kapitel");
let second_link = LinkValue::new("/TheBook/chapter4")
.push_rel(RelationType::Next)
... | rust_cleaned_test_functions.jsonl/46348 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 422
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7233,
45233,
9146,
368,
341,
286,
1077,
1156,
7233,
284,
5948,
1130,
486,
931,
4283,
785,
7134,
21284,
2873,
17,
1138,
310,
659,
9077,
13557,
2785,
301,
367,
929,
486,
21291,
340,
310,
659,
746,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_panic() {
let a = PrimitiveArray::from([Some(99999i128)]).to(DataType::Decimal(5, 2));
let b = PrimitiveArray::from([Some(1i128)]).to(DataType::Decimal(5, 2));
let _ = add(&a, &b);
} | rust_cleaned_test_functions.jsonl/6875 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 115
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
620,
31270,
368,
341,
286,
1077,
264,
284,
51460,
1857,
486,
1499,
2561,
8373,
7,
24,
24,
24,
24,
24,
72,
16,
17,
23,
7252,
568,
983,
63941,
486,
11269,
7,
20,
11,
220,
17,
1106,
286... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_status_only_done() {
let dir = tempdir().unwrap();
let repo = init_repo_with_tasks(
dir.path(),
&[
Task::new(TaskStatus::Done, "Foo"),
Task::new(TaskStatus::Done, "Bar"),
],
);
check_current_statu... | rust_cleaned_test_functions.jsonl/36277 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 209
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4773,
18410,
24390,
368,
341,
286,
1077,
5419,
284,
2730,
3741,
1005,
15454,
543,
286,
1077,
15867,
284,
2930,
37784,
6615,
32823,
1006,
310,
5419,
3875,
3148,
310,
609,
9640,
394,
5430,
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_update_new_fork() {
let key = Keypair::new();
let mut index = AccountsIndex::<bool>::default();
let ancestors = vec![(0, 0)].into_iter().collect();
let mut gc = Vec::new();
index.insert(0, &key.pubkey(), true, &mut gc);
assert!(gc.is_empty());
... | rust_cleaned_test_functions.jsonl/44248 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 288
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
5921,
761,
669,
368,
341,
286,
1077,
1376,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
5206,
1922,
284,
40655,
1552,
27638,
2641,
6831,
2258,
543,
286,
1077,
37518,
284,
7486,
0,
9697... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rolling_sum_nulls() {
let buf = Buffer::from([1.0, 2.0, 3.0, 4.0]);
let arr = &PrimitiveArray::from_data(
DataType::Float64,
buf,
Some(Bitmap::from(&[true, false, true, true])),
);
let out = rolling_sum(arr, 2, 2, false, None);... | rust_cleaned_test_functions.jsonl/60603 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 809
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
16210,
10160,
15162,
82,
368,
341,
286,
1077,
6607,
284,
10312,
486,
1499,
2561,
16,
13,
15,
11,
220,
17,
13,
15,
11,
220,
18,
13,
15,
11,
220,
19,
13,
15,
2558,
286,
1077,
2890,
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_vec() {
let mut vec = Array::<_, 512>::new();
assert_eq!(vec.capacity(), 512);
assert!(vec.is_empty());
assert_eq!(format!("{:?}", &vec), "[]");
assert!(vec.push(15).is_none());
assert!(!vec.is_empty());
let elem = vec.pop().expect("To ge... | rust_cleaned_test_functions.jsonl/105179 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 996
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
368,
341,
286,
1077,
5206,
7486,
284,
2910,
27638,
6878,
220,
20,
16,
17,
6831,
931,
543,
286,
2060,
10714,
10297,
4083,
59168,
1507,
220,
20,
16,
17,
317,
286,
2060,
10297,
4083,
2079,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_hover_macro_invocation() {
check(
r#"
macro_rules! foo { () => {} }
fn f() { fo<|>o!(); }
"#,
expect![[r#"
*foo*
```rust
test
```
```rust
macro_rules! foo
... | rust_cleaned_test_functions.jsonl/66121 | {
"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,
53445,
58810,
19996,
2276,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
32606,
21407,
0,
15229,
314,
1719,
589,
4687,
555,
8822,
282,
368,
314,
11756,
27,
91,
29,
78,
0,
2129,
456,
57676,
345,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_convert_errored_missing_protocol_data() -> Result<(), failure::Error> {
let data = vec![
Errored {
hash: HashType::OperationHash.string_to_bytes("onvN8U6QJ6DGJKVYkHXYRtFm3tgBJScj9P5bbPjSZUuFaGzwFuJ")?,
is_endorsement: Some(true),
... | rust_cleaned_test_functions.jsonl/114827 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1518
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
62,
40296,
1151,
40447,
34880,
1769,
368,
1464,
5714,
68843,
7901,
486,
1454,
29,
972,
286,
1077,
821,
284,
7486,
20703,
319,
310,
9740,
47643,
972,
394,
5175,
25,
6531,
929,
486,
8432,
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... | 9 |
#[test]
fn test_conn_upgrade() {
let mut buf = BytesMut::from(
"GET /test HTTP/1.1\r\n\
upgrade: websockets\r\n\
connection: upgrade\r\n\r\n",
);
let req = parse_ready!(&mut buf);
assert!(req.upgrade());
assert_eq!(req.head().connect... | rust_cleaned_test_functions.jsonl/22273 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 347
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17241,
67794,
368,
341,
286,
1077,
5206,
6607,
284,
30024,
51440,
486,
1499,
1006,
310,
330,
3806,
608,
1944,
10130,
14,
16,
13,
16,
12016,
1699,
5661,
1797,
13910,
25,
3482,
76729,
12016,
1699,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_day14_parse_input_sample2() {
let ops = parse_input(SAMPLE2);
assert_eq!(
vec![
Op::Mask(Mask {
zeros: 0b111111111111111111111111111111001100,
ones: 0b000000000000000000000000000000010010,
flu... | rust_cleaned_test_functions.jsonl/54729 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 430
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16763,
16,
19,
21039,
5898,
17491,
17,
368,
341,
286,
1077,
27132,
284,
4715,
5898,
3759,
18918,
17,
317,
286,
2060,
10714,
33673,
310,
7486,
90515,
394,
10672,
486,
12686,
3189,
1073,
341,
503,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_timespec_layout() {
#[cfg(not(target_os = "redox"))]
use rustix::fs::{UTIME_NOW, UTIME_OMIT};
use rustix::time::{Nsecs, Secs, Timespec};
let tv_sec: Secs = 0;
let tv_nsec: Nsecs = 0;
let _ = Timespec { tv_sec, tv_nsec };
#[cfg(not(target_os = "redox"))]
let _ = ... | rust_cleaned_test_functions.jsonl/43649 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 327
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22353,
992,
14466,
368,
341,
262,
11506,
14072,
24772,
8637,
29387,
284,
330,
1151,
5131,
2761,
921,
262,
990,
23071,
941,
486,
3848,
22964,
1381,
5660,
59401,
11,
547,
18129,
83169,
952,
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... | 1 |
#[test]
fn test_error_into_response() {
// Generic error.
let mut buf = Cursor::new(vec![0]);
let response: Response =
Error::Generic(StatusCode::BadRequest, "message".to_string()).into();
assert!(response.write_all(&mut buf).is_ok());
let body = ApiServer::js... | rust_cleaned_test_functions.jsonl/106568 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1034
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4096,
45514,
9655,
368,
341,
286,
442,
21281,
1465,
624,
286,
1077,
5206,
6607,
284,
28067,
486,
931,
25592,
20703,
15,
2558,
286,
1077,
2033,
25,
5949,
4035,
310,
4600,
486,
19964,
7,
15872,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cp_arg_backup() {
let (at, mut ucmd) = at_and_ucmd!();
ucmd.arg(TEST_HELLO_WORLD_SOURCE)
.arg(TEST_HOW_ARE_YOU_SOURCE)
.arg("-b")
.succeeds();
assert_eq!(at.read(TEST_HOW_ARE_YOU_SOURCE), "Hello, World!\n");
assert_eq!(
at.read(&*format!("{}~", T... | rust_cleaned_test_functions.jsonl/21247 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 208
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39811,
6057,
44710,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
1428,
262,
575,
8710,
21186,
50320,
69235,
1593,
38913,
25430,
340,
286,
659,
858,
5032... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_super_super_completion() {
check(
r#"
mod a {
const A: usize = 0;
mod b {
const B: usize = 0;
mod c { use super::super::$0 }
}
}
"#,
expect![[r#"
md b
ct A
"#]],
);
} | rust_cleaned_test_functions.jsonl/49019 | {
"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,
38886,
38886,
60164,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
2593,
264,
341,
262,
733,
362,
25,
22301,
284,
220,
15,
280,
262,
1463,
293,
341,
286,
733,
425,
25,
22301,
284,
220,
15,
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_exactly_one_mode() {
assert_eq!(
split_mode_string("rwb"),
Err("must have exactly one of create/read/write/append mode".to_owned())
);
} | rust_cleaned_test_functions.jsonl/105635 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 122
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2702,
32739,
11667,
7302,
368,
341,
310,
2060,
10714,
33673,
394,
6718,
7302,
3904,
445,
81,
20211,
4461,
394,
15495,
445,
24812,
614,
6896,
825,
315,
1855,
69199,
64264,
14,
5090,
3856,
3263,
983... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_duration() {
let mut m = TestFmtJsonWellKnownTypes::new();
let mut d = Duration::new();
d.seconds = 1;
d.nanos = 340012;
m.set_duration(d);
test_json_print_parse_message("{\"duration\": \"1.000340012s\"}", &m);
let mut m = TestFmtJsonWellKnownTypes::new();
let mu... | rust_cleaned_test_functions.jsonl/49805 | {
"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,
25454,
368,
341,
262,
1077,
5206,
296,
284,
3393,
93322,
5014,
11395,
48206,
4173,
486,
931,
543,
262,
1077,
5206,
294,
284,
21045,
486,
931,
543,
262,
294,
56343,
284,
220,
16,
280,
262,
294,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_pure_virtual() {
let hdr = indoc! {"
#include <cstdint>
class A {
public:
virtual uint32_t get_val() const = 0;
};
class B : public A {
public:
virtual uint32_t get_val() const { return 3; }
};
const ... | rust_cleaned_test_functions.jsonl/9882 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 313
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
620,
552,
58730,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
286,
671,
997,
366,
96975,
397,
286,
536,
362,
341,
286,
584,
510,
310,
4108,
2622,
18,
17,
528,
633,
6189,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tempsize_for_fct_call() {
info(
"fun f() { g(1,2,3,4,5,6); }
fun g(a:int, b:int, c:int, d:int, e:int, f:int) {}",
|_, jit_info| {
assert_eq!(24, jit_info.tempsize);
},
);
info(
"fun f() { g(1,2... | rust_cleaned_test_functions.jsonl/73139 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 578
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28613,
1690,
551,
5478,
761,
302,
13429,
368,
341,
286,
3546,
1006,
310,
330,
11894,
282,
368,
314,
342,
7,
16,
11,
17,
11,
18,
11,
19,
11,
20,
11,
21,
1215,
456,
1060,
2464,
342,
2877,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fail() {
assert_eq!(
to_be_false(&Value::Null, &Value::Null, false),
Some("expected null to be false".to_string())
);
assert_eq!(
to_be_false(&json!(0), &Value::Null, false),
Some("expected 0 to be false".to_string())
... | rust_cleaned_test_functions.jsonl/96778 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 250
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22121,
368,
341,
286,
2060,
10714,
33673,
310,
311,
21263,
36015,
2099,
1130,
486,
3280,
11,
609,
1130,
486,
3280,
11,
895,
1326,
310,
4329,
445,
7325,
845,
311,
387,
895,
3263,
983,
3904,
2398,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fq_display() {
assert_eq!(
format!("{}", Fq::from_repr(FqRepr([0xa956babf9301ea24, 0x39a8f184f3535c7b, 0xb38d35b3f6779585, 0x676cc4eef4c46f2c, 0xb1d4aad87651e694, 0x1947f0d5f4fe325a])).unwrap()),
"Fq(0x1947f0d5f4fe325ab1d4aad87651e694676cc4eef4c46f2cb38d35b3f677958539a8f1... | rust_cleaned_test_functions.jsonl/2335 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 446
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
80,
14825,
368,
341,
286,
2060,
10714,
33673,
286,
3561,
79878,
434,
80,
486,
1499,
68535,
7832,
80,
693,
649,
2561,
15,
9591,
24,
20,
21,
47722,
69,
24,
18,
15,
16,
12508,
17,
19,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ty_param_bound() {
let tokens = quote!('a);
snapshot!(tokens as TypeParamBound, @r###"
Lifetime(Lifetime {
ident: "a",
})
"###);
let tokens = quote!('_);
snapshot!(tokens as TypeParamBound, @r###"
Lifetime(Lifetime {
ident: "_",
})
"###);
... | rust_cleaned_test_functions.jsonl/39279 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 559
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53171,
4090,
19447,
368,
341,
262,
1077,
11211,
284,
12641,
0,
492,
64,
317,
262,
16295,
10297,
30566,
438,
3990,
2001,
19568,
11,
569,
81,
14374,
698,
262,
64352,
4957,
28515,
341,
286,
3524,
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_bind_doc() -> Result<(), Box<dyn Error + Send + Sync>> {
let sql = SqlBuilder::select_from("books")
.fields(&["title", "price"])
.and_where("price > ? AND title LIKE ?".binds(&[&100, &"Harry Potter%"]))
.sql()?;
assert_eq!(
"SELECT... | rust_cleaned_test_functions.jsonl/4402 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 216
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27461,
18869,
368,
1464,
5714,
68843,
8261,
92846,
4600,
488,
11000,
488,
28937,
2452,
341,
286,
1077,
5704,
284,
7224,
3297,
486,
1742,
5673,
445,
12110,
1138,
310,
659,
9007,
2099,
1183,
2102,
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... | 2 |
#[test]
fn test_gauge() {
let opts = Opts::new("test", "test help")
.const_label("a", "1")
.const_label("b", "2");
let gauge = Gauge::with_opts(opts).unwrap();
gauge.inc();
assert_eq!(gauge.get() as u64, 1);
gauge.add(42.0);
assert_eq!(gaug... | rust_cleaned_test_functions.jsonl/7403 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 450
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
19392,
368,
341,
286,
1077,
12185,
284,
506,
12754,
486,
931,
445,
1944,
497,
330,
1944,
1492,
1138,
310,
659,
1024,
6106,
445,
64,
497,
330,
16,
1138,
310,
659,
1024,
6106,
445,
65,
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... | 1 |
#[test]
fn test_check_now_monitor() {
let update = Update::from_args(&["update"], &["check-now", "--monitor"]).unwrap();
assert_eq!(
update,
Update { cmd: Command::CheckNow(CheckNow { service_initiated: false, monitor: true }) }
);
} | rust_cleaned_test_functions.jsonl/50079 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 133
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
20813,
40112,
368,
341,
286,
1077,
2647,
284,
5549,
486,
1499,
8384,
2099,
1183,
2386,
7914,
609,
1183,
2028,
90963,
497,
14482,
32225,
45014,
15454,
543,
286,
2060,
10714,
33673,
310,
2647,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_constrained_length_mutator_ordered_arbitrary() {
let range = 0..=10;
let m = VecMutator::<u8, U8Mutator>::new(U8Mutator::default(), range.clone());
let mut step = false;
let mut lengths = vec![0; 11];
let mut cplxs = vec![0; 81];
for _ in 0..1000... | rust_cleaned_test_functions.jsonl/72633 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 344
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3382,
57727,
5118,
29523,
850,
75272,
25842,
87851,
368,
341,
286,
1077,
2088,
284,
220,
15,
496,
28,
16,
15,
280,
286,
1077,
296,
284,
11312,
51440,
850,
27638,
84,
23,
11,
547,
23,
51440,
85... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.