mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-12 20:16:49 +00:00
Coverage test for allowing coverage in a #![no_core]
crate
This commit is contained in:
parent
972663d8ec
commit
6798ecaf10
9
tests/coverage/no-core.cov-map
Normal file
9
tests/coverage/no-core.cov-map
Normal file
@ -0,0 +1,9 @@
|
||||
Function name: no_core::main
|
||||
Raw bytes (9): 0x[01, 01, 00, 01, 01, 0c, 01, 00, 0d]
|
||||
Number of files: 1
|
||||
- file 0 => global file 1
|
||||
Number of expressions: 0
|
||||
Number of file 0 mappings: 1
|
||||
- Code(Counter(0)) at (prev + 12, 1) to (start + 0, 13)
|
||||
Highest counter ID seen: c0
|
||||
|
13
tests/coverage/no-core.coverage
Normal file
13
tests/coverage/no-core.coverage
Normal file
@ -0,0 +1,13 @@
|
||||
LL| |#![feature(no_core)]
|
||||
LL| |#![no_core]
|
||||
LL| |//@ edition: 2021
|
||||
LL| |
|
||||
LL| |// Test that coverage instrumentation works for `#![no_core]` crates.
|
||||
LL| |
|
||||
LL| |// For this test, we pull in std anyway, to avoid having to set up our own
|
||||
LL| |// no-core or no-std environment. What's important is that the compiler allows
|
||||
LL| |// coverage for a crate with the `#![no_core]` annotation.
|
||||
LL| |extern crate std;
|
||||
LL| |
|
||||
LL| 1|fn main() {}
|
||||
|
12
tests/coverage/no-core.rs
Normal file
12
tests/coverage/no-core.rs
Normal file
@ -0,0 +1,12 @@
|
||||
#![feature(no_core)]
|
||||
#![no_core]
|
||||
//@ edition: 2021
|
||||
|
||||
// Test that coverage instrumentation works for `#![no_core]` crates.
|
||||
|
||||
// For this test, we pull in std anyway, to avoid having to set up our own
|
||||
// no-core or no-std environment. What's important is that the compiler allows
|
||||
// coverage for a crate with the `#![no_core]` annotation.
|
||||
extern crate std;
|
||||
|
||||
fn main() {}
|
Loading…
Reference in New Issue
Block a user