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:
parent
bf488d2266
commit
60960612a3
|
|
@ -71,6 +71,3 @@ impl hash::Hash for CollectionRef {
|
||||||
hash::Hash::hash(&self.hash(), state)
|
hash::Hash::hash(&self.hash(), state)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
mod tests;
|
|
||||||
|
|
@ -13,22 +13,25 @@ extern crate lazy_static;
|
||||||
|
|
||||||
use glib::Error;
|
use glib::Error;
|
||||||
|
|
||||||
// re-exports
|
// code generated by gir
|
||||||
mod auto;
|
mod auto;
|
||||||
pub use crate::auto::functions::*;
|
pub use crate::auto::functions::*;
|
||||||
pub use crate::auto::*;
|
pub use crate::auto::*;
|
||||||
|
|
||||||
mod repo;
|
// handwritten code
|
||||||
|
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
||||||
mod collection_ref;
|
mod collection_ref;
|
||||||
|
mod repo;
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
||||||
pub use crate::collection_ref::CollectionRef;
|
pub use crate::collection_ref::*;
|
||||||
|
|
||||||
mod object_name;
|
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 mod prelude {
|
||||||
pub use crate::auto::traits::*;
|
pub use crate::auto::traits::*;
|
||||||
pub use crate::repo::RepoExtManual;
|
pub use crate::repo::RepoExtManual;
|
||||||
|
|
|
||||||
|
|
@ -141,6 +141,3 @@ impl<O: IsA<Repo>> RepoExtManual for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
mod tests;
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
use super::*;
|
use crate::CollectionRef;
|
||||||
use std::collections::hash_map::DefaultHasher;
|
use std::collections::hash_map::DefaultHasher;
|
||||||
use std::hash::{Hash, Hasher};
|
use std::hash::{Hash, Hasher};
|
||||||
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
mod collection_ref;
|
||||||
|
mod repo;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
use super::*;
|
use crate::Repo;
|
||||||
use crate::RepoMode;
|
use crate::RepoMode;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
Loading…
Reference in New Issue