• R/O
  • SSH
  • HTTPS

iris-fmw: Commit


Commit MetaInfo

Revision251 (tree)
Time2011-12-22 18:56:57
Authorshirayanagi

Log Message

iutest v0.11.1.0
ビルドエラー修正
ファイル処理周りを修正

Change Summary

Incremental Difference

--- trunk/framework/sample/Windows/unittest/src/nacl_test/iutest/main.cpp (revision 250)
+++ trunk/framework/sample/Windows/unittest/src/nacl_test/iutest/main.cpp (revision 251)
@@ -457,7 +457,7 @@
457457
458458 #endif
459459
460-#if defined(_IUTEST_OS_WINDOWS)
460+#if defined(IUTEST_OS_WINDOWS)
461461
462462 IUTEST(TestHResult, True)
463463 {
@@ -511,7 +511,7 @@
511511 IUTEST_FAIL() << "add messages.\n";
512512 }
513513
514-#if defined(_IUTEST_OS_WINDOWS)
514+#if defined(IUTEST_OS_WINDOWS)
515515
516516 IUTEST(TestFailure, HRESULT)
517517 {
--- trunk/framework/src/fnd/phase/FndPhaseFactory.h (revision 250)
+++ trunk/framework/src/fnd/phase/FndPhaseFactory.h (revision 251)
@@ -19,7 +19,7 @@
1919
2020 //======================================================================
2121 // include
22-#include "../container/FndRedBlackTree.h"
22+#include "../container/tree/FndRedBlackTree.h"
2323 #include "FndPhase.h"
2424
2525 namespace iris {
--- trunk/framework/testsuite/iutest/include/iutest_ver.h (revision 250)
+++ trunk/framework/testsuite/iutest/include/iutest_ver.h (revision 251)
@@ -25,11 +25,11 @@
2525
2626 //======================================================================
2727 // define
28-#define IUTEST_VER 0x00110001 //!< iutest version 0.11.0,1
28+#define IUTEST_VER 0x00110100 //!< iutest version 0.11.1.0
2929 #define IUTEST_MAJORVER 0x00
3030 #define IUTEST_MINORVER 0x11
31-#define IUTEST_BUILD 0x00
32-#define IUTEST_REVISION 0x01
31+#define IUTEST_BUILD 0x01
32+#define IUTEST_REVISION 0x00
3333
3434 } // end of namespace iutest
3535
--- trunk/framework/testsuite/iutest/include/listener/iutest_default_xml_generator.h (revision 250)
+++ trunk/framework/testsuite/iutest/include/listener/iutest_default_xml_generator.h (revision 251)
@@ -41,9 +41,10 @@
4141 class iuDefaultXmlGeneratorListener : public EmptyTestEventListener
4242 {
4343 std::string m_output_path;
44- IUTEST_FILE m_file;
44+ IFile* m_fp;
4545 public:
4646 iuDefaultXmlGeneratorListener(const char* path=NULL)
47+ : m_fp(NULL)
4748 {
4849 SetFilePath(path);
4950 }
@@ -71,7 +72,10 @@
7172 virtual void OnTestProgramStart(const UnitTest& test)
7273 {
7374 IUTEST_UNUSED_VAR(test);
74- if( !m_file.Open(m_output_path.c_str(), IFile::OpenWrite) )
75+ m_fp = detail::IFileSystem::New();
76+ if( m_fp == NULL ) return;
77+
78+ if( !m_fp->Open(m_output_path.c_str(), IFile::OpenWrite) )
7579 {
7680 fprintf(stderr, "Unable to open file \"%s\".\n", m_output_path.c_str());
7781 fflush(stderr);
@@ -83,80 +87,85 @@
8387 //}
8488 virtual void OnTestProgramEnd(const UnitTest& test)
8589 {
86- m_file.Printf("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
87- m_file.Printf("<testsuites tests=\"%d\" failures=\"%d\" disabled=\"%d\" "
90+ if( m_fp == NULL ) return;
91+
92+ m_fp->Printf("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
93+ m_fp->Printf("<testsuites tests=\"%d\" failures=\"%d\" disabled=\"%d\" "
8894 "errors=\"0\" time=\"%s\" "
8995 , test.total_test_count()
9096 , test.failure_test_count()
9197 , test.disable_test_count()
9298 , detail::FormatTimeInMillisecAsSecond(test.elapsed_time()).c_str() );
93- m_file.Printf("name=\"AllTests\">\n");
99+ m_fp->Printf("name=\"AllTests\">\n");
94100
95101 for( int i=0, count=test.total_test_case_count(); i < count; ++i )
96102 {
97- OnReportTestCase(*test.GetTestCase(i));
103+ OnReportTestCase(m_fp, *test.GetTestCase(i));
98104 }
99- m_file.Printf("</testsuites>\n");
100- m_file.Close();
105+ m_fp->Printf("</testsuites>\n");
106+ m_fp->Close();
107+
108+ detail::IFileSystem::Free(m_fp);
109+ m_fp = NULL;
101110 }
102111
103112 private:
104- void OnReportTestCase(const TestCase& test_case)
113+ static void OnReportTestCase(IFile* file, const TestCase& test_case)
105114 {
106- m_file.Printf(" <testsuite name=\"%s\" tests=\"%d\" failures=\"%d\" disabled=\"%d\" "
115+ file->Printf(" <testsuite name=\"%s\" tests=\"%d\" failures=\"%d\" disabled=\"%d\" "
107116 , EscapeXmlAttribute(test_case.test_case_name()).c_str()
108117 , test_case.total_test_count()
109118 , test_case.failure_test_count()
110119 , test_case.disable_test_count()
111120 );
112- m_file.Printf("errors=\"0\" time=\"%s\">\n"
121+ file->Printf("errors=\"0\" time=\"%s\">\n"
113122 , detail::FormatTimeInMillisecAsSecond(test_case.elapsed_time()).c_str()
114123 );
115124
116125 for( int i=0, count=test_case.total_test_count(); i < count; ++i )
117126 {
118- OnReportTestInfo(*test_case.GetTestInfo(i));
127+ OnReportTestInfo(file, *test_case.GetTestInfo(i));
119128 }
120- m_file.Printf(" </testsuite>\n");
129+ file->Printf(" </testsuite>\n");
121130 }
122- void OnReportTestInfo(const TestInfo& test_info)
131+ static void OnReportTestInfo(IFile* file, const TestInfo& test_info)
123132 {
124- m_file.Printf(" <testcase name=\"%s\" ", EscapeXmlAttribute(test_info.name()).c_str() );
133+ file->Printf(" <testcase name=\"%s\" ", EscapeXmlAttribute(test_info.name()).c_str() );
125134 if( test_info.should_run() )
126- m_file.Printf("status=\"run\" ");
135+ file->Printf("status=\"run\" ");
127136 else
128- m_file.Printf("status=\"notrun\" ");
129- m_file.Printf("time=\"%s\" "
137+ file->Printf("status=\"notrun\" ");
138+ file->Printf("time=\"%s\" "
130139 , detail::FormatTimeInMillisecAsSecond(test_info.elapsed_time()).c_str()
131140 );
132- m_file.Printf("classname=\"%s\""
141+ file->Printf("classname=\"%s\""
133142 , EscapeXmlAttribute(test_info.test_case_name()).c_str() );
134143
135144 if( test_info.HasFailure() )
136145 {
137- m_file.Printf(">\n");
146+ file->Printf(">\n");
138147 for( int i=0, count=test_info.result()->total_part_count(); i < count; ++i )
139148 {
140149 const TestPartResult& part = test_info.result()->GetTestPartResult(i);
141150
142- m_file.Printf(" <failure message=\"");
143- m_file.Printf(EscapeXmlAttribute(part.summary()).c_str());
144- m_file.Printf("\" type=\"\">");
151+ file->Printf(" <failure message=\"");
152+ file->Printf(EscapeXmlAttribute(part.summary()).c_str());
153+ file->Printf("\" type=\"\">");
145154 std::string message = detail::FormatCompilerIndependentFileLocation(part.file_name(), part.line_number());
146155 message += "\n";
147156 message += part.summary();
148- OutputXmlCDataSection(&m_file, message.c_str());
149- m_file.Printf("\n </failure>\n");
157+ OutputXmlCDataSection(file, message.c_str());
158+ file->Printf("\n </failure>\n");
150159 }
151- m_file.Printf(" </testcase>\n");
160+ file->Printf(" </testcase>\n");
152161 }
153162 else
154163 {
155- m_file.Printf(" />\n");
164+ file->Printf(" />\n");
156165 }
157166 }
158167 private:
159- void OutputXmlCDataSection(IFile* file, const char* data)
168+ static void OutputXmlCDataSection(IFile* file, const char* data)
160169 {
161170 file->Printf("<![CDATA[");
162171 file->Printf(data);
--- trunk/framework/testsuite/iutest/include/iutest_printers.h (revision 250)
+++ trunk/framework/testsuite/iutest/include/iutest_printers.h (revision 251)
@@ -28,7 +28,10 @@
2828 //======================================================================
2929 // declare
3030 template<typename T>
31-static std::string PrintToString(const T& v);
31+#if !defined(__MWERKS__)
32+static
33+#endif
34+std::string PrintToString(const T& v);
3235
3336 namespace detail
3437 {
@@ -36,52 +39,25 @@
3639 //======================================================================
3740 // declare
3841 template<typename T>class iuUniversalPrinter;
42+#if defined(__MWERKS__)
43+template<typename T>void PrintTo(const T& value, std::ostream* os);
44+template<typename T>void DefaultPrintTo(IsContainerHelper::yes_t
45+ , false_type
46+ , const T& container, std::ostream* os);
47+template<typename T>void DefaultPrintTo(IsContainerHelper::no_t
48+ , false_type
49+ , const T& value, std::ostream* os);
50+template<typename T>void DefaultPrintTo(IsContainerHelper::no_t
51+ , true_type
52+ , T* ptr, std::ostream* os);
53+template<typename T>
54+void UniversalPrint(const T& value, std::ostream* os);
55+#endif
3956
4057 //======================================================================
4158 // function
42-/**
43- * @brief 文字列変換関数
44-*/
45-template<typename T>
46-inline void PrintTo(const T& value, std::ostream* os) { DefaultPrintTo(IsContainerHelper::IsContainer<T>(0), is_pointer<T>(), value, os); }
47-inline void PrintTo(bool b, std::ostream* os) { *os << (b ? "true" : "false"); }
48-inline void PrintTo(const char* c, std::ostream* os) { *os << c; }
49-inline void PrintTo(char* c, std::ostream* os) { *os << c; }
50-inline void PrintTo(std::string& str, std::ostream* os) { *os << str.c_str(); }
51-template<typename T1, typename T2>
52-inline void PrintTo(const std::pair<T1, T2>& value, std::ostream* os)
53-{
54- *os << "(";
55- iuUniversalPrinter<T1>::Print(value.first, os);
56- *os << ", ";
57- iuUniversalPrinter<T2>::Print(value.second, os);
58- *os << ")";
59-}
6059
61-//======================================================================
62-// class
6360 template<typename T>
64-class iuUniversalPrinter
65-{
66-public:
67- static void Print(const T& value, std::ostream* os)
68- {
69- PrintTo(value, os);
70- }
71-};
72-template<typename T, size_t SIZE>
73-class iuUniversalPrinter<T[SIZE]>
74-{
75-public:
76- static void Print(const T (&a)[SIZE], std::ostream* os)
77- {
78- UniversalPrintArray(a, SIZE, os);
79- }
80-};
81-
82-//======================================================================
83-// function
84-template<typename T>
8561 static void UniversalPrint(const T& value, std::ostream* os)
8662 {
8763 iuUniversalPrinter<T>::Print(value, os);
@@ -148,7 +124,50 @@
148124 }
149125 }
150126
127+/**
128+ * @brief 文字列変換関数
129+*/
151130 template<typename T>
131+inline void PrintTo(const T& value, std::ostream* os) { DefaultPrintTo(IsContainerHelper::IsContainer<T>(0), is_pointer<T>(), value, os); }
132+inline void PrintTo(bool b, std::ostream* os) { *os << (b ? "true" : "false"); }
133+inline void PrintTo(const char* c, std::ostream* os) { *os << c; }
134+inline void PrintTo(char* c, std::ostream* os) { *os << c; }
135+inline void PrintTo(std::string& str, std::ostream* os) { *os << str.c_str(); }
136+template<typename T1, typename T2>
137+inline void PrintTo(const std::pair<T1, T2>& value, std::ostream* os)
138+{
139+ *os << "(";
140+ iuUniversalPrinter<T1>::Print(value.first, os);
141+ *os << ", ";
142+ iuUniversalPrinter<T2>::Print(value.second, os);
143+ *os << ")";
144+}
145+
146+//======================================================================
147+// class
148+template<typename T>
149+class iuUniversalPrinter
150+{
151+public:
152+ static void Print(const T& value, std::ostream* os)
153+ {
154+ PrintTo(value, os);
155+ }
156+};
157+template<typename T, size_t SIZE>
158+class iuUniversalPrinter<T[SIZE]>
159+{
160+public:
161+ static void Print(const T (&a)[SIZE], std::ostream* os)
162+ {
163+ UniversalPrintArray(a, SIZE, os);
164+ }
165+};
166+
167+//======================================================================
168+// function
169+
170+template<typename T>
152171 static void IUTEST_ATTRIBUTE_UNUSED UniversalTersePrint(const T& value, std::ostream* os)
153172 {
154173 UniversalPrint(value, os);
--- trunk/framework/testsuite/iutest/include/iutest_assertion.h (revision 250)
+++ trunk/framework/testsuite/iutest/include/iutest_assertion.h (revision 251)
@@ -157,6 +157,17 @@
157157 AssertionHelper::msg_list AssertionHelper::List<T>::s_scoped_message;
158158
159159 //======================================================================
160+// declare
161+#if defined(__MWERKS__)
162+template<typename T1, typename T2>
163+std::string FormatForComparisonFailureMessage(const T1& value, const T2& /*other_operand*/);
164+template<typename T1, typename T2>
165+AssertionResult CompareHelperEQ(const char* expected_str, const char* actual_str
166+ , const T1& expected, const T2& actual);
167+
168+#endif
169+
170+//======================================================================
160171 // function
161172 /**
162173 * @brief テスト成功を示す AssertionResult オブジェクトの取得
@@ -176,7 +187,17 @@
176187 return PrintToString(value);
177188 }
178189
190+#if defined(__MWERKS__)
191+# define COMPARE_HELPER_DECLARE(op_name) \
192+ template<typename T1, typename T2> \
193+ AssertionResult CompareHelper##op_name(const char* expr1, const char* expr2, const T1& val1, const T2& val2);
194+
195+#else
196+# define COMPARE_HELPER_DECLARE(op_name)
197+#endif
198+
179199 #define COMPARE_HELPER(op_name, op) \
200+ COMPARE_HELPER_DECLARE(op_name) \
180201 template<typename T1, typename T2> \
181202 static AssertionResult IUTEST_ATTRIBUTE_UNUSED CompareHelper##op_name(const char* expr1, const char* expr2 \
182203 , const T1& val1, const T2& val2) { \
@@ -210,6 +231,7 @@
210231 , const T1& expected, const T2& actual)
211232 {
212233 IUTEST_UNUSED_VAR(actual_str);
234+
213235 #ifdef _MSC_VER
214236 #pragma warning(push)
215237 #pragma warning(disable:4389)
--- trunk/framework/testsuite/iutest/include/iutest_case.h (revision 250)
+++ trunk/framework/testsuite/iutest/include/iutest_case.h (revision 251)
@@ -251,7 +251,7 @@
251251 virtual std::string testcase_header_string(void) const
252252 {
253253 std::string str = test_case_name();
254-#if defined(IUTEST_ENABLE_RTTI)
254+#if IUTEST_ENABLE_RTTI
255255 str += ", where TypeParam = ";
256256 str += typeid(TypeParam).name();
257257 #endif
--- trunk/framework/testsuite/iutest/include/iutest_result.h (revision 250)
+++ trunk/framework/testsuite/iutest/include/iutest_result.h (revision 251)
@@ -120,7 +120,7 @@
120120 * @brief 結果の数を取得
121121 * @return 結果の数
122122 */
123- int total_part_count(void) const { return m_test_part_results.size(); }
123+ int total_part_count(void) const { return static_cast<int>(m_test_part_results.size()); }
124124
125125 /**
126126 * @brief テスト結果の取得
--- trunk/framework/testsuite/iutest/include/iutest.h (revision 250)
+++ trunk/framework/testsuite/iutest/include/iutest.h (revision 251)
@@ -37,8 +37,9 @@
3737 #define IUTEST_NOT_SUPPORT_STLSTREAM
3838 // using strstream
3939 #define IUTEST_USING_STRSTREAM
40-// file class
41-#define IUTEST_FILE
40+
41+// stdio file
42+#define IUTEST_NOT_SUPPORT_STDFILE
4243 // not supported time function
4344 #define IUTEST_NOT_SUPPORT_CTIME
4445 #endif
--- trunk/framework/testsuite/iutest/include/iutest_defs.h (revision 250)
+++ trunk/framework/testsuite/iutest/include/iutest_defs.h (revision 251)
@@ -54,6 +54,8 @@
5454 #include "internal/iutest_debug.h"
5555 #endif
5656
57+#include "internal/iutest_compiler.h"
58+
5759 // rtti
5860 #if defined(_MSC_VER)
5961 # ifdef _CPPRTTI
--- trunk/framework/testsuite/iutest/include/iutest_core.h (revision 250)
+++ trunk/framework/testsuite/iutest/include/iutest_core.h (revision 251)
@@ -21,6 +21,7 @@
2121 // include
2222 #include "internal/iutest_runner.h"
2323 #include "internal/iutest_params_util.h"
24+#include "internal/iutest_file.h"
2425
2526 namespace iutest
2627 {
@@ -260,6 +261,18 @@
260261 void Initialize(void)
261262 {
262263 m_param_testcase_holder.RegisterTests();
264+
265+ // ファイルシステムの初期化
266+ if( detail::IFileSystem::GetInstance() == NULL )
267+ {
268+#if defined(IUTEST_FILE)
269+ static FileSystem<IUTEST_FILE> filesystem;
270+ filesystem.Initialize();
271+#elif !defined(IUTEST_NOT_SUPPORT_STDFILE)
272+ static FileSystem<StdioFile> filesystem;
273+ filesystem.Initialize();
274+#endif
275+ }
263276 }
264277
265278 public:
--- trunk/framework/testsuite/iutest/include/internal/iutest_charcode.h (revision 250)
+++ trunk/framework/testsuite/iutest/include/internal/iutest_charcode.h (revision 251)
@@ -114,7 +114,7 @@
114114 static std::string WideStringToUTF8(const wchar_t* str, int num=-1)
115115 {
116116 if( num == -1 )
117- num = wcslen(str);
117+ num = static_cast<int>(wcslen(str));
118118 iuStringStream::type ss;
119119 for(int i=0; i < num; ++i )
120120 {
--- trunk/framework/testsuite/iutest/include/internal/iutest_compiler.h (revision 250)
+++ trunk/framework/testsuite/iutest/include/internal/iutest_compiler.h (revision 251)
@@ -23,4 +23,21 @@
2323 //======================================================================
2424 // define
2525
26+// constexpr
27+#if defined(__GNUC__)
28+# if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6))
29+# define IUTEST_NO_CONSTEXPR
30+# endif
2631 #endif
32+
33+#if defined(_MSC_VER)
34+# define IUTEST_NO_CONSTEXPR
35+#endif
36+
37+#ifdef IUTEST_NO_CONSTEXPR
38+# ifndef constexpr
39+# define constexpr const
40+# endif
41+#endif
42+
43+#endif
--- trunk/framework/testsuite/iutest/include/internal/iutest_list.h (revision 250)
+++ trunk/framework/testsuite/iutest/include/internal/iutest_list.h (revision 251)
@@ -79,9 +79,25 @@
7979
8080 _Myt operator + (int n)
8181 {
82+ if( n == 0 ) return *this;
83+ if( n > 0 )
84+ {
85+ return this->operator +(static_cast<unsigned int>(n));
86+ }
8287 _Myt ret(*this);
88+ n = -n;
8389 for( int i=0; i < n && ret.m_node != NULL; ++i )
8490 {
91+ ret.m_node = ret.m_node->prev;
92+ }
93+ return ret;
94+ }
95+
96+ _Myt operator + (unsigned int n)
97+ {
98+ _Myt ret(*this);
99+ for( unsigned int i=0; i < n && ret.m_node != NULL; ++i )
100+ {
85101 ret.m_node = ret.m_node->next;
86102 }
87103 return ret;
@@ -108,7 +124,7 @@
108124
109125 public:
110126 // リストの総数取得
111- int count(void) const
127+ unsigned int count(void) const
112128 {
113129 int cnt = 0;
114130 node_ptr cur = m_node;
@@ -206,7 +222,7 @@
206222 template<typename F>
207223 void shuffle(F& r)
208224 {
209- for( int i=2, n=count(); i<n; ++i )
225+ for( unsigned int i=2, n=count(); i<n; ++i )
210226 {
211227 swap(begin() + (i-2), begin() + r(i) % i );
212228 }
--- trunk/framework/testsuite/iutest/include/internal/iutest_util.h (revision 250)
+++ trunk/framework/testsuite/iutest/include/internal/iutest_util.h (revision 251)
@@ -34,7 +34,7 @@
3434 #ifdef __INTEL_COMPILER
3535 # define IUTEST_AMBIGUOUS_ELSE_BLOCKER
3636 #else
37-# define IUTEST_AMBIGUOUS_ELSE_BLOCKER switch(0) case 0: default:
37+# define IUTEST_AMBIGUOUS_ELSE_BLOCKER switch(iutest::detail::AlwaysZero()) case 0: default:
3838 #endif
3939
4040 #define IUTEST_SUPPRESS_UNREACHABLE_CODE_WARNING(statement) if( iutest::detail::AlwaysTrue() ) statement
@@ -257,6 +257,11 @@
257257 inline bool AlwaysFalse(void) { return !AlwaysTrue(); }
258258
259259 /**
260+ * @brief 0 を返す(警告対策用)
261+*/
262+inline int AlwaysZero(void) { return 0; }
263+
264+/**
260265 * @brief
261266 */
262267
--- trunk/framework/testsuite/iutest/include/internal/iutest_file.h (revision 250)
+++ trunk/framework/testsuite/iutest/include/internal/iutest_file.h (revision 251)
@@ -21,24 +21,76 @@
2121 // include
2222 #include <stdio.h>
2323 #include <stdarg.h>
24+#include "../iutest_defs.h"
2425
2526 namespace iutest
2627 {
2728
28-#ifdef _MSC_VER
29-# pragma warning (push)
30-# pragma warning (disable:4996)
31-#endif
29+IUTEST_PRAGMA_CRT_SECURE_WARN_DISABLE_BEGIN()
3230
3331 //======================================================================
34-// define
35-#ifndef IUTEST_FILE
36-# define IUTEST_FILE iutest::StdioFile
37-#endif
32+// declare
33+class IFile;
3834
35+namespace detail
36+{
37+
3938 //======================================================================
4039 // class
4140 /**
41+ * @brief ファイル処理クラスインターフェイス
42+*/
43+class IFileSystem
44+{
45+ template<typename T>
46+ struct Variable
47+ {
48+ static IFileSystem* m_pInstance;
49+ };
50+
51+ typedef Variable<void> var;
52+public:
53+ IFileSystem(void)
54+ {
55+ var::m_pInstance = this;
56+ }
57+ virtual ~IFileSystem(void)
58+ {
59+ var::m_pInstance = NULL;
60+ }
61+
62+public:
63+ virtual void Initialize(void) {}
64+
65+public:
66+ static IFileSystem* GetInstance(void) { return var::m_pInstance; }
67+
68+public:
69+ static IFile* New(void)
70+ {
71+ IFileSystem* fs = GetInstance();
72+ if( fs == NULL ) return NULL;
73+ IFile* p = fs->Create();
74+ return p;
75+ }
76+ static void Free(IFile* ptr)
77+ {
78+ IFileSystem* fs = GetInstance();
79+ if( fs == NULL ) return;
80+ fs->Delete(ptr);
81+ }
82+
83+private:
84+ virtual IFile* Create(void) = 0;
85+ virtual void Delete(IFile*) = 0;
86+};
87+
88+template<typename T>
89+IFileSystem* IFileSystem::Variable<T>::m_pInstance = NULL;
90+
91+}
92+
93+/**
4294 * @brief ファイルクラスインターフェイス
4395 */
4496 class IFile
@@ -75,6 +127,20 @@
75127 };
76128
77129 /**
130+ * @brief ファイル処理クラスインターフェイス
131+*/
132+template<typename FILE>
133+class FileSystem : public detail::IFileSystem
134+{
135+private:
136+ virtual IFile* Create(void) { return new FILE; }
137+ virtual void Delete(IFile* ptr) { delete ptr; }
138+};
139+
140+
141+#if !defined(IUTEST_NOT_SUPPORT_STDFILE)
142+
143+/**
78144 * @brief 標準ファイルクラス
79145 */
80146 class StdioFile : public IFile
@@ -130,10 +196,10 @@
130196 }
131197 };
132198
199+#endif
200+
133201 } // end of namespace iutest
134202
135-#ifdef _MSC_VER
136-# pragma warning (pop)
137-#endif
203+IUTEST_PRAGMA_CRT_SECURE_WARN_DISABLE_END()
138204
139205 #endif
--- trunk/framework/testsuite/iutest/samples/main.cpp (revision 250)
+++ trunk/framework/testsuite/iutest/samples/main.cpp (revision 251)
@@ -457,7 +457,7 @@
457457
458458 #endif
459459
460-#if defined(_IUTEST_OS_WINDOWS)
460+#if defined(IUTEST_OS_WINDOWS)
461461
462462 IUTEST(TestHResult, True)
463463 {
@@ -511,7 +511,7 @@
511511 IUTEST_FAIL() << "add messages.\n";
512512 }
513513
514-#if defined(_IUTEST_OS_WINDOWS)
514+#if defined(IUTEST_OS_WINDOWS)
515515
516516 IUTEST(TestFailure, HRESULT)
517517 {
Show on old repository browser