diff --git a/DDTest/src/test_surface.cc b/DDTest/src/test_surface.cc
index 29f4a2c7a78d8176c72f331c3309daaaab5b22f6..bbd645e414d3077df65df8e3888cf732b94e0adc 100644
--- a/DDTest/src/test_surface.cc
+++ b/DDTest/src/test_surface.cc
@@ -6,11 +6,10 @@
 #include "DD4hep/Detector.h"
 
 #include "DDRec/Surface.h"
-//#include "DDSurfaces/ISurface.h"
+#include "STR.h"
 
 #include <exception>
 #include <iostream>
-#include <sstream>
 #include <assert.h>
 #include <cmath>
 
@@ -23,30 +22,6 @@ using namespace DDSurfaces ;
 
 // this should be the first line in your test
 DDTest test = DDTest( "surface" ) ; 
-
-//=============================================================================
-/** Helper class for floating point comparisons using string representations */
-class STR {
-  STR() {} 
-  float _val ;
-  std::string _str ;
-public:
-  STR ( float val ) : _val( val ), _str() {
-    std::stringstream s1 ; 
-    s1 << _val ;
-    _str = s1.str() ;
-  }
-  std::string str() const { return _str ; }
-  
-  bool operator==( const STR& s2) const {
-    return this->str() == s2.str() ;
-  }
-};
-
-std::ostream& operator<<(std::ostream& os , const STR& s) {
-  os << s.str() ;
-  return os ;
-} 
 //=============================================================================
 
 int main(int argc, char** argv ){
diff --git a/DDTest/src/test_units.cc b/DDTest/src/test_units.cc
index d3cc02e544d692c3c2447d6ed85643022da43ef0..a3b81bfc1e023d84a3030e15cc7f2aa72c3d4152 100644
--- a/DDTest/src/test_units.cc
+++ b/DDTest/src/test_units.cc
@@ -2,10 +2,10 @@
 
 #include "DD4hep/LCDD.h"
 #include "DD4hep/DD4hepUnits.h"
+#include "STR.h"
 
 #include <exception>
 #include <iostream>
-#include <sstream>
 #include <assert.h>
 #include <cmath>
 
@@ -18,28 +18,6 @@ using namespace dd4hep ;
 DDTest test = DDTest( "units" ) ; 
 
 //=============================================================================
-/** Helper class for floating point comparisons using string representations */
-class STR {
-  STR() {} 
-  float _val ;
-  std::string _str ;
-public:
-  STR ( float val ) : _val(val), _str() {
-    std::stringstream s1 ; 
-    s1 << _val ;
-    _str = s1.str() ;
-  }
-  std::string str() const { return _str ; }
-  
-  bool operator==( const STR& s2) const {
-    return this->str() == s2.str() ;
-  }
-};
-
-std::ostream& operator<<(std::ostream& os , const STR& s) {
-  os << s.str() ;
-  return os ;
-} 
 //=============================================================================
 
 int main(int argc, char** argv ){