Skip to content

Commit

Permalink
Update web-sys test to only test compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Nov 9, 2018
1 parent 8ba467e commit ab9e200
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions crates/web-sys/tests/wasm/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ extern crate wasm_bindgen_futures;
extern crate wasm_bindgen_test;
extern crate web_sys;

use wasm_bindgen::{JsValue, JsCast};
use wasm_bindgen_test::*;

wasm_bindgen_test_configure!(run_in_browser);
Expand Down Expand Up @@ -60,8 +59,10 @@ pub mod indexeddb;

#[wasm_bindgen_test]
fn deref_works() {
let x = JsValue::from(3);
let x = x.unchecked_into::<web_sys::XmlHttpRequestUpload>();
let y: &web_sys::XmlHttpRequestEventTarget = &x;
drop(y);
fn _check(a: &web_sys::XmlHttpRequestUpload) {
let _x: &web_sys::XmlHttpRequestEventTarget = a;
let _x: &web_sys::EventTarget = a;
let _x: &js_sys::Object = a;
let _x: &wasm_bindgen::JsValue = a;
}
}

0 comments on commit ab9e200

Please sign in to comment.