Skip to content

Instantly share code, notes, and snippets.

@jasongorman
Created March 26, 2019 10:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasongorman/60150296b8359b531173d7a7a73386f2 to your computer and use it in GitHub Desktop.
Save jasongorman/60150296b8359b531173d7a7a73386f2 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <string.h>
#include "carpet_quote.h"
#include "rectangular_room.h"
#include "circular_room.h"
#include "bool.h"
#include <assert.h>
void test_area(float base_dimension, Room *room){
assert(room->area(room) >= (base_dimension));
}
int main() {
test_area(2.5, new_rectangular_room(2.5, 2.5));
test_area(2.5, new_circular_room(2.5));
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment