-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #35 - autumnai:develop, r=MichaelHirn
Improving tests and docs
- Loading branch information
Showing
10 changed files
with
141 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,25 @@ | ||
extern crate leaf; | ||
extern crate phloem; | ||
extern crate collenchyma as co; | ||
|
||
#[cfg(test)] | ||
mod network_spec { | ||
use std::rc::Rc; | ||
use co::backend::{Backend, BackendConfig}; | ||
use co::framework::IFramework; | ||
use co::frameworks::Native; | ||
use leaf::network::*; | ||
|
||
fn backend() -> Rc<Backend<Native>> { | ||
let framework = Native::new(); | ||
let hardwares = framework.hardwares(); | ||
let backend_config = BackendConfig::new(framework, hardwares); | ||
Rc::new(Backend::new(backend_config).unwrap()) | ||
} | ||
|
||
#[test] | ||
fn new_layer() { | ||
let cfg = NetworkConfig::default(); | ||
Network::from_config(&cfg); | ||
Network::from_config(backend(), &cfg); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters