Don't throw exception in dtor
[platform/upstream/csr-framework.git] / test / test-common.h
index 6d86c39..cdec29a 100644 (file)
@@ -187,8 +187,8 @@ std::string capi_ec_to_string(int ec);
 
 void make_dir(const char *dir);
 void make_dir_assert(const char *dir);
-void copy_file(const char *src_file, const char *dest_file);
-void copy_file_assert(const char *src_file, const char *dest_file);
+void copy_file(const char *src_file, const char *dst_file);
+void copy_file_assert(const char *src_file, const char *dst_file);
 void touch_file(const char *file);
 void touch_file_assert(const char *file);
 void remove_file(const char *file);
@@ -223,9 +223,7 @@ public:
 
        ~ScopedChDir()
        {
-               if (::chdir(cdbuf) == -1)
-                       throw std::system_error(errno, std::system_category(),
-                                                                       std::string(cdbuf) + " chdir failed");
+               ::chdir(cdbuf);
        }
 
 private: