Changeset 316 for XIOS/trunk/src/test
- Timestamp:
- 02/20/12 17:42:29 (12 years ago)
- Location:
- XIOS/trunk/src/test
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/test/test.cpp
r300 r316 3 3 #include <string> 4 4 5 #include <boost/date_time/gregorian/gregorian.hpp> 6 #include <boost/date_time/posix_time/posix_time.hpp> 7 5 8 using namespace std ; 6 7 8 class CLog : public ostream 9 { 10 public : 11 CLog() : ostream(NULL),level(0) {} 12 CLog& operator()(int l) {if (l<=level) rdbuf(cout.rdbuf()) ; else rdbuf(NULL) ; return *this;} 13 void setLevel(int l) {level=l; } 14 int level ; 15 // ostringstream& getStream() { return *(ostringstream*)(this) ; } 16 // ~CLog(void) { cout<<"info message "<< this->str();} 17 }; 18 9 using namespace boost::posix_time ; 10 using namespace boost::gregorian ; 19 11 20 12 int main(void) 21 13 { 22 CLog out ; 23 cout<<string("toto")<<endl ; 24 out<<"123"<<endl ; 25 out.setLevel(5) ; 26 out(7)<<"coucou 1"<<endl ; 27 out(3)<<"coucou 2"<<endl<<"i23"<<endl ; 28 14 ptime t(time_from_string("2012-02-30 15:24")) ; 15 16 17 std::cout << to_simple_string(t) << std::endl; 18 19 return 1 ; 29 20 } -
XIOS/trunk/src/test/test_cs.f90
r313 r316 77 77 CALL xios_set_context_attr("test",calendar_type="Gregorian") 78 78 CALL xios_set_context_attr("test",calendar_type="Gregorian") 79 CALL xios_set_context_attr("test",start_date="01/01/2000 - 00:00:00")79 ! CALL xios_set_context_attr("test",start_date="01/01/2000 - 00:00:00") 80 80 CALL xios_set_context_attr("test",calendar_type="Gregorian") 81 81 CALL xios_set_domain_attr("domain_A",ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, ni=ni,jbegin=jbegin,nj=nj)
Note: See TracChangeset
for help on using the changeset viewer.