small cleanup in testing framework

This commit is contained in:
R. Andrew Ohana
2018-06-11 18:00:33 -07:00
parent 077f50c6f2
commit 9b8c0b8fb9

View File

@@ -196,7 +196,7 @@ impl Project {
self
}
fn generate_bindings(&mut self) -> Vec<PathBuf> {
fn generate_webidl_bindings(&mut self) -> Vec<PathBuf> {
let mut res = Vec::new();
let mut origpaths = Vec::new();
@@ -319,11 +319,10 @@ impl Project {
}
fn ensure_test_entry(&mut self) {
if self
if !self
.files
.iter()
.find(|(path, _)| path == "test.ts" || path == "test.js")
.is_none()
.any(|(path, _)| path == "test.ts" || path == "test.js")
{
self.files.push((
"test.ts".to_string(),
@@ -335,8 +334,8 @@ impl Project {
fn build(&mut self) -> (PathBuf, PathBuf) {
self.ensure_test_entry();
let modules = self.generate_bindings();
self.generate_js_entry(modules);
let webidl_modules = self.generate_webidl_bindings();
self.generate_js_entry(webidl_modules);
let mut manifest = format!(
r#"