Skip to content

Instantly share code, notes, and snippets.

@starfys
Last active April 13, 2018 02:30
Show Gist options
  • Select an option

  • Save starfys/8f9b9b97f86dd8aeee3f30abb6f185f3 to your computer and use it in GitHub Desktop.

Select an option

Save starfys/8f9b9b97f86dd8aeee3f30abb6f185f3 to your computer and use it in GitHub Desktop.

Revisions

  1. starfys revised this gist Apr 13, 2018. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions testing.rs
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,7 @@
    /// Determines whether something is a robot
    fn is_robot(entity: Entity) -> bool {
    // TODO: Write this for real
    unimplemented!()
    }

    #[test]
  2. starfys revised this gist Apr 13, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion testing.rs
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@ fn is_robot(entity: Entity) -> bool {
    #[test]
    fn test_robot_detector() {
    assert_eq!(is_robot(Entity::SamRemedios), false);
    assert_eq!(is_robot(Entity::Cat), false);
    assert_eq!(is_robot(Entity::Roomba), true);
    assert_eq!(is_robot(Entity::Hamburger), false);
    assert_eq!(is_robot(Entity::Zuckerburg), true);
    }
  3. starfys created this gist Apr 13, 2018.
    11 changes: 11 additions & 0 deletions testing.rs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    fn is_robot(entity: Entity) -> bool {
    // TODO: Write this for real
    }

    #[test]
    fn test_robot_detector() {
    assert_eq!(is_robot(Entity::SamRemedios), false);
    assert_eq!(is_robot(Entity::Cat), false);
    assert_eq!(is_robot(Entity::Roomba), true);
    assert_eq!(is_robot(Entity::Zuckerburg), true);
    }