source: sasview/src/sas/sascalc/simulation/geoshapespy/tests/testsphere.cc @ 033c14c

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since 033c14c was d85c194, checked in by Piotr Rozyczko <piotr.rozyczko@…>, 9 years ago

Remaining modules refactored

  • Property mode set to 100644
File size: 606 bytes
RevLine 
[aa639ea]1#include <cassert>
2#include <iostream>
3#include "sphere.h"
4#include "iq.h"
5
6using namespace std;
7
8void 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
18void TestGetShapeType() {
19  Sphere sphere;
20  assert(sphere.GetShapeType() == SPHERE);
21}
22
23void TestGetVolume() {
24  Sphere s(1);
25  cout << "volume is " << s.GetVolume();
26}
27
28int 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.