blob: a10b006d1a51b9c41ba9b7612d30d7e8b97d7c8b [file] [log] [blame]
// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#![feature(test)]
extern crate test;
use test::Bencher;
use test_rust_static_library::add_two_ints_via_rust;
#[test]
fn test_call_into_mixed_static_library() {
assert_eq!(add_two_ints_via_rust(5, 7), 12)
}
#[allow(soft_unstable)]
#[bench]
fn test_benchmark(b: &mut Bencher) {
b.iter(|| 2 + 2);
}