Reorganise test code

This way I don't need to differentiate between tests for generated code
and tests for hand-written code.
This commit is contained in:
Felix Krull 2019-05-21 19:28:49 +02:00 committed by Colin Walters
parent bf488d2266
commit 60960612a3
6 changed files with 15 additions and 16 deletions

View File

@ -71,6 +71,3 @@ impl hash::Hash for CollectionRef {
hash::Hash::hash(&self.hash(), state)
}
}
#[cfg(test)]
mod tests;

View File

@ -13,22 +13,25 @@ extern crate lazy_static;
use glib::Error;
// re-exports
// code generated by gir
mod auto;
pub use crate::auto::functions::*;
pub use crate::auto::*;
mod repo;
// handwritten code
#[cfg(any(feature = "v2018_6", feature = "dox"))]
mod collection_ref;
mod repo;
#[cfg(any(feature = "v2018_6", feature = "dox"))]
pub use crate::collection_ref::CollectionRef;
pub use crate::collection_ref::*;
mod object_name;
pub use crate::object_name::ObjectName;
pub use crate::object_name::*;
// public modules
// tests
#[cfg(test)]
mod tests;
// prelude
pub mod prelude {
pub use crate::auto::traits::*;
pub use crate::repo::RepoExtManual;

View File

@ -141,6 +141,3 @@ impl<O: IsA<Repo>> RepoExtManual for O {
}
}
}
#[cfg(test)]
mod tests;

View File

@ -1,4 +1,4 @@
use super::*;
use crate::CollectionRef;
use std::collections::hash_map::DefaultHasher;
use std::hash::{Hash, Hasher};

View File

@ -0,0 +1,2 @@
mod collection_ref;
mod repo;

View File

@ -1,4 +1,4 @@
use super::*;
use crate::Repo;
use crate::RepoMode;
#[test]