mirror of
https://github.com/fluencelabs/wasmer
synced 2025-03-31 06:51:04 +00:00
Recovered deleted tests
This commit is contained in:
parent
63f1d6b7ba
commit
3b9cdc396d
@ -350,3 +350,26 @@ pub fn compiler_for_backend(backend: Backend) -> Option<Box<dyn Compiler>> {
|
|||||||
|
|
||||||
/// The current version of this crate.
|
/// The current version of this crate.
|
||||||
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
|
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod test {
|
||||||
|
use super::*;
|
||||||
|
use std::str::FromStr;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn str_repr_matches() {
|
||||||
|
// if this test breaks, think hard about why it's breaking
|
||||||
|
// can we avoid having these be different?
|
||||||
|
|
||||||
|
for &backend in &[
|
||||||
|
#[cfg(feature = "cranelift")]
|
||||||
|
Backend::Cranelift,
|
||||||
|
#[cfg(feature = "llvm")]
|
||||||
|
Backend::LLVM,
|
||||||
|
#[cfg(feature = "singlepass")]
|
||||||
|
Backend::Singlepass
|
||||||
|
] {
|
||||||
|
assert_eq!(backend, Backend::from_str(backend.to_string()).unwrap());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user