From 9750930ec13410357b13aa046c27b426dd453dff Mon Sep 17 00:00:00 2001
From: Randolf Beerwerth <r.beerwerth@fz-juelich.de>
Date: Thu, 3 Dec 2020 12:14:38 +0100
Subject: [PATCH] code beautification

---
 .../SpecularMagneticConsistencyTest.cpp       | 32 ++++++++++---------
 1 file changed, 17 insertions(+), 15 deletions(-)

diff --git a/Tests/UnitTests/Core/Legacy/SpecularMagneticConsistencyTest.cpp b/Tests/UnitTests/Core/Legacy/SpecularMagneticConsistencyTest.cpp
index ab31f1c710f..667cd2bd10f 100644
--- a/Tests/UnitTests/Core/Legacy/SpecularMagneticConsistencyTest.cpp
+++ b/Tests/UnitTests/Core/Legacy/SpecularMagneticConsistencyTest.cpp
@@ -1,30 +1,30 @@
 #include "Base/Const/Units.h"
 #include "Core/Legacy/SpecularMagneticStrategy_v2.h"
 #include "Sample/Material/MaterialFactoryFuncs.h"
-#include "Sample/Multilayer/MultiLayer.h"
 #include "Sample/Multilayer/Layer.h"
+#include "Sample/Multilayer/MultiLayer.h"
 #include "Sample/Processed/ProcessedSample.h"
 #include "Sample/RT/SimulationOptions.h"
 #include "Sample/Slice/KzComputation.h"
 #include "Sample/Specular/SpecularMagneticTanhStrategy.h"
 #include "Tests/GTestWrapper/google_test.h"
 
-class SpecularMagneticConsistencyTest : public ::testing::Test {
+class SpecularMagneticConsistencyTest : public ::testing::Test
+{
 protected:
     auto static constexpr eps = 1.e-10;
 
     std::unique_ptr<ProcessedSample> sample_1();
 
-    template<typename Strategy1, typename Strategy2>
-    void testcase(const std::vector<Slice> & slices, double k);
+    template <typename Strategy1, typename Strategy2>
+    void testcase(const std::vector<Slice>& slices, double k);
 };
 
-std::unique_ptr<ProcessedSample>
-SpecularMagneticConsistencyTest::sample_1() {
+std::unique_ptr<ProcessedSample> SpecularMagneticConsistencyTest::sample_1()
+{
     MultiLayer multi_layer_scalar;
     Material substr_material_scalar = HomogeneousMaterial("Substrate", 7e-6, 2e-8);
-    Material layer_material = HomogeneousMaterial("Layer", 3e-6, 1e-8,
-                                                  kvector_t{1.e7, 0, 1.e7});
+    Material layer_material = HomogeneousMaterial("Layer", 3e-6, 1e-8, kvector_t{1.e7, 0, 1.e7});
 
     Layer vacuum_layer(HomogeneousMaterial("Vacuum", 0.0, 0.0));
     Layer substr_layer_scalar(substr_material_scalar);
@@ -40,21 +40,23 @@ SpecularMagneticConsistencyTest::sample_1() {
     return sample_scalar;
 }
 
-template<typename Strategy1, typename Strategy2>
-void SpecularMagneticConsistencyTest::testcase(const std::vector<Slice> & slices, double k){
+template <typename Strategy1, typename Strategy2>
+void SpecularMagneticConsistencyTest::testcase(const std::vector<Slice>& slices, double k)
+{
 
     const auto kz = kvector_t{0., 0., k};
     const auto coeffs1 = std::make_unique<Strategy1>()->Execute(
-                slices, KzComputation::computeKzFromRefIndices(slices, kz));
+        slices, KzComputation::computeKzFromRefIndices(slices, kz));
     const auto coeffs2 = std::make_unique<Strategy2>()->Execute(
-                slices, KzComputation::computeKzFromRefIndices(slices, kz));
+        slices, KzComputation::computeKzFromRefIndices(slices, kz));
 
-    for(size_t i = 0; i < coeffs1.size(); ++i){
+    for (size_t i = 0; i < coeffs1.size(); ++i) {
         EXPECT_NEAR_MATRIXCOEFF(coeffs1[i], coeffs2[i], eps);
     }
 }
 
-TEST_F(SpecularMagneticConsistencyTest, z_direction){
+TEST_F(SpecularMagneticConsistencyTest, z_direction)
+{
     using Strategy1 = SpecularMagneticTanhStrategy;
     using Strategy2 = SpecularMagneticStrategy_v2;
 
@@ -63,7 +65,7 @@ TEST_F(SpecularMagneticConsistencyTest, z_direction){
 
     const std::vector<double> kzs = {1.e-9, 1.e-5, 0.1, 2.0, 10.0};
 
-    for(const auto & k : kzs){
+    for (const auto& k : kzs) {
         testcase<Strategy1, Strategy2>(slices, k);
         testcase<Strategy1, Strategy2>(slices, -k);
     }
-- 
GitLab