Sha256: d4b08587d35ea33ca31d29d2028112813d73a80dd55f98c4be61f6023353ccf6

Contents?: true

Size: 547 Bytes

Versions: 13

Compression:

Stored size: 547 Bytes

Contents

#include "config.h"
#include <gtest/gtest.h>
#include <libcouchbase/couchbase.h>
#include "n1ql/n1ql-internal.h"

class N1qLStringTests : public ::testing::Test {
};

TEST_F(N1qLStringTests, testParseTimeout)
{
    lcb_U32 value;
    ASSERT_EQ(1500000, lcb_n1qlreq_parsetmo("1.5s"));
    ASSERT_EQ(1500000, lcb_n1qlreq_parsetmo("1500ms"));
    ASSERT_EQ(1500000, lcb_n1qlreq_parsetmo("1500000us"));
    ASSERT_EQ(0, lcb_n1qlreq_parsetmo("blahblah"));
    ASSERT_EQ(0, lcb_n1qlreq_parsetmo("124"));
    ASSERT_EQ(0, lcb_n1qlreq_parsetmo("99z"));
}

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
libcouchbase-0.3.3 ext/libcouchbase/tests/basic/t_n1qlstrings.cc
libcouchbase-0.3.1 ext/libcouchbase/tests/basic/t_n1qlstrings.cc
libcouchbase-0.2.0 ext/libcouchbase/tests/basic/t_n1qlstrings.cc
libcouchbase-0.1.0 ext/libcouchbase/tests/basic/t_n1qlstrings.cc
libcouchbase-0.0.9 ext/libcouchbase/tests/basic/t_n1qlstrings.cc
libcouchbase-0.0.8 ext/libcouchbase/tests/basic/t_n1qlstrings.cc
libcouchbase-0.0.7 ext/libcouchbase/tests/basic/t_n1qlstrings.cc
libcouchbase-0.0.6 ext/libcouchbase/tests/basic/t_n1qlstrings.cc
libcouchbase-0.0.5 ext/libcouchbase/tests/basic/t_n1qlstrings.cc
libcouchbase-0.0.4 ext/libcouchbase/tests/basic/t_n1qlstrings.cc
libcouchbase-0.0.3 ext/libcouchbase/tests/basic/t_n1qlstrings.cc
libcouchbase-0.0.2 ext/libcouchbase/tests/basic/t_n1qlstrings.cc
libcouchbase-0.0.1 ext/libcouchbase/tests/basic/t_n1qlstrings.cc