Skip to content
Snippets Groups Projects
Select Git revision
  • 4cb8ec44d6b0c301be4fa0f8847b25a067eeee60
  • main default protected
  • 11-flip-coin
  • 10-generics
  • 09.5-before-main-generic
  • 09-modules
  • 08-Display
  • 07-trait-derive
  • 06-trait
  • 05-unit-tests
  • 04-impl-for-board
  • 03-board-struct
  • 02-typed-squares
  • 01-simple-board
14 results

main.rs

Blame
  • main.rs 438 B
    mod board;
    
    use board::tictactoe::TicTacToe;
        
    fn main() {
        let board = TicTacToe::new();
    
        board.display();
    }
    
    // Will only be build in 'test' configuration
    #[cfg(test)]
    // A module where the tests are located, more on modules later
    mod tests {
        #[test]
        fn should_pass() {
            assert!(true);
        }
        #[test]
        #[should_panic]
        fn should_panic() {
            panic!("Doing wrong things on purpose here!");
        }
    }