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_bit_reader_get_zigzag_vlq_int() {
let buffer: Vec<u8> = vec![0, 1, 2, 3];
let mut bit_reader = BitReader::from(buffer);
assert_eq!(bit_reader.get_zigzag_vlq_int(), Some(0));
assert_eq!(bit_reader.get_zigzag_vlq_int(), Some(-1));
assert_eq!(bit_reader.get_z... | rust_cleaned_test_functions.jsonl/115732 | {
"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,
13996,
22306,
3062,
6415,
343,
92674,
2273,
75,
80,
4042,
368,
341,
286,
1077,
4147,
25,
11312,
34837,
23,
29,
284,
7486,
20703,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
935,
286,
1077,
52... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_presentation_request_build_works() {
let presentation_request: PresentationRequest = PresentationRequest::default()
.set_comment(_comment())
.set_request_presentations_attach(&_presentation_request_data()).unwrap();
assert_eq!(_presentation_request(), pre... | rust_cleaned_test_functions.jsonl/79617 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 127
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
13584,
7893,
20801,
11498,
82,
368,
341,
286,
1077,
15496,
7893,
25,
50868,
1900,
284,
50868,
1900,
486,
2258,
741,
310,
659,
746,
17638,
2490,
6182,
2398,
310,
659,
746,
7893,
36976,
804,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_vcpu_save_restore_state_events() {
let (vcpu_handle, _vcpu_exit_evt) = vcpu_configured_for_boot();
queue_event_expect_response(&vcpu_handle, VcpuEvent::Resume, VcpuResponse::Resumed);
queue_event_expect_response(&vcpu_handle, VcpuEvent::SaveState, Vcpu... | rust_cleaned_test_functions.jsonl/99252 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 522
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
16475,
15376,
62677,
4387,
19691,
368,
341,
286,
1077,
320,
85,
16475,
10630,
11,
716,
85,
16475,
16880,
60019,
8,
284,
348,
16475,
5332,
3073,
5478,
52062,
1428,
1789,
286,
7177,
6748,
6891... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_01() {
let e: Element = Element::parse(File::open("tests/data/01.xml").unwrap()).unwrap();
println!("E:=======\n{:#?}", e);
assert_eq!(e.name, "project");
let e2: &Element = e.get_child("libraries").expect("Missing libraries child element");
assert_eq!(e2.name, "libraries");
... | rust_cleaned_test_functions.jsonl/15707 | {
"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,
62,
15,
16,
368,
341,
262,
1077,
384,
25,
8543,
284,
8543,
486,
6400,
19821,
486,
2508,
445,
23841,
13167,
14,
15,
16,
9028,
1827,
15454,
6011,
15454,
543,
262,
13751,
17223,
36,
25,
53237,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_halt_at_slot_starting_snapshot_root() {
let GenesisConfigInfo { genesis_config, .. } = create_genesis_config(123);
let forks = tr(0) / tr(1);
let ledger_path = get_tmp_ledger_path!();
let blockstore = Blockstore::open(&ledger_path).unwrap();
bloc... | rust_cleaned_test_functions.jsonl/70868 | {
"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,
1523,
3145,
3752,
27563,
4906,
287,
53265,
12993,
368,
341,
286,
1077,
40788,
2648,
1731,
314,
59366,
5332,
11,
5241,
335,
284,
1855,
16322,
13774,
5332,
7,
16,
17,
18,
626,
1789,
286,
1077,
735... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compose_normalizer_chinese() {
let token = Token {
word: Cow::Borrowed("生而自由"),
char_index: 0,
kind: TokenKind::Word,
byte_start: 0,
byte_end: 0,
};
let deunicoder = DeunicodeNormalizer::new(&|text: &str| {
... | rust_cleaned_test_functions.jsonl/132944 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 433
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2965,
2900,
13973,
3135,
4138,
7346,
368,
341,
286,
1077,
3950,
284,
9660,
341,
310,
3409,
25,
21851,
486,
33,
7768,
291,
445,
21287,
68536,
101972,
4461,
310,
1161,
3560,
25,
220,
15,
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 |
#[test]
fn test_rent_for_sysvars_adjustment_minimum_genesis_set() {
solana_logger::setup();
let (mut genesis_config, _mint_keypair) = create_genesis_config(0);
let feature_balance =
std::cmp::max(genesis_config.rent.minimum_balance(Feature::size_of()), 1);
// inhibi... | rust_cleaned_test_functions.jsonl/2658 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1497
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
83127,
5478,
20344,
15380,
44153,
478,
84855,
16322,
13774,
2602,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
1428,
286,
1077,
320,
6984,
59366,
5332,
11,
716,
67791,
3097,
12670,
8,
284,
1855,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_translation() {
let mat = Matrix4::from_translation(Vector3::new(1.0f64, 2.0f64, 3.0f64));
let vertex = Vector4::new(0.0f64, 0.0f64, 0.0f64, 1.0f64);
let res = mat * vertex;
assert_eq!(res, Vector4::new(1., 2., 3., 1.));
} | rust_cleaned_test_functions.jsonl/30175 | {
"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,
5673,
49273,
368,
341,
286,
1077,
5517,
284,
11631,
19,
486,
1499,
49273,
20258,
18,
486,
931,
7,
16,
13,
15,
69,
21,
19,
11,
220,
17,
13,
15,
69,
21,
19,
11,
220,
18,
13,
15,
69,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_path_rect() {
let r = Rect::new(0.0, 0.0, 100.0, 100.0);
let path = Path::rect(r, None);
assert_eq!(*path.bounds(), r);
} | rust_cleaned_test_functions.jsonl/55877 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 83
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2638,
16979,
368,
972,
262,
1077,
435,
284,
11920,
486,
931,
7,
15,
13,
15,
11,
220,
15,
13,
15,
11,
220,
16,
15,
15,
13,
15,
11,
220,
16,
15,
15,
13,
15,
736,
262,
1077,
1815,
284,
79... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rotation_inverse_rotate_point() {
let angle = Degrees(135.0);
let rotation = Rotation2::from_angle(angle);
let point = Point2::new(-1_f64, 1_f64);
let expected = Point2::new(f64::sqrt(2_f64), 0_f64);
let result = rotation.inverse_rotate_point(&point);
... | rust_cleaned_test_functions.jsonl/70480 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 189
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44813,
63333,
60834,
6085,
368,
341,
286,
1077,
9210,
284,
92901,
7,
16,
18,
20,
13,
15,
317,
286,
1077,
12695,
284,
47528,
17,
486,
1499,
21727,
29633,
317,
286,
1077,
1459,
284,
5126,
17,
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_get_preferred_target() {
let kvm = Kvm::new().unwrap();
let vm = kvm.create_vm().unwrap();
let vcpu = vm.create_vcpu(0).unwrap();
let mut kvi: kvm_bindings::kvm_vcpu_init = kvm_bindings::kvm_vcpu_init::default();
assert!(vcpu.vcpu_init(&kvi).is_err());
... | rust_cleaned_test_functions.jsonl/92518 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 230
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
10442,
5554,
11123,
368,
341,
286,
1077,
94748,
284,
730,
7338,
486,
931,
1005,
15454,
543,
286,
1077,
10995,
284,
94748,
2520,
39008,
1005,
15454,
543,
286,
1077,
348,
16475,
284,
10995,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_two_delays() {
let pulse = 4;
let mut model = PulsedModel::default();
let fact_0 = PulsedFact {
datum_type: u8::datum_type(),
shape: tvec![pulse],
axis: 0,
dim: TDim::s(),
delay: 0,
};
let source ... | rust_cleaned_test_functions.jsonl/520 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 661
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23241,
18029,
942,
368,
341,
286,
1077,
27235,
284,
220,
19,
280,
286,
1077,
5206,
1614,
284,
393,
14295,
291,
1712,
486,
2258,
543,
286,
1077,
2097,
62,
15,
284,
393,
14295,
291,
17417,
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... | 2 |
#[test]
fn test_primitive_dictionary_builder() {
let key_builder = PrimitiveBuilder::<UInt8Type>::new(3);
let value_builder = PrimitiveBuilder::<UInt32Type>::new(2);
let mut builder = PrimitiveDictionaryBuilder::new(key_builder, value_builder);
builder.append(12345678).unwrap();
... | rust_cleaned_test_functions.jsonl/120225 | {
"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,
84087,
42605,
28532,
368,
341,
286,
1077,
1376,
28532,
284,
51460,
3297,
27638,
18777,
23,
929,
6831,
931,
7,
18,
317,
286,
1077,
897,
28532,
284,
51460,
3297,
27638,
18777,
18,
17,
929,
6831,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_invalid_try_from_core_invalid_controller() {
let invalid_controller: DID = "did:invalid:HGE4tecHWL2YiZv5qAGtH7gaeQcaz2Z1CR15GWmMjY1M"
.parse()
.unwrap();
let doc = IotaDocument::try_from_core(
CoreDocument::builder(valid_properties())
.id(valid_did())
//... | rust_cleaned_test_functions.jsonl/84323 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 232
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
53283,
5673,
15467,
31433,
21600,
368,
341,
262,
1077,
8318,
21600,
25,
59119,
284,
330,
22920,
25,
11808,
94192,
10777,
19,
54200,
38252,
43,
17,
56,
72,
57,
85,
20,
80,
1890,
83,
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... | 1 |
#[test]
fn test_minimize_linear_down() {
let quad = BoundedQuadratic::new(-1., 1., 0., -1., 0.);
assert_eq!(quad.minimize(), (1., -1.));
} | rust_cleaned_test_functions.jsonl/19885 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 83
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7260,
11853,
40674,
13998,
368,
341,
286,
1077,
27082,
284,
425,
13082,
2183,
88678,
486,
931,
4080,
16,
2572,
220,
16,
2572,
220,
15,
2572,
481,
16,
2572,
220,
15,
58957,
286,
2060,
10714,
1029... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_suppress_non_maximum() {
let mut image = GrayImage::new(25, 25);
// Suppress vertically
image.put_pixel(0, 0, Luma([8u8]));
image.put_pixel(0, 3, Luma([10u8]));
image.put_pixel(0, 6, Luma([9u8]));
// Suppress horizontally
image.put_pixel(5,... | rust_cleaned_test_functions.jsonl/47923 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 431
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23723,
1873,
21637,
93581,
368,
341,
286,
1077,
5206,
2168,
284,
23366,
1906,
486,
931,
7,
17,
20,
11,
220,
17,
20,
317,
286,
442,
86798,
50935,
198,
286,
2168,
3597,
29760,
7,
15,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fixed_length_binary_column_reader() {
let message_type = "
message test_schema {
REQUIRED FIXED_LEN_BYTE_ARRAY (20) leaf;
}
";
let converter = FixedSizeArrayConverter::new(20);
run_single_column_reader_tests::<
FixedLenByteAr... | rust_cleaned_test_functions.jsonl/115773 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 240
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37839,
5118,
31761,
8744,
22306,
368,
341,
286,
1077,
1943,
1819,
284,
6228,
286,
1943,
1273,
25371,
341,
688,
66577,
91549,
15536,
27349,
17724,
320,
17,
15,
8,
15933,
280,
286,
456,
286,
41620,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_or_add_extension() {
assert_eq!(
replace_or_add_extension("test.pdb", "pdb", "sym"),
"test.sym"
);
assert_eq!(
replace_or_add_extension("TEST.PDB", "pdb", "sym"),
"TEST.sym"
);
assert_eq!(replace_or_add_extension("test", "pdb", "sym"), ... | rust_cleaned_test_functions.jsonl/36428 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 291
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10633,
8734,
2891,
31035,
368,
341,
262,
2060,
10714,
33673,
286,
8290,
8734,
2891,
31035,
445,
1944,
556,
1999,
497,
330,
84202,
497,
330,
23802,
4461,
286,
330,
1944,
50901,
698,
262,
1439,
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_wait_table_add_duplicated_waiter() {
let mut wait_table = WaitTable::new(Arc::new(AtomicUsize::new(0)));
let waiter_ts = 10.into();
let lock = Lock {
ts: 20.into(),
hash: 20,
};
assert!(wait_table
.add_waiter(dummy_waite... | rust_cleaned_test_functions.jsonl/32487 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 318
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18760,
5237,
2891,
814,
98984,
18760,
261,
368,
341,
286,
1077,
5206,
3783,
5237,
284,
13824,
2556,
486,
931,
4346,
1287,
486,
931,
7,
65857,
52,
2141,
486,
931,
7,
15,
4945,
286,
1077,
67169,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_threaded() {
let (names, _, seqs, quals, cigars) = gold();
let tmp = tempdir::TempDir::new("rust-htslib")
.ok()
.expect("Cannot create temp dir");
let bampath = tmp.path().join("test.bam");
println!("{:?}", bampath);
{
... | rust_cleaned_test_functions.jsonl/34031 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1096
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
10814,
291,
368,
341,
286,
1077,
320,
11400,
11,
8358,
12981,
82,
11,
922,
1127,
11,
81115,
8,
284,
6623,
1428,
286,
1077,
4174,
284,
2730,
3741,
486,
12151,
6184,
486,
931,
445,
35788,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_uvs() {
let mut data = SurfaceData::make_cone(
16,
1.0,
1.0,
&Matrix4::new_nonuniform_scaling(&Vector3::new(1.0, 1.1, 1.0)),
);
generate_uvs(&mut data, 0.01).unwrap();
let white =... | rust_cleaned_test_functions.jsonl/3679 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 906
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48851,
7300,
11562,
368,
341,
73363,
286,
1077,
5206,
821,
284,
26963,
1043,
486,
6927,
3382,
68,
1006,
310,
220,
16,
21,
345,
310,
220,
16,
13,
15,
345,
310,
220,
16,
13,
15,
345,
310,
609,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_read_mixed_arrays() {
assert_eq!(
Reader::read("bool[][3]").unwrap(),
ParamType::FixedArray(Box::new(ParamType::Array(Box::new(ParamType::Bool))), 3)
);
assert_eq!(
Reader::read("bool[3][]").unwrap(),
ParamType::Array(Box::new(ParamType::FixedArray(Box::new(ParamType::Bool), 3)... | rust_cleaned_test_functions.jsonl/110636 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 147
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
717,
3286,
68983,
368,
341,
197,
6948,
10714,
33673,
298,
197,
5062,
486,
878,
445,
2641,
63449,
18,
44891,
15454,
3148,
298,
197,
2001,
929,
486,
13520,
1857,
67758,
486,
931,
7,
2001,
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... | 1 |
#[test]
fn test_bytes_to_int_overflow() {
let tests: Vec<(&[u8], _, _)> = vec![
(
b"12e1234817291749271847289417294",
FieldTypeTp::LongLong,
9223372036854775807,
),
(
b"12e1234817291749271847289417294",
... | rust_cleaned_test_functions.jsonl/48527 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 443
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12524,
2346,
4042,
79073,
368,
341,
286,
1077,
7032,
25,
11312,
27,
2099,
58,
84,
23,
1125,
8358,
716,
16018,
284,
7486,
90515,
310,
2399,
394,
293,
1,
16,
17,
68,
16,
17,
18,
19,
23,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_solve_first() {
let input: HashMap<u32, u32> = [(0, 3), (1, 2), (4, 4), (6, 4)].iter().cloned().collect();
assert_eq!(solve_first(&input), 24);
} | rust_cleaned_test_functions.jsonl/76139 | {
"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,
86246,
12978,
368,
341,
286,
1077,
1946,
25,
10528,
34837,
18,
17,
11,
575,
18,
17,
29,
284,
17826,
15,
11,
220,
18,
701,
320,
16,
11,
220,
17,
701,
320,
19,
11,
220,
19,
701,
320,
21,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_missing_blocks() {
let reference_slots = vec![0, 37, 38, 39, 40, 41, 42, 43, 44, 45];
let owned_slots = vec![0, 38, 39, 40, 43, 44, 45, 46, 47];
let owned_slots_leftshift = vec![0, 25, 26, 27, 28, 29, 30, 31, 32];
let owned_slots_rightshift = vec![0, 44, 46, 47, 4... | rust_cleaned_test_functions.jsonl/60591 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 598
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40447,
25201,
368,
341,
286,
1077,
5785,
54161,
284,
7486,
20703,
15,
11,
220,
18,
22,
11,
220,
18,
23,
11,
220,
18,
24,
11,
220,
19,
15,
11,
220,
19,
16,
11,
220,
19,
17,
11,
220,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_custom_ignore_precedence() {
let dirs = &["inner"];
let files = &["inner/foo"];
let te = TestEnv::new(dirs, files);
// Ignore 'foo' via .gitignore
fs::File::create(te.test_root().join("inner/.gitignore"))
.unwrap()
.write_all(b"foo")
.unwrap();
/... | rust_cleaned_test_functions.jsonl/10866 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 293
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15875,
58493,
10442,
1998,
763,
368,
341,
262,
1077,
42248,
284,
609,
1183,
4382,
6332,
262,
1077,
3542,
284,
609,
1183,
4382,
60555,
6332,
262,
1077,
1013,
284,
3393,
14359,
486,
931,
14161,
82,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_banking_stage_entryfication() {
analog_logger::setup();
// In this attack we'll demonstrate that a verifier can interpret the ledger
// differently if either the server doesn't signal the ledger to add an
// Entry OR if the verifier tries to parallelize across mul... | rust_cleaned_test_functions.jsonl/4984 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2219
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
32334,
35238,
9078,
69,
20285,
368,
341,
286,
23400,
27413,
486,
15188,
543,
286,
442,
758,
419,
3359,
582,
3278,
19869,
429,
264,
88737,
646,
14198,
279,
46933,
198,
286,
442,
21303,
421,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_nv_index_attributes_builder_missing_read_attribute_failure() {
// Test missing read error
// Building with only PP write set this should result in an error
single_attribute_error!(with_pp_write);
// Building with only owner write set this should result in an erro... | rust_cleaned_test_functions.jsonl/57724 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 429
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79430,
3560,
18240,
28532,
40447,
6443,
16791,
43618,
368,
341,
286,
442,
3393,
7402,
1349,
1465,
271,
286,
442,
16858,
448,
1172,
29850,
3270,
738,
419,
1265,
1102,
304,
458,
1465,
198,
286,
3175... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_encode_user_data_with_two_octet_length_succeeds() {
let length = 130;
let mut information = vec![0; length];
let frame = Frame {
role: Role::Initiator,
dlci: DLCI::try_from(5).unwrap(),
data: FrameData::UnnumberedInfoHeaderCheck(UIHData... | rust_cleaned_test_functions.jsonl/87876 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 539
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
3317,
1769,
6615,
23241,
70135,
295,
5118,
643,
29264,
82,
368,
341,
286,
1077,
3084,
284,
220,
16,
18,
15,
280,
286,
1077,
5206,
1995,
284,
7486,
20703,
15,
26,
3084,
935,
286,
1077,
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_genesis_config_save_and_load() -> Result<()> {
let mut genesis_config = BuiltinNetworkID::Test.genesis_config().clone();
genesis_config.consensus_config.base_block_time_target = 10000000;
let temp_path = temp_path();
let file_path = temp_path.path().join(GENESIS_CONFIG_FILE_NAME)... | rust_cleaned_test_functions.jsonl/8287 | {
"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,
16322,
13774,
5332,
15376,
8378,
12411,
368,
1464,
5714,
71698,
341,
262,
1077,
5206,
59366,
5332,
284,
425,
25628,
12320,
915,
486,
2271,
22822,
13774,
5332,
1005,
19982,
543,
262,
59366,
5332,
632... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_normalize() {
let n = float4::broadcast(0.0).normalize();
assert!(n.0.is_nan());
assert!(n.1.is_nan());
assert!(n.2.is_nan());
assert!(n.3.is_nan());
} | rust_cleaned_test_functions.jsonl/103839 | {
"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,
80807,
368,
341,
220,
1077,
308,
284,
2224,
19,
486,
54162,
7,
15,
13,
15,
568,
30590,
1428,
220,
2060,
10297,
77,
13,
15,
2079,
73936,
1423,
220,
2060,
10297,
77,
13,
16,
2079,
73936,
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 |
#[test]
fn test_unpack_apple_gzip_file() {
let gzip_filename: PathBuf = [
env!("CARGO_MANIFEST_DIR"),
"testdata",
"archives",
"apple_pkg_expanded_gzip",
]
.iter()
.collect();
let (_, o_filename) = unpack_apple_gzip(
... | rust_cleaned_test_functions.jsonl/77208 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 314
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54889,
8191,
273,
1889,
9964,
2458,
368,
341,
286,
1077,
57795,
13323,
25,
7933,
15064,
284,
2278,
310,
6105,
17223,
34,
7581,
46,
25143,
91120,
8291,
4461,
310,
330,
92425,
756,
310,
330,
95812,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nested() {
struct Foo;
impl fmt::Debug for Foo {
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt.debug_tuple("Foo")
.field(&true)
.field(&format_args!("{}/{}", 10, 20))
.fini... | rust_cleaned_test_functions.jsonl/69314 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 547
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66279,
368,
341,
286,
2036,
33428,
401,
286,
11605,
8879,
486,
7939,
369,
33428,
341,
310,
5168,
8879,
2099,
721,
11,
8879,
25,
609,
6984,
8879,
486,
14183,
18291,
62,
9231,
1464,
8879,
486,
207... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_loop_m_n() {
let mut m = [[0; KernelAvx::NR]; KernelAvx::MR];
loop_m!(i, loop_n!(j, m[i][j] += 1));
for arr in &m[..] {
for elt in &arr[..] {
assert_eq!(*elt, 1);
}
}
} | rust_cleaned_test_functions.jsonl/88695 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 170
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17198,
717,
1089,
368,
341,
286,
1077,
5206,
296,
284,
4318,
15,
26,
36603,
9865,
87,
486,
26319,
5265,
36603,
9865,
87,
486,
18446,
935,
286,
6337,
717,
10297,
72,
11,
6337,
1089,
10297,
73,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_array() {
assert_eq!(
<[bool; 2]>::from_record(&Record::Array(
CollectionKind::Vector,
vec![Record::Bool(true), Record::Bool(false)]
)),
Ok([true, false])
);
assert_eq!(
<[bool; 2]>::from_record(&Record::Array(
Colle... | rust_cleaned_test_functions.jsonl/8016 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 246
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
368,
341,
262,
2060,
10714,
33673,
286,
366,
58,
2641,
26,
220,
17,
60,
6831,
1499,
14192,
2099,
6471,
486,
1857,
1006,
310,
11101,
10629,
486,
3781,
345,
310,
7486,
20703,
6471,
486,
1123... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cut_with_partial() -> TestResult {
let p = Polar::new();
p.load_str(
r#"f(x) if x = 1;
f(x) if x = 2 and cut;
f(x) if x = 3;"#,
)?;
let mut q = p.new_query_from_term(term!(call!("f", [sym!("a")])), false);
assert_e... | rust_cleaned_test_functions.jsonl/63037 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 279
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41317,
6615,
52068,
368,
1464,
3393,
2077,
341,
286,
1077,
281,
284,
55896,
486,
931,
543,
286,
281,
5104,
2895,
1006,
310,
435,
55543,
69,
2075,
8,
421,
856,
284,
220,
16,
280,
2290,
282,
207... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_query_captures_with_definite_pattern_containing_many_nested_matches() {
allocations::record(|| {
let language = get_language("javascript");
let query = Query::new(
language,
r#"
(array
"[" @l-bracket
"]" @r-brack... | rust_cleaned_test_functions.jsonl/25192 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 771
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
666,
2689,
1413,
6615,
7844,
15856,
21260,
10260,
2056,
22101,
66279,
38344,
368,
341,
262,
69642,
486,
8548,
79453,
341,
286,
1077,
4128,
284,
633,
29021,
445,
14073,
797,
286,
1077,
3239,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ext() {
test_parse(
"command { AT+TEST=? }",
Definition::Command(Command::Test { name: String::from("TEST"), is_extension: true }),
)
} | rust_cleaned_test_functions.jsonl/53076 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 84
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9927,
368,
341,
262,
1273,
21039,
1006,
286,
330,
5631,
314,
7369,
10,
10033,
19884,
335,
756,
286,
19709,
486,
4062,
41422,
486,
2271,
314,
829,
25,
923,
486,
1499,
445,
10033,
3975,
374,
31035... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_client_storage() -> anyhow::Result<()> {
let storage = InMemoryStorage::new();
let mut txn = storage.txn()?;
let client_key = Uuid::new_v4();
let latest_version_id = Uuid::new_v4();
txn.new_client(client_key, latest_version_id)?;
let client = txn... | rust_cleaned_test_functions.jsonl/16732 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 556
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8179,
23310,
368,
1464,
88964,
486,
2077,
71698,
341,
286,
1077,
5819,
284,
758,
10642,
5793,
486,
931,
543,
286,
1077,
5206,
49721,
284,
5819,
33807,
77,
368,
69493,
286,
1077,
2943,
3097,
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... | 8 |
#[test]
fn test_purge_special_columns_exact_no_sigs() {
let blockstore_path = get_tmp_ledger_path!();
{
let blockstore = Blockstore::open(&blockstore_path).unwrap();
let slot = 1;
let mut entries: Vec<Entry> = vec![];
for x in 0..5 {
... | rust_cleaned_test_functions.jsonl/38765 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 537
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
39823,
41629,
22590,
71084,
6536,
643,
14462,
368,
341,
286,
1077,
2504,
4314,
2638,
284,
633,
16125,
38367,
1389,
2638,
0,
543,
286,
341,
310,
1077,
2504,
4314,
284,
8362,
4314,
486,
2508,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parameter_type_inference() -> Result<(), Box<dyn Error>> {
let test_cases = vec![
(
"SELECT $1, $2, $3",
vec![Type::Text, Type::Text, Type::Text],
),
(
"VALUES($1, $2, $3)",
vec![Type::Text, Type::Text, Type::Text],
... | rust_cleaned_test_functions.jsonl/35684 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1620
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24899,
1819,
1243,
2202,
368,
1464,
5714,
68843,
8261,
92846,
4600,
2452,
341,
262,
1077,
1273,
41427,
284,
7486,
90515,
286,
2399,
310,
330,
4858,
400,
16,
11,
400,
17,
11,
400,
18,
756,
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_keys_new() {
let keys = Keys::new("anetohias===", "oeatssah=");
assert_eq!(
keys,
Keys {
p256dh: "anetohias===".to_string(),
auth: "oeatssah=".to_string()
}
);
} | rust_cleaned_test_functions.jsonl/116571 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 175
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12631,
5921,
368,
341,
286,
1077,
6894,
284,
24133,
486,
931,
445,
276,
295,
2267,
3473,
418,
21369,
330,
4644,
266,
778,
1466,
45219,
286,
2060,
10714,
33673,
310,
6894,
345,
310,
24133,
341,
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_parse_xc_repo_data_split_line() {
assert_eq!(
vec![1, 2, 3, 2, 1],
super::DataSplits::parse_xc_repo_data_split_line("1 2 3 2 1").unwrap()
)
} | rust_cleaned_test_functions.jsonl/49672 | {
"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,
21039,
3212,
66,
37784,
1769,
17052,
6528,
368,
341,
286,
2060,
10714,
33673,
310,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
17,
11,
220,
16,
1259,
310,
2256,
486,
1043,
50,
39033,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_backup_mode_short_only() {
let _dummy = TEST_MUTEX.lock().unwrap();
let matches = make_app().get_matches_from(vec!["app", "-b"]);
let result = determine_backup_mode(&matches).unwrap();
assert_eq!(result, BackupMode::ExistingBackup);
} | rust_cleaned_test_functions.jsonl/98140 | {
"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,
44710,
7302,
16673,
18410,
368,
341,
286,
1077,
716,
31390,
284,
13602,
66994,
21003,
1005,
15454,
543,
286,
1077,
9071,
284,
1281,
8191,
1005,
455,
38344,
5673,
25592,
0,
1183,
676,
497,
6523,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_leader_transfer_timeout() {
let l = default_logger();
let mut nt = Network::new(vec![None, None, None], &l);
nt.send(vec![new_message(1, 1, MessageType::MsgHup, 0)]);
nt.isolate(3);
nt.send(vec![new_message(3, 1, MessageType::MsgTransferLeader, 0)]);
assert_eq!(nt.... | rust_cleaned_test_functions.jsonl/19165 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 356
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79991,
35403,
20537,
368,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
1077,
5206,
31412,
284,
8141,
486,
931,
25592,
20703,
4064,
11,
2240,
11,
2240,
1125,
609,
75,
317,
262,
31412,
5219,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_lists() {
let cwd = env::current_dir().unwrap().to_string_lossy().into_owned();
let xd = BaseDirectories::with_env("", "", &*make_env(vec![
("HOME", format!("{}/test_files/user", cwd)),
("XDG_DATA_HOME", format!("{}/test_files/user/data", cwd)),
("XDG_... | rust_cleaned_test_functions.jsonl/83588 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1049
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37288,
368,
341,
262,
1077,
46938,
284,
6105,
486,
3231,
4334,
1005,
15454,
1005,
983,
3904,
11193,
88,
1005,
18122,
51973,
543,
262,
1077,
79052,
284,
5351,
56397,
486,
4197,
15879,
19814,
7342,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_default() {
use std::net;
let s: ArrayString<[u8; 4]> = Default::default();
// Something without `Default` implementation.
let v: ArrayVec<[net::TcpStream; 4]> = Default::default();
assert_eq!(s.len(), 0);
assert_eq!(v.len(), 0);
} | rust_cleaned_test_functions.jsonl/36793 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 118
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9993,
368,
341,
262,
990,
1460,
486,
4711,
280,
262,
1077,
274,
25,
2910,
703,
66746,
84,
23,
26,
220,
19,
25669,
284,
7899,
486,
2258,
543,
262,
442,
24656,
2041,
1565,
3675,
63,
8129,
624,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_full_hash() {
let mut rng = XorShiftRng::from_seed([
0x59, 0x62, 0xbe, 0x3d, 0x76, 0x3d, 0x31, 0x8d, 0x17, 0xdb, 0x37, 0x32, 0x54, 0x06,
0xbc, 0xe5,
]);
let mut cs = TestConstraintSystem::<Fr>::new();
let input_bits: Vec<_> = (0..512)
... | rust_cleaned_test_functions.jsonl/38849 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 503
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16372,
8950,
368,
341,
286,
1077,
5206,
28422,
284,
1599,
269,
24841,
49,
968,
486,
1499,
33809,
8956,
310,
220,
15,
87,
20,
24,
11,
220,
15,
87,
21,
17,
11,
220,
15,
42459,
11,
220,
15,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_values_mut() {
let vec = vec![(1, 1), (2, 2), (3, 3)];
let mut map: HashMap<_, _> = vec.into_par_iter().collect();
map.par_values_mut().for_each(|value| *value = (*value) * 2);
let values: Vec<_> = map.par_values().cloned().collect();
assert_eq!(values.len... | rust_cleaned_test_functions.jsonl/45216 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 215
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9146,
29523,
368,
341,
286,
1077,
7486,
284,
7486,
0,
9697,
16,
11,
220,
16,
701,
320,
17,
11,
220,
17,
701,
320,
18,
11,
220,
18,
12587,
286,
1077,
5206,
2415,
25,
10528,
27,
6878,
716,
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_navigate() {
assert_eq!(
navigate(vec![
Command::MoveForward(10),
Command::Move(Direction::North, 3),
Command::MoveForward(7),
Command::Turn(Turn::Right, 90),
Command::MoveForward(11)
... | rust_cleaned_test_functions.jsonl/114160 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 211
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
10379,
368,
341,
286,
2060,
10714,
33673,
310,
20876,
25592,
90515,
394,
7348,
486,
9860,
25925,
7,
16,
15,
1326,
394,
7348,
486,
9860,
81740,
486,
25221,
11,
220,
18,
1326,
394,
7348,
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_eval_nhwc_batch() {
setup_test_logger();
let op = Conv::default().nhwc().hwio().padding(PaddingSpec::SameUpper);
let result = op
.eval(tvec!(rctensor4(&[[[[2.0f32]]], [[[0.0f32]]]]), rctensor4(&[[[[1.0f32]]]])))
.unwrap();
assert_eq!(result... | rust_cleaned_test_functions.jsonl/51979 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 205
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
93934,
24028,
14534,
368,
341,
286,
6505,
4452,
27413,
543,
286,
1077,
1179,
284,
28988,
486,
2258,
1005,
16719,
24028,
1005,
27827,
815,
1005,
9571,
5304,
2998,
8327,
486,
19198,
14251,
317,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cert_verify() {
let ca = b"-----BEGIN CERTIFICATE-----
MIIBkDCCATegAwIBAgIRANQudMcHu/SmX8470nbNlj0wCgYIKoZIzj0EAwIwEjEQ
MA4GA1UEAxMHVGVzdCBDQTAeFw0xODA4MTYyMjMyNDFaFw00NjAxMDEyMjMyNDFa
MBIxEDAOBgNVBAMTB1Rlc3QgQ0EwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAASN
+LHr9ZN72sxZqi4zcYDIg4xzN3DOF3epvlpGHLnju5... | rust_cleaned_test_functions.jsonl/95299 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1774
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37097,
35638,
368,
341,
262,
1077,
2162,
284,
293,
1,
15081,
37588,
62357,
82023,
34764,
9773,
3256,
74,
35,
3706,
828,
791,
22600,
3256,
9042,
2801,
1093,
48,
661,
25286,
81378,
14,
10673,
55,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_response_to_vector_empty() {
let response: Vec<fidl_fuchsia_settings::LightGroup> =
SettingInfo::into((LightInfo { light_groups: Default::default() }).into());
assert_eq!(response, vec![]);
} | rust_cleaned_test_functions.jsonl/84315 | {
"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,
9655,
2346,
12247,
15124,
368,
341,
286,
1077,
2033,
25,
11312,
27,
32439,
75,
761,
73391,
10853,
486,
13911,
2808,
29,
4035,
310,
20037,
1731,
486,
18122,
1188,
13911,
1731,
314,
3100,
21148,
25,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_stdin_all_repeated_separate() {
new_ucmd!()
.args(&["--all-repeated=separate"]).pipe_in_fixture(INPUT)
.run().stdout_is_fixture("sorted-all-repeated-separate.expected");
} | rust_cleaned_test_functions.jsonl/23102 | {
"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,
15656,
258,
5705,
1288,
41954,
3453,
67598,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
313,
541,
5504,
41954,
28,
325,
67598,
45014,
13768,
1243,
74409,
57911,
340,
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 |
#[test]
fn test_rotation_between_vectors_vector() {
let vector = 3_f64 * Vector2::new(f64::sqrt(3_f64) / 2_f64, 1_f64 / 2_f64);
let vector1 = 5_f64 * Vector2::unit_y();
let vector2 = 12_f64 * Vector2::unit_x();
let rotation = Rotation2::rotation_between(&vector1, &vector2);
... | rust_cleaned_test_functions.jsonl/70476 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 251
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44813,
48302,
49158,
12247,
368,
341,
286,
1077,
4621,
284,
220,
18,
761,
21,
19,
353,
4196,
17,
486,
931,
955,
21,
19,
486,
26888,
7,
18,
761,
21,
19,
8,
608,
220,
17,
761,
21,
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_col_prune_aggr_col() {
assert_j_plan("select sum(c2) from t2", |sql, mut plan| {
col_prune(&mut plan.qry_set, plan.root).unwrap();
print_plan(sql, &plan);
let subq = get_lvl_queries(&plan, 1);
assert_eq!(1, subq[0].out_cols().len());
... | rust_cleaned_test_functions.jsonl/27142 | {
"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,
10211,
5294,
2886,
20587,
901,
10211,
368,
341,
286,
2060,
5374,
26564,
445,
1742,
2629,
1337,
17,
8,
504,
259,
17,
497,
760,
3544,
11,
5206,
3119,
91,
341,
310,
1375,
5294,
2886,
2099,
6984,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_root_ns_cons_arg_nonpod() {
let hdr = indoc! {"
#include <cstdint>
#include <memory>
struct Bob {
Bob(uint32_t _a) :a(_a) {}
uint32_t a;
};
namespace B {
struct C {
uint32_t a;
C(const... | rust_cleaned_test_functions.jsonl/9838 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 352
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12993,
34728,
31971,
6057,
21637,
39073,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
286,
671,
997,
366,
96975,
397,
286,
671,
997,
366,
17269,
397,
286,
2036,
14261,
341,
310,
1426... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rpc_new() {
let GenesisConfigInfo {
genesis_config,
mint_keypair,
..
} = create_genesis_config(10_000);
let exit = Arc::new(AtomicBool::new(false));
let validator_exit = create_validator_exit(&exit);
let bank = Bank::new... | rust_cleaned_test_functions.jsonl/64570 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1265
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60799,
5921,
368,
341,
286,
1077,
40788,
2648,
1731,
341,
310,
59366,
5332,
345,
310,
28337,
3097,
12670,
345,
310,
54538,
286,
335,
284,
1855,
16322,
13774,
5332,
7,
16,
15,
62,
15,
15,
15,
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_from_affine_scale_does_not_change_last_coordinate() {
let matrix = Matrix3x3::from_affine_scale(5);
let unit_z = Vector3::unit_z();
let expected = unit_z;
let result = matrix * unit_z;
assert_eq!(result, expected);
} | rust_cleaned_test_functions.jsonl/129038 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 132
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
48914,
482,
16727,
96374,
7913,
15947,
12195,
68649,
368,
341,
286,
1077,
6172,
284,
11631,
18,
87,
18,
486,
1499,
48914,
482,
16727,
7,
20,
317,
286,
1077,
4982,
6415,
284,
4196,
18,
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_canonicalize_path() {
assert_eq!(canonicalize_path("/"), ".");
assert_eq!(canonicalize_path("/foo"), "foo");
assert_eq!(canonicalize_path("/foo/bar/"), "foo/bar/");
assert_eq!(canonicalize_path("."), ".");
assert_eq!(canonicalize_path("./"), "./");
... | rust_cleaned_test_functions.jsonl/11783 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 185
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27421,
22391,
551,
2638,
368,
341,
286,
2060,
10714,
10297,
77942,
551,
2638,
4283,
3975,
87260,
286,
2060,
10714,
10297,
77942,
551,
2638,
4283,
7975,
3975,
330,
7975,
797,
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_long_text() {
let mut large_file = BufReader::new(File::open("resources/bocchan.txt").unwrap());
let mut large_text = String::new();
let _size = large_file.read_to_string(&mut large_text).unwrap();
let mut tokenizer = Tokenizer::new().unwrap();
let tokens ... | rust_cleaned_test_functions.jsonl/61454 | {
"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,
17799,
4326,
368,
341,
286,
1077,
5206,
3460,
2458,
284,
69013,
5062,
486,
931,
19821,
486,
2508,
445,
12745,
3470,
509,
5658,
3909,
1827,
15454,
1423,
286,
1077,
5206,
3460,
4326,
284,
923,
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_sqrt() {
let tests = vec![
(Datum::F64(64f64), Datum::F64(8f64)),
(Datum::F64(2f64), Datum::F64(f64::consts::SQRT_2)),
(Datum::F64(-16f64), Datum::Null),
(Datum::Null, Datum::Null),
];
let mut ctx = EvalContext::default();
... | rust_cleaned_test_functions.jsonl/125526 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 353
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
92199,
368,
341,
286,
1077,
7032,
284,
7486,
90515,
310,
320,
68036,
486,
37,
21,
19,
7,
21,
19,
69,
21,
19,
701,
68459,
486,
37,
21,
19,
7,
23,
69,
21,
19,
6965,
310,
320,
68036,
486,
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_parse_section_data() {
let mut obj = fake_obj();
assert_matches!(
obj.parse_section(fake_section(".bss", b"map data"),),
Ok(())
);
assert!(obj.maps.get(".bss").is_some());
assert_matches!(
obj.parse_section(fake_section... | rust_cleaned_test_functions.jsonl/132928 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 525
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
16221,
1769,
368,
341,
286,
1077,
5206,
2839,
284,
12418,
7328,
543,
286,
2060,
38344,
33673,
310,
2839,
4632,
16221,
74138,
16221,
5680,
65,
778,
497,
293,
1,
2186,
821,
3975,
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_hex_deserialization() {
let addr = Annotated::<Addr>::from_json("\"0x2a\"").unwrap();
assert_eq!(addr.payload_to_json().unwrap(), "\"0x2a\"");
let addr = Annotated::<Addr>::from_json("42").unwrap();
assert_eq!(addr.payload_to_json().unwrap(), "\"0x2a\"");
} | rust_cleaned_test_functions.jsonl/57487 | {
"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,
32655,
15768,
50563,
368,
341,
262,
1077,
10789,
284,
1527,
87029,
27638,
13986,
6831,
1499,
9455,
38915,
15,
87,
17,
64,
2105,
1827,
15454,
543,
262,
2060,
10714,
10297,
6214,
17492,
2346,
9455,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_source_2() {
let http_server_guard = crate::test_util::http_server();
let (_temp_dir, fetcher) = test_setup();
let fetcher_1 = fetcher.clone();
let fetcher_2 = fetcher.clone();
let fetcher_3 = fetcher.clone();
let module_url =
Url::parse("http://localhost:4545... | rust_cleaned_test_functions.jsonl/16762 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1149
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11803,
10347,
62,
17,
368,
341,
262,
1077,
1758,
12015,
36796,
284,
17717,
486,
1944,
18974,
486,
1254,
12015,
543,
262,
1077,
5453,
3888,
4334,
11,
7807,
261,
8,
284,
1273,
21363,
543,
262,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_peek() {
let mut cache: Cache<usize, usize> = Cache::new(2);
cache.add(1, 1);
cache.add(2, 2);
assert_eq!(cache.peek(&1), Some(&1));
cache.add(3, 3);
assert!(!cache.contains_key(&1));
} | rust_cleaned_test_functions.jsonl/96741 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 143
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
29107,
368,
341,
286,
1077,
5206,
6500,
25,
19479,
90244,
11,
22301,
29,
284,
19479,
486,
931,
7,
17,
317,
286,
6500,
1364,
7,
16,
11,
220,
16,
317,
286,
6500,
1364,
7,
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_set_block_device() {
let mut vm_resources = default_vm_resources();
let (mut new_block_device_cfg, _file) = default_block_cfg();
let tmp_file = TempFile::new().unwrap();
new_block_device_cfg.drive_id = "block2".to_string();
new_block_device_cfg.path_on_hos... | rust_cleaned_test_functions.jsonl/5457 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 244
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
7113,
9204,
368,
341,
286,
1077,
5206,
10995,
35569,
284,
1638,
39008,
35569,
543,
286,
1077,
320,
6984,
501,
7113,
9204,
18343,
11,
716,
1192,
8,
284,
1638,
7113,
18343,
543,
286,
1077,
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_success_checksum_verify() {
let res = checksum_verify(
"sha1",
b"hello",
b"\xaa\xf4\xc6\x1d\xdc\xc5\xe8\xa2\xda\xbe\xde\x0f;H,\xd9\xae\xa9CM",
)
.unwrap();
assert!(res);
let res = checksum_verify(
"sha256",
... | rust_cleaned_test_functions.jsonl/114481 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 656
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18632,
64038,
35638,
368,
341,
286,
1077,
592,
284,
32529,
35638,
1006,
310,
330,
15247,
16,
756,
310,
293,
1,
14990,
756,
310,
293,
11934,
43300,
50612,
19,
47746,
21,
3462,
16,
67,
3462,
7628,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_navigation_push_same_screen_will_pop() {
let mut state = BrowserState::new();
let new_screen = ScreenName::Artist("some_id".to_string());
state.update_with(BrowserAction::NavigationPush(new_screen.clone()));
state.update_with(BrowserAction::NavigationPush(ScreenNa... | rust_cleaned_test_functions.jsonl/32249 | {
"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,
58051,
14218,
33574,
17649,
1670,
483,
17061,
368,
341,
286,
1077,
5206,
1584,
284,
16482,
1397,
486,
931,
543,
286,
1077,
501,
17649,
284,
13948,
675,
486,
40309,
445,
14689,
842,
3263,
983,
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,
1... | 1 |
#[test]
fn test_conv1() {
let mut candles = RandomCandles::default();
let weights = get_weights(1);
let mut ma = TestingMethod::new(weights, &candles.first().close).unwrap();
candles
.take(100)
.for_each(|x| assert_eq_float(x.close, ma.next(&x.close)));
} | rust_cleaned_test_functions.jsonl/112253 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 116
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22716,
16,
368,
341,
197,
10217,
5206,
51205,
284,
10612,
34,
20125,
486,
2258,
1428,
197,
10217,
14324,
284,
633,
21114,
7,
16,
317,
197,
10217,
5206,
7491,
284,
26768,
3523,
486,
931,
62601,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_splitnator() {
let xs = &[1, 2, 3, 4, 5];
let splits: &[&[_]] = &[&[1, 2, 3, 4, 5]];
assert_eq!(xs.splitn(1, |x| *x % 2 == 0).collect::<Vec<_>>(), splits);
let splits: &[&[_]] = &[&[1], &[3, 4, 5]];
assert_eq!(xs.splitn(2, |x| *x % 2 == 0).collect::<Vec<_>>(), splits);
l... | rust_cleaned_test_functions.jsonl/12895 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 306
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
77,
850,
368,
341,
262,
1077,
11943,
284,
44590,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
4821,
262,
1077,
40467,
25,
44590,
5,
13496,
5053,
284,
44590,
5,
58,
16,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_automatic_refund_works() {
new_test_ext().execute_with(|| {
let creator_initial_balance = 100;
let payment_amount = 20;
let expected_incentive_amount = payment_amount / INCENTIVE_PERCENTAGE as u128;
const CANCEL_PERIOD: u64 = 600;
const CANCEL_BLOCK: u64 = CANCEL_PERIOD + 1;
assert... | rust_cleaned_test_functions.jsonl/112005 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1077
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32808,
13487,
7793,
1241,
11498,
82,
368,
341,
8638,
4452,
9927,
1005,
10257,
6615,
79453,
341,
197,
10217,
19919,
15809,
29396,
284,
220,
16,
15,
15,
280,
197,
10217,
8160,
13471,
284,
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... | 2 |
#[test]
fn test_url_to_tcp_connection_info() {
let cases = vec![
(
url::Url::parse("redis://127.0.0.1").unwrap(),
ConnectionInfo {
addr: Box::new(ConnectionAddr::Tcp("127.0.0.1".to_string(), 6379)),
db: 0,
... | rust_cleaned_test_functions.jsonl/19225 | {
"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,
2903,
2346,
45562,
15866,
3109,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
2399,
394,
2515,
486,
2864,
486,
6400,
445,
21748,
1110,
16,
17,
22,
13,
15,
13,
15,
13,
16,
1827,
15454,
3148... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_rustup() {
assert(
"toolchain 'nightly' does not contain component clipy; did you mean 'clippy'?",
RustupError::UnknownComponent {
name: "nightly".to_owned(),
component: "clipy".to_owned(),
suggestion: Some("clippy".to_owned()),
},
... | rust_cleaned_test_functions.jsonl/39547 | {
"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,
1710,
590,
454,
368,
341,
262,
2060,
1006,
286,
330,
14172,
8819,
364,
9287,
398,
6,
1558,
537,
6644,
3692,
12327,
88,
26,
1521,
498,
3076,
364,
564,
45749,
6,
35718,
286,
33789,
454,
1454,
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_contiguous_sub_contiguous() {
macro_rules! test {
($a:expr, $b:expr, $c:expr, $d:expr, $expected:expr) => {
assert_eq!(
ContiguousIntegerSet::new($a, $b)
- ContiguousIntegerSet::new($c, $d),
Order... | rust_cleaned_test_functions.jsonl/21305 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 635
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10260,
27029,
5228,
10260,
27029,
368,
341,
286,
18072,
21407,
0,
1273,
341,
310,
1711,
64,
96011,
11,
400,
65,
96011,
11,
400,
66,
96011,
11,
400,
67,
96011,
11,
400,
7325,
96011,
8,
589,
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_force_checkout_locally_modified_blob() -> BitResult<()> {
BitRepo::with_minimal_repo(|repo| {
touch!(repo: "foo" < "new foo contents");
bit_checkout!(repo: --force "master")?;
// force checkout should reset the working directory
assert_eq!(cat!(repo: "foo"), "... | rust_cleaned_test_functions.jsonl/62961 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 163
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40739,
68186,
13400,
745,
37749,
45908,
368,
1464,
6495,
2077,
71698,
341,
262,
6495,
25243,
486,
4197,
7260,
2861,
37784,
22428,
23476,
91,
341,
286,
5796,
10297,
23476,
25,
330,
7975,
1,
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_74() {
assert_eq!(
Solution::search_matrix(
vec![vec![1, 3, 5, 7], vec![10, 11, 16, 20], vec![23, 30, 34, 50]],
3
),
true
);
assert_eq!(
Solution::search_matrix(
vec!... | rust_cleaned_test_functions.jsonl/121024 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 311
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
22,
19,
368,
972,
286,
2060,
10714,
0,
7805,
310,
12478,
486,
1836,
10193,
7805,
394,
7486,
20703,
4083,
20703,
16,
11,
220,
18,
11,
220,
20,
11,
220,
22,
1125,
7486,
20703,
16,
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_clock() {
let kvm = Kvm::new().unwrap();
let vm = kvm.create_vm().unwrap();
// Get current time.
let orig = vm.get_clock().unwrap();
// Reset time.
let mut fudged = kvm_clock_data::default();
fudged.clock = 10;
vm.set_clock(&fudge... | rust_cleaned_test_functions.jsonl/86837 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 262
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23062,
368,
341,
286,
1077,
94748,
284,
730,
7338,
486,
931,
1005,
15454,
543,
286,
1077,
10995,
284,
94748,
2520,
39008,
1005,
15454,
1428,
286,
442,
2126,
1482,
882,
624,
286,
1077,
2713,
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_load_store_instruction() {
let mut data = [4u8; 10];
store_current_index(&mut data, 3);
assert_eq!(load_current_index(&data), 3);
assert_eq!([4u8; 8], data[0..8]);
} | rust_cleaned_test_functions.jsonl/20345 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 113
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12411,
14809,
54923,
368,
341,
286,
1077,
5206,
821,
284,
508,
19,
84,
23,
26,
220,
16,
15,
935,
286,
3553,
11080,
3560,
2099,
6984,
821,
11,
220,
18,
317,
286,
2060,
10714,
10297,
1078,
11080... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_simplify_or_and() {
let l = col("c2").gt(lit(5));
let r = binary_expr(col("c1").lt(lit(6)), Operator::And, col("c2").gt(lit(5)));
let expr = binary_expr(l.clone(), Operator::Or, r.clone());
// no rewrites if c1 can be null
let expected = expr.cl... | rust_cleaned_test_functions.jsonl/77797 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 270
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
70206,
8734,
8378,
368,
341,
286,
1077,
326,
284,
1375,
445,
66,
17,
1827,
5178,
2333,
275,
7,
20,
1106,
286,
1077,
435,
284,
7868,
21915,
19611,
445,
66,
16,
1827,
4832,
2333,
275,
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_compile_options_set_optimization_level_size() {
let mut c = Compiler::new().unwrap();
let mut options = CompileOptions::new().unwrap();
options.set_optimization_level(OptimizationLevel::Size);
let result = c
.compile_into_spirv_assembly(
... | rust_cleaned_test_functions.jsonl/41054 | {
"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,
74170,
8743,
2602,
15032,
65964,
8274,
2368,
368,
341,
286,
1077,
5206,
272,
284,
45631,
486,
931,
1005,
15454,
543,
286,
1077,
5206,
2606,
284,
54467,
3798,
486,
931,
1005,
15454,
543,
286,
2606,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_txin_default() {
let txin = TxIn::default();
assert_eq!(txin.previous_output, OutPoint::default());
assert_eq!(txin.script_sig, Script::new());
assert_eq!(txin.sequence, 0xFFFFFFFF);
assert_eq!(txin.previous_output, OutPoint::default());
assert_eq!... | rust_cleaned_test_functions.jsonl/325 | {
"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,
17805,
258,
9993,
368,
341,
286,
1077,
9854,
258,
284,
39850,
641,
486,
2258,
543,
286,
2060,
10714,
10297,
3998,
258,
38925,
7645,
11,
4371,
2609,
486,
2258,
1423,
286,
2060,
10714,
10297,
3998,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rpc_format_user_activated_upgrades() -> Result<(), failure::Error> {
let expected_json = serde_json::json!(
[
{
"level": 28082,
"replacement_protocol": "PsYLVpVvgbLhAhoqAkMFUo6gudkJ9weNXhUYCiLDzcUpFpkk8Wt"
},
... | rust_cleaned_test_functions.jsonl/24460 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 771
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60799,
8955,
3317,
62,
30162,
8237,
22340,
368,
1464,
5714,
68843,
7901,
486,
1454,
29,
341,
286,
1077,
3601,
9455,
284,
61570,
9455,
486,
2236,
33673,
310,
2278,
1060,
341,
394,
330,
3294,
788,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_highlighting_ejs() {
let source = vec!["<div><% foo() %></div>"].join("\n");
assert_eq!(
&to_token_vector(&source, get_language("embedded-template"), &EJS_SHEET).unwrap(),
&[[
("<", vec![]),
("div", vec![Highlight::Tag]),
(">", vec![])... | rust_cleaned_test_functions.jsonl/12260 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 405
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74546,
287,
2204,
2519,
368,
341,
262,
1077,
2530,
284,
7486,
0,
1183,
27,
611,
1784,
4,
15229,
368,
1018,
1472,
611,
29,
5521,
5987,
4921,
77,
3071,
262,
2060,
10714,
33673,
286,
609,
983,
64... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_labels() {
let tail = " .";
fn wrap(s: &str) -> String {
format!(" \t {} .", s)
}
let tests = [
("{}", btreemap!()),
(r#"{name="value"}"#, btreemap!( "name" => "value")),
(r#"{name="value",}"#, btreemap!( "... | rust_cleaned_test_functions.jsonl/78093 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1067
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
14547,
368,
341,
286,
1077,
9787,
284,
330,
220,
659,
876,
286,
5168,
15061,
1141,
25,
609,
495,
8,
1464,
923,
341,
310,
3561,
17223,
220,
1124,
83,
4687,
220,
659,
497,
274,
340,
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_a2s_info_request_parse() {
const A2S_SHORT_INFO_REQUEST: &[u8] = b"\xff\xff\xff\xffT";
match GoldSrcPacket::try_from(A2S_SHORT_INFO_REQUEST) {
Ok(GoldSrcPacket::A2sInfoRequest) => {}
other => panic!("A2S_INFO_REQUEST Deserialization fail: {:?}", other),
... | rust_cleaned_test_functions.jsonl/2110 | {
"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,
4306,
17,
82,
3109,
7893,
21039,
368,
341,
286,
733,
362,
17,
50,
16456,
9068,
14454,
25,
44590,
84,
23,
60,
284,
293,
11934,
9020,
86977,
86977,
86977,
51,
3302,
286,
2432,
7421,
20360,
16679,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_decoder_valid_partial() {
let mut d = GB18030Encoding.decoder();
assert_feed_ok!(d, [], [0xa1], "");
assert_feed_ok!(d, [0xa1], [], "\u3000");
assert_feed_ok!(d, [], [0x81], "");
assert_feed_ok!(d, [], [0x30], "");
assert_feed_ok!(d, [], [0x81], ""... | rust_cleaned_test_functions.jsonl/48113 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 673
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49843,
8337,
52068,
368,
341,
286,
1077,
5206,
294,
284,
18865,
16,
23,
15,
18,
15,
14690,
74047,
543,
286,
2060,
42390,
19817,
10297,
67,
11,
10071,
508,
15,
9591,
16,
1125,
14498,
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_cmp_index_record_option() {
assert!(IndexRecordOption::WithFreqsAndPositions > IndexRecordOption::WithFreqs);
assert!(IndexRecordOption::WithFreqs > IndexRecordOption::Basic);
} | rust_cleaned_test_functions.jsonl/30039 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 83
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35193,
3560,
14192,
9672,
368,
341,
286,
2060,
10297,
1552,
6471,
5341,
486,
2354,
55096,
82,
3036,
45793,
861,
8008,
6471,
5341,
486,
2354,
55096,
82,
317,
286,
2060,
10297,
1552,
6471,
5341,
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 |
#[test]
fn test_empty_db() {
let genesis = vm_genesis::test_genesis_change_set_and_validators(Some(1));
let genesis_txn = Transaction::GenesisTransaction(WriteSetPayload::Direct(genesis.0));
let tmp_dir = TempPath::new();
let db_rw = DbReaderWriter::new(DiemDB::new_for_test(&tmp_dir));
// E... | rust_cleaned_test_functions.jsonl/112208 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 644
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
8685,
368,
341,
262,
1077,
59366,
284,
10995,
16322,
13774,
486,
1944,
16322,
13774,
15947,
2602,
8378,
8337,
2973,
65405,
7,
16,
1106,
262,
1077,
59366,
92299,
284,
17869,
486,
84652,
8070,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_client_iface() {
let mut exec = fuchsia_async::Executor::new().expect("failed to create an executor");
let test_values = test_setup(&mut exec);
// Create an empty PhyManager and IfaceManager.
let phy_manager = phy_manager::PhyManager::new(
test_va... | rust_cleaned_test_functions.jsonl/62724 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1846
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
8179,
67666,
368,
341,
286,
1077,
5206,
3883,
284,
282,
73391,
28346,
486,
25255,
486,
931,
1005,
17119,
445,
16091,
311,
1855,
458,
31558,
797,
286,
1077,
1273,
9146,
284,
1273,
21363,
2099... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_add() {
let mut w = test_writer();
let mut replica = test_replica();
let modification = Modification {
description: DescriptionMod::Set(s!("my description")),
..Default::default()
};
execute(&mut w, &mut replica, modification).unwra... | rust_cleaned_test_functions.jsonl/112134 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 331
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
368,
341,
286,
1077,
5206,
289,
284,
1273,
28908,
543,
286,
1077,
5206,
36954,
284,
1273,
25533,
15317,
543,
286,
1077,
17030,
284,
73855,
341,
310,
4008,
25,
7662,
4459,
486,
1649,
1141,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_and_default_regardless_of_default_conjunctive() {
for &default_conjunction in &[false, true] {
test_parse_query_to_logical_ast_helper(
"title:a AND title:b",
"(+Term(field=0,bytes=[97]) +Term(field=0,bytes=[98]))",
default_conju... | rust_cleaned_test_functions.jsonl/27035 | {
"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,
8378,
9993,
4920,
29820,
3575,
9993,
3382,
73,
19931,
533,
368,
341,
286,
369,
609,
2258,
3382,
72428,
304,
44590,
3849,
11,
830,
60,
341,
310,
1273,
21039,
5738,
2346,
86484,
48019,
10418,
1006,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_audio_specific_config() {
let input: BitsCtx<'_> = (&[0x12, 0x10], 0usize);
assert_matches!(
AudioSpecificConfig::parse(input),
Ok((
(&[], 0),
AudioSpecificConfig {
audio_object_type: 2,
... | rust_cleaned_test_functions.jsonl/34682 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 546
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29688,
56592,
5332,
368,
341,
1789,
286,
1077,
1946,
25,
49457,
23684,
18291,
98377,
284,
15899,
58,
15,
87,
16,
17,
11,
220,
15,
87,
16,
15,
1125,
220,
15,
51878,
626,
286,
2060,
38344,
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_mailformed_packet() {
const MAILFORMED_PACKETS: &[&[u8]] = &[
b"",
b"\xff\xff\xff",
b"\xff\xff\xff\xff",
b"\xff\xff\xff\xffZ",
];
for mailformed_packet in MAILFORMED_PACKETS {
match GoldSrcPacket::try_from(*mail... | rust_cleaned_test_functions.jsonl/2109 | {
"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,
25176,
10155,
21078,
368,
341,
286,
733,
75384,
10818,
1479,
40328,
50,
25,
44590,
5,
58,
84,
23,
5053,
284,
609,
9640,
310,
293,
39680,
310,
293,
11934,
9020,
86977,
86977,
756,
310,
293,
11934... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_eval_arith64() {
// It's nice if an operation and its arguments can fit on a single
// line in the test program.
use self::AssemblerEntry::*;
use crate::constants::*;
// Indices of marks in the assembly.
let done = 0;
let fail = 1;
... | rust_cleaned_test_functions.jsonl/45765 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1315
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
25842,
410,
21,
19,
368,
341,
286,
442,
1084,
594,
6419,
421,
458,
5666,
323,
1181,
5977,
646,
4946,
389,
264,
3175,
198,
286,
442,
1555,
304,
279,
1273,
2025,
624,
286,
990,
656,
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_that_golang_code_compiles_with_bcs() {
let config = CodeGeneratorConfig::new("main".to_string()).with_encodings(vec![Encoding::Bcs]);
test_that_golang_code_compiles_with_config(&config);
} | rust_cleaned_test_functions.jsonl/88346 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 92
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70197,
1889,
37287,
4136,
18177,
3658,
6615,
880,
4837,
368,
341,
262,
1077,
2193,
284,
6119,
12561,
2648,
486,
931,
445,
3817,
3263,
983,
3904,
6011,
4197,
13781,
58335,
25592,
20703,
14690,
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 |
#[test]
fn test_bytes_new_with() -> super::PyResult<()> {
let gil = Python::acquire_gil();
let py = gil.python();
let py_bytes = PyBytes::new_with(py, 10, |b: &mut [u8]| {
b.copy_from_slice(b"Hello Rust");
Ok(())
})?;
let bytes: &[u8] = FromPyObjec... | rust_cleaned_test_functions.jsonl/108323 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 215
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12524,
5921,
6615,
368,
1464,
2256,
486,
13828,
2077,
71698,
341,
286,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
286,
1077,
4510,
284,
342,
321,
43193,
543,
286,
1077,
4510,
125... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_schlick_small_angle() {
let glas: Box<dyn Shape + Sync> = Box::new(get_glass_sphere());
let ray = Ray {
origin: Tuple::point(0.0, 0.99, -2.0),
direction: Tuple::vector(0.0, 0.0, 1.0),
};
let mut intersections = &mut glas.intersect(&ray);
... | rust_cleaned_test_functions.jsonl/45918 | {
"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,
643,
331,
1206,
31966,
21727,
368,
341,
286,
1077,
2770,
300,
25,
8261,
92846,
22526,
488,
28937,
29,
284,
8261,
486,
931,
5433,
1889,
447,
86973,
1423,
286,
1077,
18299,
284,
13255,
341,
310,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_min_max_expr() -> Result<()> {
let funcs = vec![AggregateFunction::Min, AggregateFunction::Max];
let data_types = vec![
DataType::UInt32,
DataType::Int32,
DataType::Float32,
DataType::Float64,
DataType::Decimal(10, 2),
... | rust_cleaned_test_functions.jsonl/4584 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1225
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7260,
6345,
21915,
368,
1464,
5714,
71698,
341,
286,
1077,
76871,
284,
7486,
20703,
64580,
5152,
486,
6217,
11,
56922,
5152,
486,
5974,
935,
286,
1077,
821,
9763,
284,
7486,
90515,
310,
33172,
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... | 5 |
#[test]
fn test_clang_fprofile_instr_use() {
let args = ovec!["/c", "foo.c", "/clang:-fprofile-instr-use=somewhere.profdata", "-Fofoo.obj"];
let ParsedArguments {
extra_hash_files, ..
} = match parse_arguments(args) {
CompilerArguments::Ok(args) => args,
... | rust_cleaned_test_functions.jsonl/122768 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 224
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6794,
524,
761,
5365,
62574,
15951,
368,
341,
286,
1077,
2827,
284,
297,
4083,
0,
1183,
14,
66,
497,
330,
7975,
520,
497,
3521,
25380,
10944,
69,
5365,
3419,
495,
24673,
14149,
316,
60652,
92505... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.