Last change
on this file since 1b9a367 was
d85c194,
checked in by Piotr Rozyczko <piotr.rozyczko@…>, 9 years ago
|
Remaining modules refactored
|
-
Property mode set to
100644
|
File size:
606 bytes
|
Rev | Line | |
---|
[aa639ea] | 1 | #include <cassert> |
---|
| 2 | #include <iostream> |
---|
| 3 | #include "sphere.h" |
---|
| 4 | #include "iq.h" |
---|
| 5 | |
---|
| 6 | using namespace std; |
---|
| 7 | |
---|
| 8 | void TestGetAnalyticalIQ() { |
---|
| 9 | Sphere sphere(1.0); |
---|
| 10 | |
---|
| 11 | IQ iq1(10,0.001, 0.3); |
---|
| 12 | sphere.GetFormFactor(&iq1); |
---|
| 13 | |
---|
| 14 | for (int i = 0; i< iq1.iq_data.dim1(); i++) |
---|
| 15 | cout << iq1.iq_data[i][0]<< " " << iq1.iq_data[i][1] <<endl; |
---|
| 16 | } |
---|
| 17 | |
---|
| 18 | void TestGetShapeType() { |
---|
| 19 | Sphere sphere; |
---|
| 20 | assert(sphere.GetShapeType() == SPHERE); |
---|
| 21 | } |
---|
| 22 | |
---|
| 23 | void TestGetVolume() { |
---|
| 24 | Sphere s(1); |
---|
| 25 | cout << "volume is " << s.GetVolume(); |
---|
| 26 | } |
---|
| 27 | |
---|
| 28 | int main(){ |
---|
| 29 | TestGetAnalyticalIQ(); |
---|
| 30 | TestGetShapeType(); |
---|
| 31 | TestGetVolume(); |
---|
| 32 | |
---|
| 33 | printf("PASS.\n"); |
---|
| 34 | |
---|
| 35 | return 0; |
---|
| 36 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.