Merge pull request #641 from schungx/master

Fix tests.
This commit is contained in:
Stephen Chung 2022-09-10 14:24:33 +08:00 committed by GitHub
commit a2f679bb07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 6 deletions

View File

@ -66,11 +66,12 @@ jobs:
toolchain: [stable] toolchain: [stable]
experimental: [false] experimental: [false]
include: include:
# smoketests for future and experimental toolchains # smoketests for different toolchains
- {toolchain: stable, os: windows-latest, experimental: false, flags: ""} - {toolchain: stable, os: windows-latest, experimental: false, flags: ""}
- {toolchain: stable, os: macos-latest, experimental: false, flags: ""} - {toolchain: stable, os: macos-latest, experimental: false, flags: ""}
- {toolchain: beta, os: ubuntu-latest, experimental: false, flags: ""} - {toolchain: beta, os: ubuntu-latest, experimental: false, flags: ""}
- {toolchain: nightly, os: ubuntu-latest, experimental: true, flags: ""} # nightly is a bit volatile
#- {toolchain: nightly, os: ubuntu-latest, experimental: true, flags: ""}
fail-fast: false fail-fast: false
steps: steps:
- name: Checkout - name: Checkout

View File

@ -1813,7 +1813,7 @@ impl Module {
) -> impl Iterator<Item = (FnNamespace, FnAccess, &str, usize)> { ) -> impl Iterator<Item = (FnNamespace, FnAccess, &str, usize)> {
self.iter_fn() self.iter_fn()
.filter(|&f| f.func.is_script()) .filter(|&f| f.func.is_script())
.map(|f| (f.namespace, f.access, f.name.as_str(), f.params)) .map(|f| (f.namespace, f.access, f.name.as_str(), f.num_params))
} }
/// _(internals)_ Get an iterator over all script-defined functions in the [`Module`]. /// _(internals)_ Get an iterator over all script-defined functions in the [`Module`].

View File

@ -378,10 +378,8 @@ fn test_closures_external() -> Result<(), Box<EvalAltResult>> {
#[test] #[test]
#[cfg(not(feature = "no_closure"))] #[cfg(not(feature = "no_closure"))]
#[cfg(not(feature = "sync"))]
fn test_closures_callback() -> Result<(), Box<EvalAltResult>> { fn test_closures_callback() -> Result<(), Box<EvalAltResult>> {
use std::cell::RefCell;
use std::rc::Rc;
type SingleNode = Rc<dyn Node>; type SingleNode = Rc<dyn Node>;
trait Node { trait Node {