Skip to content

Commit ca8266e

Browse files
committed
Add test for imports
Signed-off-by: Christian Poveda <[email protected]>
1 parent 7ecc460 commit ca8266e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
use cyclonedx_bom_macros::versioned;
2+
3+
#[versioned("1.0", "2.0")]
4+
mod base {
5+
// Define `PI` for 1.0
6+
#[versioned("1.0")]
7+
pub const PI: f64 = 3.0;
8+
9+
// Import `PI` for 2.0
10+
#[versioned("2.0")]
11+
pub use std::f64::consts::PI;
12+
}
13+
14+
fn main() {
15+
assert!(v1_0::PI < v2_0::PI);
16+
}

0 commit comments

Comments
 (0)