Compatibility with Ruby 1.8.7 (main app test), tests fixed for CentOS6

This commit is contained in:
Matthias Koefferlein 2018-05-02 07:32:14 +02:00
parent 99acbd03d6
commit 74cc8eea07
2 changed files with 5 additions and 2 deletions

View File

@ -23,6 +23,7 @@
#include "tlHttpStream.h"
#include "tlUnitTest.h"
#include "tlTimer.h"
#include <QCoreApplication>
@ -100,10 +101,12 @@ TEST(3)
stream.send ();
EXPECT_EQ (stream.data_available (), false);
while (! stream.data_available ()) {
tl::Clock start = tl::Clock::current ();
while (! r.flag && (tl::Clock::current () - start).seconds () < 10) {
QCoreApplication::processEvents (QEventLoop::ExcludeUserInputEvents);
}
EXPECT_EQ (r.flag, true);
EXPECT_EQ (stream.data_available (), true);
char b[100];
size_t n = stream.read (b, sizeof (b));

View File

@ -60,7 +60,7 @@ class KLayoutMain_TestClass < TestBase
def test_4
# Application class
if !RBA.constants.find { |x| x == :QDialog }
if !RBA.constants.find { |x| x == :QDialog || x == "QDialog" }
out = `./klayout -b -r #{File.join(File.dirname(__FILE__), "test_app.rb")}`
assert_equal(out, "RBA::Application superclass Object\nMainWindow is not there\n")