summaryrefslogtreecommitdiff
path: root/tests/hkl-lattice-t.c
diff options
context:
space:
mode:
authorPicca Frédéric-Emmanuel <picca@debian.org>2019-02-02 12:55:46 +0100
committerPicca Frédéric-Emmanuel <picca@debian.org>2019-02-02 12:55:46 +0100
commit30098174e89f801160dc7656642eaaf34822a1f5 (patch)
treeda8d68c1328bc641139c5724a08ca1f76e57bac5 /tests/hkl-lattice-t.c
parentb97bde539e3e5568f29ee50211f8decdea0a8aaf (diff)
parentb3cce9a78f1862dcaeeebc6784b70b3f116e583d (diff)
Update upstream source from tag 'upstream/5.0.0.2456'
Update to upstream version '5.0.0.2456' with Debian dir fdd1364b79a1292c1ac74d5d36b9b54742d56b0b
Diffstat (limited to 'tests/hkl-lattice-t.c')
-rw-r--r--tests/hkl-lattice-t.c104
1 files changed, 51 insertions, 53 deletions
diff --git a/tests/hkl-lattice-t.c b/tests/hkl-lattice-t.c
index e59a963..6705b92 100644
--- a/tests/hkl-lattice-t.c
+++ b/tests/hkl-lattice-t.c
@@ -37,7 +37,7 @@
CHECK_PARAM(_lattice, alpha, _alpha); \
CHECK_PARAM(_lattice, beta, _beta); \
CHECK_PARAM(_lattice, gamma, _gamma); \
- }while(0)
+ }while(0);
#define SET_PARAM(_lattice, _param, _value) do { \
GError *error; \
@@ -48,60 +48,58 @@
ok(TRUE == hkl_lattice_ ## _param ## _set(_lattice, p, &error), __func__); \
ok(error == NULL, __func__); \
hkl_parameter_free(p); \
- }while(0)
+ }while(0);
\
#define SET_LATTICE(_lattice, _a, _b, _c, _alpha, _beta, _gamma) do{ \
-SET_PARAM(_lattice, a, _a); \
-SET_PARAM(_lattice, b, _b); \
-SET_PARAM(_lattice, c, _c); \
-SET_PARAM(_lattice, alpha, _alpha); \
-SET_PARAM(_lattice, beta, _beta); \
-SET_PARAM(_lattice, gamma, _gamma); \
-}while(0)
-
- static void new(void)
- {
- HklLattice *lattice;
- GError *error;
-
- /* can not set this lattice */
- lattice = hkl_lattice_new(1.54, 1.54, 1.54,
- 90*HKL_DEGTORAD, 10*HKL_DEGTORAD, 120*HKL_DEGTORAD,
- NULL);
- ok(NULL == lattice, __func__);
-
- /* check GError generation */
- error = NULL;
- lattice = hkl_lattice_new(1.54, 1.54, 1.54,
- 90*HKL_DEGTORAD, 10*HKL_DEGTORAD, 120*HKL_DEGTORAD,
- &error);
- ok(NULL == lattice, __func__);
- ok(error != NULL, __func__);
- g_clear_error(&error);
-
- /* but can create this one */
- lattice = hkl_lattice_new(1.54, 1.54, 1.54,
- 90*HKL_DEGTORAD, 90*HKL_DEGTORAD, 90*HKL_DEGTORAD,
- NULL);
- ok(0 == !lattice, __func__);
-
- CHECK_LATTICE(lattice,
- 1.54, 1.54, 1.54,
- 90*HKL_DEGTORAD, 90*HKL_DEGTORAD, 90*HKL_DEGTORAD);
-
- /* but can create this one and no GError are produce */
- lattice = hkl_lattice_new(1.54, 1.54, 1.54,
- 90*HKL_DEGTORAD, 90*HKL_DEGTORAD, 90*HKL_DEGTORAD,
- &error);
- ok(0 == !lattice, __func__);
- ok(error == NULL, __func__);
-
- CHECK_LATTICE(lattice,
- 1.54, 1.54, 1.54,
- 90*HKL_DEGTORAD, 90*HKL_DEGTORAD, 90*HKL_DEGTORAD);
-
- hkl_lattice_free(lattice);
- }
+ SET_PARAM(_lattice, a, _a); \
+ SET_PARAM(_lattice, b, _b); \
+ SET_PARAM(_lattice, c, _c); \
+ SET_PARAM(_lattice, alpha, _alpha); \
+ SET_PARAM(_lattice, beta, _beta); \
+ SET_PARAM(_lattice, gamma, _gamma); \
+ }while(0);
+
+static void new(void)
+{
+ HklLattice *lattice;
+ GError *error;
+
+ /* can not set this lattice */
+ lattice = hkl_lattice_new(1.54, 1.54, 1.54,
+ 90*HKL_DEGTORAD, 10*HKL_DEGTORAD, 120*HKL_DEGTORAD,
+ NULL);
+ ok(NULL == lattice, __func__);
+
+ /* check GError generation */
+ error = NULL;
+ lattice = hkl_lattice_new(1.54, 1.54, 1.54,
+ 90*HKL_DEGTORAD, 10*HKL_DEGTORAD, 120*HKL_DEGTORAD,
+ &error);
+ ok(NULL == lattice, __func__);
+ ok(error != NULL, __func__);
+ g_clear_error(&error);
+
+ /* but can create this one */
+ lattice = hkl_lattice_new(1.54, 1.54, 1.54,
+ 90*HKL_DEGTORAD, 90*HKL_DEGTORAD, 90*HKL_DEGTORAD,
+ NULL);
+ ok(0 == !lattice, __func__);
+ CHECK_LATTICE(lattice,
+ 1.54, 1.54, 1.54,
+ 90*HKL_DEGTORAD, 90*HKL_DEGTORAD, 90*HKL_DEGTORAD);
+ hkl_lattice_free(lattice);
+
+ /* but can create this one and no GError are produce */
+ lattice = hkl_lattice_new(1.54, 1.54, 1.54,
+ 90*HKL_DEGTORAD, 90*HKL_DEGTORAD, 90*HKL_DEGTORAD,
+ &error);
+ ok(0 == !lattice, __func__);
+ ok(error == NULL, __func__);
+ CHECK_LATTICE(lattice,
+ 1.54, 1.54, 1.54,
+ 90*HKL_DEGTORAD, 90*HKL_DEGTORAD, 90*HKL_DEGTORAD);
+ hkl_lattice_free(lattice);
+}
static void new_copy(void)
{