Vendor things
This commit is contained in:
parent
5deceec006
commit
977e3c17e5
19434 changed files with 10682014 additions and 0 deletions
19
third-party/vendor/swc_common/tests/spanned_attr.rs
vendored
Normal file
19
third-party/vendor/swc_common/tests/spanned_attr.rs
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
use swc_common::{BytePos, Span, Spanned};
|
||||
|
||||
#[test]
|
||||
fn lo_hi() {
|
||||
#[derive(Spanned)]
|
||||
struct LoHi {
|
||||
#[span(lo)]
|
||||
pub lo: BytePos,
|
||||
#[span(hi)]
|
||||
pub hi: BytePos,
|
||||
}
|
||||
|
||||
let lo = BytePos(0);
|
||||
let hi = BytePos(5);
|
||||
assert_eq!(
|
||||
LoHi { lo, hi }.span(),
|
||||
Span::new(lo, hi, Default::default())
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue