From 58e7f47f1d2300e9d2044de687c8cc6ee687c47c Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Fri, 25 Aug 2017 16:40:40 -0400 Subject: [PATCH 1/2] use the proper property name in specified_values tests We used a string instead of stringify!'ing the name, whoops. --- tests/unit/stylo/specified_values.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/stylo/specified_values.rs b/tests/unit/stylo/specified_values.rs index 484f9534502..fa71afe0396 100644 --- a/tests/unit/stylo/specified_values.rs +++ b/tests/unit/stylo/specified_values.rs @@ -17,7 +17,7 @@ fn size_of_specified_values() { let size = size_of::(); let is_boxed = $boxed; if (!is_boxed && size > threshold) || (is_boxed && size <= threshold) { - bad_properties.push(("$name", size, is_boxed)); + bad_properties.push((stringify!($name), size, is_boxed)); } )+ } From 4010d9351178d6abddff1665545f82442999c29a Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Fri, 25 Aug 2017 16:42:27 -0400 Subject: [PATCH 2/2] only run stylo_tests's size_of tests on 64-bit platforms The tests are designed for this, and trying to accommodate 32-bit platforms is difficult. Size concerns due to element packing and holes are less of a problem on 32-bit platforms in any event. --- tests/unit/stylo/lib.rs | 1 + tests/unit/stylo/specified_values.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/unit/stylo/lib.rs b/tests/unit/stylo/lib.rs index 45b9d63a9fd..0b7da6ad03c 100644 --- a/tests/unit/stylo/lib.rs +++ b/tests/unit/stylo/lib.rs @@ -13,6 +13,7 @@ extern crate selectors; extern crate style_traits; mod sanity_checks; +#[cfg(target_pointer_width = "64")] mod size_of; mod specified_values; diff --git a/tests/unit/stylo/specified_values.rs b/tests/unit/stylo/specified_values.rs index fa71afe0396..d373966c41f 100644 --- a/tests/unit/stylo/specified_values.rs +++ b/tests/unit/stylo/specified_values.rs @@ -4,7 +4,7 @@ use style; -#[test] +#[cfg(all(test, target_pointer_width = "64"))] fn size_of_specified_values() { use std::mem::size_of; let threshold = 24;