]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/console/console.cpp
restored old casts (there was a reason for them)
[wxWidgets.git] / samples / console / console.cpp
index f2c3a63aa3cf6dde2edaaac203889fa919c14f6a..0545e6bea60bf28822f2643b0903d7a99f6261f0 100644 (file)
@@ -99,7 +99,7 @@
 #ifdef TEST_INTERACTIVE
     #undef TEST_INTERACTIVE
 
-    static const bool TEST_INTERACTIVE = FALSE;
+    static const bool TEST_INTERACTIVE = TRUE;
 #else
     static const bool TEST_INTERACTIVE = FALSE;
 #endif
@@ -1702,9 +1702,9 @@ static void TestMimeAssociate()
                             _T("application/x-xyz"),
                             _T("xyzview '%s'"), // open cmd
                             _T(""),             // print cmd
-                            _T("XYZ File")  // description
-                            _T(".xyz"),     // extensions
-                            NULL            // end of extensions
+                            _T("XYZ File"),     // description
+                            _T(".xyz"),         // extensions
+                            NULL                // end of extensions
                          );
     ftInfo.SetShortDesc(_T("XYZFile")); // used under Win32 only
 
@@ -1947,8 +1947,15 @@ static void TestDivision()
         // multiplication will not overflow)
         wxLongLong ll = MAKE_LL((rand() >> 12), rand(), rand(), rand());
 
-        // get a random long (not wxLongLong for now) to divide it with
-        long l = rand();
+        // get a random (but non null) long (not wxLongLong for now) to divide
+        // it with
+        long l;
+        do
+        {
+           l = rand();
+        }
+        while ( !l );
+
         q = ll / l;
         r = ll % l;
 
@@ -5692,7 +5699,9 @@ int main(int argc, char **argv)
     {
         TestOsInfo();
         TestUserInfo();
-        TestDiskInfo();
+
+        if ( TEST_INTERACTIVE )
+            TestDiskInfo();
     }
 #endif // TEST_INFO_FUNCTIONS