webidl: update enum test to unwrap constructor results

Update the enum test to match the new constructor return values
This commit is contained in:
Stephan Wolski 2018-07-11 16:17:56 -04:00 committed by GitHub
parent fac73a2ea4
commit 5520da1ef6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,8 +51,8 @@ fn top_level_enum() {
#[wasm_bindgen] #[wasm_bindgen]
pub fn test() { pub fn test() {
let circle = Shape::new(ShapeType::Circle); let circle = Shape::new(ShapeType::Circle).unwrap();
let square = Shape::new(ShapeType::Square); let square = Shape::new(ShapeType::Square).unwrap();
assert!(circle.is_circle()); assert!(circle.is_circle());
assert!(!circle.is_square()); assert!(!circle.is_square());
assert!(square.is_square()); assert!(square.is_square());