Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 49953 invoked from network); 25 Sep 2009 22:12:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Sep 2009 22:12:20 -0000 Received: (qmail 32793 invoked by uid 500); 25 Sep 2009 22:12:20 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 32735 invoked by uid 500); 25 Sep 2009 22:12:20 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 32720 invoked by uid 99); 25 Sep 2009 22:12:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Sep 2009 22:12:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Sep 2009 22:12:17 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id CED8623888FC; Fri, 25 Sep 2009 22:11:56 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r819045 - /activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/SystemTest.cpp Date: Fri, 25 Sep 2009 22:11:56 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090925221156.CED8623888FC@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tabish Date: Fri Sep 25 22:11:56 2009 New Revision: 819045 URL: http://svn.apache.org/viewvc?rev=819045&view=rev Log: Add more tests to the System unit tests. Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/SystemTest.cpp Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/SystemTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/SystemTest.cpp?rev=819045&r1=819044&r2=819045&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/SystemTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/lang/SystemTest.cpp Fri Sep 25 22:11:56 2009 @@ -19,6 +19,7 @@ #include #include +#include using namespace std; using namespace decaf; @@ -78,9 +79,21 @@ //////////////////////////////////////////////////////////////////////////////// void SystemTest::test_currentTimeMillis() { CPPUNIT_ASSERT( System::currentTimeMillis() != 0 ); + + long long start = System::currentTimeMillis(); + Thread::sleep( 150 ); + long long end = System::currentTimeMillis(); + + CPPUNIT_ASSERT_MESSAGE( "First Read isn't less than the second.", start < end ); } //////////////////////////////////////////////////////////////////////////////// void SystemTest::test_nanoTime() { CPPUNIT_ASSERT( System::nanoTime() != 0 ); + + long long start = System::nanoTime(); + Thread::sleep( 150 ); + long long end = System::nanoTime(); + + CPPUNIT_ASSERT_MESSAGE( "First Read isn't less than the second.", start < end ); }