Skip to content

Commit

Permalink
Started to add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pomettini committed May 30, 2019
1 parent ca7ff21 commit a3ebc04
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

.vscode/*
.DS_Store
.idea/*
12 changes: 10 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,19 @@ fn main() {

#[cfg(test)]
mod tests {
use super::*;
use assert_cmd::prelude::*;
use std::process::Command;

#[test]
fn test_file_green() {
fn test_image_raster_pixel_index_from_tile() {
assert_eq!(image_raster_pixel_index_from_tile(8, 8, 8), 1096);
}

// Add all the other tests

#[test]
fn test_functional_file_green() {
Command::cargo_bin("obscurus")
.unwrap()
.arg("gbc.sav")
Expand All @@ -155,7 +163,7 @@ mod tests {

#[test]
#[should_panic]
fn test_file_red() {
fn test_functional_file_red() {
Command::cargo_bin("obscurus")
.unwrap()
.arg("gbc.sav")
Expand Down

0 comments on commit a3ebc04

Please sign in to comment.