Skip to content
Permalink
Browse files

[tests] update the tests on robot scheduling.

  • Loading branch information...
ptal committed May 24, 2018
1 parent 34d223d commit b4dafbb6d093b098363f9f93162b2f344788bc46
Showing with 12 additions and 25 deletions.
  1. +3 −0 example/Cargo.toml
  2. +7 −6 example/src/main.rs
  3. +1 −4 example/src/robot.rs
  4. +1 −15 example/src/robot2.rs
@@ -11,3 +11,6 @@ license = "Apache-2.0"
intervallum = "^1.0.0"
gcollections = "^1.0.0"
pcp = { path = "../" }

[features]
nightly = []
@@ -15,14 +15,16 @@
// This example example of PCP use.
//
// to run all example : cargo run.
// to test : cargo test -- --nocapture
// to bench: cargo bench
// to test : cargo test --features="nightly" -- --nocapture
// to bench: cargo bench --features="nightly"

#![cfg_attr(feature = "nightly", feature(test))]

#![feature(test, box_syntax)]
extern crate pcp;
extern crate interval;
extern crate gcollections;
extern crate test;

#[cfg(feature = "nightly")] extern crate test;

mod nqueens;
mod robot;
@@ -31,9 +33,8 @@ mod robot2;

use nqueens::nqueens;


fn main() {
// nqueens(100);
nqueens(8);
// let robot = robot::RobotScheduling::new(3, 500).solve();
// println!("{}", robot);

@@ -37,11 +37,8 @@
// * Pipeting unit use by Loading and Put operations
// * Mixing unit use by Take and Put operations


#![allow(unused_variables, non_snake_case, dead_code)]

extern crate test;

//use env_logger;
use pcp::kernel::*;
use pcp::propagators::*;
@@ -55,7 +52,6 @@ use interval::interval_set::*;
use interval::ops::Range;
use gcollections::ops::*;
use pcp::term::*;
use pcp::term::ops::*;
use pcp::propagators::cumulative::Cumulative;
use pcp::model::*;
use pcp::concept::*;
@@ -228,6 +224,7 @@ impl Display for RobotScheduling
}

#[cfg(test)]
#[cfg(feature = "nightly")]
mod tests {
use super::*;
use test::Bencher;
@@ -40,22 +40,19 @@

#![allow(unused_variables, non_snake_case, dead_code)]

extern crate test;

//use env_logger;
use pcp::kernel::*;
use pcp::propagators::*;
use pcp::search::*;
use pcp::search::branching::*;
use pcp::search::engine::one_solution::*;
use pcp::search::debugger::*;
// use pcp::search::debugger::*;
use pcp::search::propagation::*;
use gcollections::VectorStack;
use interval::interval_set::*;
use interval::ops::Range;
use gcollections::ops::*;
use pcp::term::*;
use pcp::term::ops::*;
use pcp::propagators::cumulative::Cumulative;
use pcp::model::*;
use pcp::concept::*;
@@ -359,14 +356,3 @@ impl Display for RobotScheduling
Ok(())
}
}

#[cfg(test)]
mod tests {
use super::*;
use test::Bencher;

// #[bench]
// fn bench_schedule_2(b: &mut Bencher) {
// b.iter(|| RobotScheduling::new(2, 500).solve());
// }
}

0 comments on commit b4dafbb

Please sign in to comment.
You can’t perform that action at this time.