mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-25 19:11:45 +03:00
Fix tests
This commit is contained in:
parent
131f223241
commit
5127dd3f95
@ -4,7 +4,7 @@ use web_sys::{DomPoint, DomPointReadOnly};
|
|||||||
|
|
||||||
#[wasm_bindgen_test]
|
#[wasm_bindgen_test]
|
||||||
fn dom_point() {
|
fn dom_point() {
|
||||||
let x = DomPoint::new(1.0, 2.0, 3.0, 4.0).unwrap();
|
let x = DomPoint::new_using_x_and_y_and_z_and_w(1.0, 2.0, 3.0, 4.0).unwrap();
|
||||||
assert_eq!(x.x(), 1.0);
|
assert_eq!(x.x(), 1.0);
|
||||||
x.set_x(1.5);
|
x.set_x(1.5);
|
||||||
assert_eq!(x.x(), 1.5);
|
assert_eq!(x.x(), 1.5);
|
||||||
@ -24,7 +24,7 @@ fn dom_point() {
|
|||||||
|
|
||||||
#[wasm_bindgen_test]
|
#[wasm_bindgen_test]
|
||||||
fn dom_point_readonly() {
|
fn dom_point_readonly() {
|
||||||
let x = DomPoint::new(1.0, 2.0, 3.0, 4.0).unwrap();
|
let x = DomPoint::new_using_x_and_y_and_z_and_w(1.0, 2.0, 3.0, 4.0).unwrap();
|
||||||
let x = DomPointReadOnly::from(JsValue::from(x));
|
let x = DomPointReadOnly::from(JsValue::from(x));
|
||||||
assert_eq!(x.x(), 1.0);
|
assert_eq!(x.x(), 1.0);
|
||||||
assert_eq!(x.y(), 2.0);
|
assert_eq!(x.y(), 2.0);
|
||||||
|
@ -3,7 +3,7 @@ use web_sys::HtmlOptionElement;
|
|||||||
|
|
||||||
#[wasm_bindgen_test]
|
#[wasm_bindgen_test]
|
||||||
fn test_option_element() {
|
fn test_option_element() {
|
||||||
let option = HtmlOptionElement::new(
|
let option = HtmlOptionElement::new_using_text_and_value_and_default_selected_and_selected(
|
||||||
"option_text",
|
"option_text",
|
||||||
"option_value",
|
"option_value",
|
||||||
false,
|
false,
|
||||||
|
@ -99,7 +99,7 @@ fn test_table_element() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
table
|
table
|
||||||
.insert_row(0)
|
.insert_row_using_index(0)
|
||||||
.expect("Failed to insert row at index 0");
|
.expect("Failed to insert row at index 0");
|
||||||
assert!(
|
assert!(
|
||||||
table.rows().length() == 1,
|
table.rows().length() == 1,
|
||||||
|
Loading…
Reference in New Issue
Block a user