mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Move sanity checks to stylo tests
This commit is contained in:
parent
c615a0dabc
commit
1d497828a7
7 changed files with 13 additions and 12 deletions
1
ports/geckolib/Cargo.lock
generated
1
ports/geckolib/Cargo.lock
generated
|
@ -401,6 +401,7 @@ version = "0.0.1"
|
|||
dependencies = [
|
||||
"app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cssparser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gecko_bindings 0.0.1",
|
||||
"style 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
]
|
||||
|
|
|
@ -25,4 +25,4 @@ style_traits = {path = "../../components/style_traits"}
|
|||
url = "1.2"
|
||||
|
||||
[dev-dependencies]
|
||||
stylo_tests = {path = "../../tests/unit/stylo"}
|
||||
stylo_tests = {path = "../../tests/unit/stylo"}
|
||||
|
|
|
@ -22,7 +22,6 @@ mod snapshot;
|
|||
mod snapshot_helpers;
|
||||
#[allow(non_snake_case)]
|
||||
pub mod glue;
|
||||
mod sanity_checks;
|
||||
mod traversal;
|
||||
mod wrapper;
|
||||
|
||||
|
|
|
@ -208,6 +208,8 @@ class MachCommands(CommandBase):
|
|||
if not packages:
|
||||
packages = set(os.listdir(path.join(self.context.topdir, "tests", "unit")))
|
||||
|
||||
packages.remove('stylo')
|
||||
|
||||
args = ["cargo", "test"]
|
||||
for crate in packages:
|
||||
args += ["-p", "%s_tests" % crate]
|
||||
|
@ -235,10 +237,7 @@ class MachCommands(CommandBase):
|
|||
@Command('test-stylo',
|
||||
description='Run stylo unit tests',
|
||||
category='testing')
|
||||
def test_unit(self, test_name=None, package=None):
|
||||
if test_name is None:
|
||||
test_name = []
|
||||
|
||||
def test_stylo(self):
|
||||
self.set_use_stable_rust()
|
||||
self.ensure_bootstrapped()
|
||||
|
||||
|
|
|
@ -12,5 +12,6 @@ doctest = false
|
|||
[dependencies]
|
||||
app_units = "0.3"
|
||||
cssparser = {version = "0.7", features = ["heap_size"]}
|
||||
gecko_bindings = {path = "../../../ports/geckolib/gecko_bindings"}
|
||||
style = {path = "../../../components/style", features = ["gecko"]}
|
||||
style_traits = {path = "../../../components/style_traits"}
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
extern crate app_units;
|
||||
extern crate cssparser;
|
||||
extern crate gecko_bindings;
|
||||
extern crate style;
|
||||
extern crate style_traits;
|
||||
|
||||
#[test]
|
||||
fn test_test() {
|
||||
// do nothing
|
||||
// this is a temporary test testing that the test runs
|
||||
}
|
||||
mod sanity_checks;
|
||||
|
|
|
@ -62,7 +62,7 @@ fn assert_basic_pseudo_elements() {
|
|||
};
|
||||
}
|
||||
|
||||
include!("../../components/style/generated/gecko_pseudo_element_helper.rs");
|
||||
include!("../../../components/style/generated/gecko_pseudo_element_helper.rs");
|
||||
|
||||
assert!(saw_before);
|
||||
assert!(saw_after);
|
Loading…
Add table
Add a link
Reference in a new issue