Skip to content

Commit

Permalink
Remove tests from tig-algorithms.
Browse files Browse the repository at this point in the history
  • Loading branch information
FiveMovesAhead committed May 10, 2024
1 parent 7710903 commit 10ef770
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 420 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/build_algorithm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-wasi
- name: Cargo Test
if: env.SKIP_JOB != 'true'
run: cargo test -p tig-algorithms
- name: Cargo Build
if: env.SKIP_JOB != 'true'
run: >
Expand Down
3 changes: 0 additions & 3 deletions tig-algorithms/README.md

This file was deleted.

118 changes: 1 addition & 117 deletions tig-algorithms/src/knapsack/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pub mod template;
// c003_a001 placeholder
// c003_a002 placeholder
// c003_a003 placeholder
Expand Down Expand Up @@ -98,120 +99,3 @@
// c003_a098 placeholder
// c003_a099 placeholder
// c003_a100 placeholder

#[cfg(test)]
mod tests {
use super::*;
use tig_challenges::{knapsack::*, *};

#[test]
fn test_submissions() {
let difficulty = Difficulty {
num_items: 50,
better_than_baseline: 10,
};
let seed = 0;
let challenge = Challenge::generate_instance(seed, &difficulty).unwrap();

// assert!(c003_a001 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a002 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a003 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a004 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a005 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a006 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a007 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a008 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a009 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a010 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a011 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a012 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a013 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a014 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a015 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a016 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a017 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a018 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a019 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a020 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a021 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a022 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a023 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a024 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a025 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a026 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a027 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a028 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a029 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a030 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a031 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a032 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a033 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a034 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a035 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a036 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a037 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a038 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a039 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a040 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a041 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a042 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a043 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a044 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a045 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a046 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a047 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a048 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a049 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a050 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a051 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a052 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a053 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a054 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a055 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a056 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a057 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a058 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a059 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a060 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a061 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a062 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a063 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a064 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a065 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a066 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a067 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a068 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a069 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a070 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a071 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a072 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a073 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a074 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a075 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a076 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a077 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a078 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a079 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a080 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a081 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a082 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a083 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a084 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a085 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a086 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a087 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a088 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a089 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a090 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a091 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a092 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a093 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a094 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a095 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a096 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a097 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a098 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a099 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c003_a100 placeholder::solve_challenge(&challenge).is_ok());
}
}
23 changes: 2 additions & 21 deletions tig-algorithms/src/knapsack/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
//! <Optional: remove if not needed>
//!
//! # License
//! <Important: read TIG's Terms & Conditions before replacing>
//! <Optional: remove if not needed>
// TIG's UI uses the pattern `tig_challenges::<challenge_name>` to automatically detect your algorithm's challenge
Expand All @@ -23,24 +24,4 @@ pub fn solve_challenge(challenge: &Challenge) -> Result<Option<Solution>> {
Err(anyhow!("Not implemented"))
}

#[cfg(test)]
mod tests {
use super::solve_challenge;
use tig_challenges::{knapsack::*, *};

// Write any personal tests you want to run against your algorithm in this module
// All your tests must have #[ignore]
// You can run ignored tests with `cargo test -p tig-algorithms -- --include-ignored`

#[test]
#[ignore]
fn test_solve_challenge() {
let difficulty = Difficulty {
num_items: 50,
better_than_baseline: 10,
};
let seed = 0;
let challenge = Challenge::generate_instance(seed, &difficulty).unwrap();
assert!(solve_challenge(&challenge).is_ok());
}
}
// Important! Do not include any tests in this file, it will result in your submission being rejected
117 changes: 0 additions & 117 deletions tig-algorithms/src/satisfiability/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,120 +98,3 @@
// c001_a098 placeholder
// c001_a099 placeholder
// c001_a100 placeholder

#[cfg(test)]
mod tests {
use super::*;
use tig_challenges::{satisfiability::*, *};

#[test]
fn test_submissions() {
let difficulty = Difficulty {
num_variables: 50,
clauses_to_variables_percent: 300,
};
let seed = 0;
let challenge = Challenge::generate_instance(seed, &difficulty).unwrap();

// assert!(c001_a001 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a002 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a003 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a004 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a005 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a006 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a007 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a008 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a009 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a010 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a011 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a012 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a013 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a014 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a015 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a016 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a017 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a018 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a019 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a020 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a021 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a022 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a023 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a024 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a025 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a026 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a027 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a028 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a029 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a030 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a031 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a032 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a033 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a034 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a035 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a036 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a037 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a038 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a039 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a040 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a041 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a042 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a043 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a044 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a045 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a046 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a047 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a048 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a049 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a050 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a051 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a052 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a053 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a054 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a055 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a056 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a057 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a058 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a059 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a060 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a061 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a062 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a063 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a064 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a065 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a066 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a067 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a068 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a069 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a070 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a071 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a072 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a073 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a074 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a075 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a076 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a077 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a078 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a079 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a080 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a081 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a082 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a083 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a084 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a085 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a086 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a087 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a088 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a089 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a090 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a091 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a092 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a093 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a094 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a095 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a096 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a097 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a098 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a099 placeholder::solve_challenge(&challenge).is_ok());
// assert!(c001_a100 placeholder::solve_challenge(&challenge).is_ok());
}
}
23 changes: 2 additions & 21 deletions tig-algorithms/src/satisfiability/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
//! <Optional: remove if not needed>
//!
//! # License
//! <Important: read TIG's Terms & Conditions before replacing>
//! <Optional: remove if not needed>
// TIG's UI uses the pattern `tig_challenges::<challenge_name>` to automatically detect your algorithm's challenge
Expand All @@ -23,24 +24,4 @@ pub fn solve_challenge(challenge: &Challenge) -> Result<Option<Solution>> {
Err(anyhow!("Not implemented"))
}

#[cfg(test)]
mod tests {
use super::solve_challenge;
use tig_challenges::{satisfiability::*, *};

// Write any personal tests you want to run against your algorithm in this module
// All your tests must have #[ignore]
// You can run ignored tests with `cargo test -p tig-algorithms -- --include-ignored`

#[test]
#[ignore]
fn test_solve_challenge() {
let difficulty = Difficulty {
num_variables: 50,
clauses_to_variables_percent: 300,
};
let seed = 0;
let challenge = Challenge::generate_instance(seed, &difficulty).unwrap();
assert!(solve_challenge(&challenge).is_ok());
}
}
// do not include any tests in this file, it will result in your submission being rejected
Loading

0 comments on commit 10ef770

Please sign in to comment.