Sha256: 9c56432fcd9690a34c7112b1bbe166ab0482a38a028be811e3a66e966f66952b
Contents?: true
Size: 432 Bytes
Versions: 1
Compression:
Stored size: 432 Bytes
Contents
#include "limonp/ArgvContext.hpp" #include "gtest/gtest.h" using namespace limonp; TEST(ArgvContextTest, Test1) { const char * argv[] = {"./exe1", "--hehe", "11", "key2", "-k", "val"}; string s; ArgvContext arg(sizeof(argv)/sizeof(argv[0]), argv); s<<arg; ASSERT_EQ(s, "[\"./exe1\", \"key2\"]{--hehe:11, -k:val}{}"); ASSERT_EQ("key2", arg[1]); ASSERT_EQ("11", arg["--hehe"]); ASSERT_FALSE(arg.HasKey("-help")); }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cppjieba_rb-0.4.4 | ext/cppjieba/deps/limonp/test/unittest/TArgvContext.cpp |