[jira] [Commented] (HAWQ-810) Add string format for feature test library
[ https://issues.apache.org/jira/browse/HAWQ-810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15328953#comment-15328953 ] ASF GitHub Bot commented on HAWQ-810: - Github user xunzhang commented on the issue: https://github.com/apache/incubator-hawq/pull/707 Merged into master. > Add string format for feature test library > -- > > Key: HAWQ-810 > URL: https://issues.apache.org/jira/browse/HAWQ-810 > Project: Apache HAWQ > Issue Type: New Feature > Components: Tests >Reporter: hongwu >Assignee: hongwu > > For example, define a string: > {noformat} > std::string s = stringFormat("hello %s %s world", "xunzhang", "wuhong"); > {noformat} > instead of: > {noformat} > std::string s = "hello" + "xunzhang" + "wuhong" + "world"; > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HAWQ-810) Add string format for feature test library
[ https://issues.apache.org/jira/browse/HAWQ-810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15328954#comment-15328954 ] ASF GitHub Bot commented on HAWQ-810: - Github user xunzhang closed the pull request at: https://github.com/apache/incubator-hawq/pull/707 > Add string format for feature test library > -- > > Key: HAWQ-810 > URL: https://issues.apache.org/jira/browse/HAWQ-810 > Project: Apache HAWQ > Issue Type: New Feature > Components: Tests >Reporter: hongwu >Assignee: hongwu > > For example, define a string: > {noformat} > std::string s = stringFormat("hello %s %s world", "xunzhang", "wuhong"); > {noformat} > instead of: > {noformat} > std::string s = "hello" + "xunzhang" + "wuhong" + "world"; > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HAWQ-810) Add string format for feature test library
[ https://issues.apache.org/jira/browse/HAWQ-810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15328779#comment-15328779 ] ASF GitHub Bot commented on HAWQ-810: - Github user xunzhang commented on a diff in the pull request: https://github.com/apache/incubator-hawq/pull/707#discussion_r66898792 --- Diff: src/test/feature/testlib/test_lib.cpp --- @@ -73,6 +74,11 @@ TEST_F(TestCommonLib, TestSqlUtil) { util.execSQLFile("testlib/sql/sample.sql", "testlib/ans/sample.ans"); } +TEST_F(TestCommonLib, TestStringFormat) { + auto s1 = hawq::test::stringFormat("welcome %s to apache %s project", "you", "HAWQ"); + EXPECT_EQ(s1, "welcome you to apache HAWQ project"); --- End diff -- Here welcome is used as transitive verb. Refer webster: http://www.merriam-webster.com/dictionary/welcome > Add string format for feature test library > -- > > Key: HAWQ-810 > URL: https://issues.apache.org/jira/browse/HAWQ-810 > Project: Apache HAWQ > Issue Type: New Feature > Components: Tests >Reporter: hongwu >Assignee: hongwu > > For example, define a string: > {noformat} > std::string s = stringFormat("hello %s %s world", "xunzhang", "wuhong"); > {noformat} > instead of: > {noformat} > std::string s = "hello" + "xunzhang" + "wuhong" + "world"; > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HAWQ-810) Add string format for feature test library
[ https://issues.apache.org/jira/browse/HAWQ-810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15328773#comment-15328773 ] ASF GitHub Bot commented on HAWQ-810: - Github user huor commented on the issue: https://github.com/apache/incubator-hawq/pull/707 +1 except for the test case for string format. > Add string format for feature test library > -- > > Key: HAWQ-810 > URL: https://issues.apache.org/jira/browse/HAWQ-810 > Project: Apache HAWQ > Issue Type: New Feature > Components: Tests >Reporter: hongwu >Assignee: hongwu > > For example, define a string: > {noformat} > std::string s = stringFormat("hello %s %s world", "xunzhang", "wuhong"); > {noformat} > instead of: > {noformat} > std::string s = "hello" + "xunzhang" + "wuhong" + "world"; > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HAWQ-810) Add string format for feature test library
[ https://issues.apache.org/jira/browse/HAWQ-810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15328772#comment-15328772 ] ASF GitHub Bot commented on HAWQ-810: - Github user huor commented on a diff in the pull request: https://github.com/apache/incubator-hawq/pull/707#discussion_r66898131 --- Diff: src/test/feature/testlib/test_lib.cpp --- @@ -73,6 +74,11 @@ TEST_F(TestCommonLib, TestSqlUtil) { util.execSQLFile("testlib/sql/sample.sql", "testlib/ans/sample.ans"); } +TEST_F(TestCommonLib, TestStringFormat) { + auto s1 = hawq::test::stringFormat("welcome %s to apache %s project", "you", "HAWQ"); + EXPECT_EQ(s1, "welcome you to apache HAWQ project"); --- End diff -- ``` auto s1 = hawq::test::stringFormat("Welcome to apache %s project", "HAWQ"); + EXPECT_EQ(s1, "Welcome to apache HAWQ project"); ``` or ``` auto s1 = hawq::test::stringFormat("%s are welcome to apache %s project", "You", "HAWQ"); + EXPECT_EQ(s1, "You are welcome to apache HAWQ project"); ``` > Add string format for feature test library > -- > > Key: HAWQ-810 > URL: https://issues.apache.org/jira/browse/HAWQ-810 > Project: Apache HAWQ > Issue Type: New Feature > Components: Tests >Reporter: hongwu >Assignee: hongwu > > For example, define a string: > {noformat} > std::string s = stringFormat("hello %s %s world", "xunzhang", "wuhong"); > {noformat} > instead of: > {noformat} > std::string s = "hello" + "xunzhang" + "wuhong" + "world"; > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HAWQ-810) Add string format for feature test library
[ https://issues.apache.org/jira/browse/HAWQ-810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15327168#comment-15327168 ] ASF GitHub Bot commented on HAWQ-810: - Github user xunzhang commented on the issue: https://github.com/apache/incubator-hawq/pull/707 also cc @jiny2 > Add string format for feature test library > -- > > Key: HAWQ-810 > URL: https://issues.apache.org/jira/browse/HAWQ-810 > Project: Apache HAWQ > Issue Type: New Feature > Components: Tests >Reporter: hongwu >Assignee: hongwu > > For example, define a string: > {noformat} > std::string s = stringFormat("hello %s %s world", "xunzhang", "wuhong"); > {noformat} > instead of: > {noformat} > std::string s = "hello" + "xunzhang" + "wuhong" + "world"; > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HAWQ-810) Add string format for feature test library
[ https://issues.apache.org/jira/browse/HAWQ-810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15327165#comment-15327165 ] ASF GitHub Bot commented on HAWQ-810: - Github user xunzhang commented on the issue: https://github.com/apache/incubator-hawq/pull/707 cc @zhangh43 @huor > Add string format for feature test library > -- > > Key: HAWQ-810 > URL: https://issues.apache.org/jira/browse/HAWQ-810 > Project: Apache HAWQ > Issue Type: New Feature > Components: Tests >Reporter: hongwu >Assignee: hongwu > > For example, define a string: > {noformat} > std::string s = stringFormat("hello %s %s world", "xunzhang", "wuhong"); > {noformat} > instead of: > {noformat} > std::string s = "hello" + "xunzhang" + "wuhong" + "world"; > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HAWQ-810) Add string format for feature test library
[ https://issues.apache.org/jira/browse/HAWQ-810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15327163#comment-15327163 ] ASF GitHub Bot commented on HAWQ-810: - GitHub user xunzhang opened a pull request: https://github.com/apache/incubator-hawq/pull/707 HAWQ-810. Add stringFormat for feature test library You can merge this pull request into a Git repository by running: $ git pull https://github.com/xunzhang/incubator-hawq HAWQ-810 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-hawq/pull/707.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #707 commit a4a2aeae4ff8f9addfb5d862ea502d46e2e685f8 Author: xunzhangDate: 2016-06-13T11:08:01Z HAWQ-810. Add stringFormat for feature test library > Add string format for feature test library > -- > > Key: HAWQ-810 > URL: https://issues.apache.org/jira/browse/HAWQ-810 > Project: Apache HAWQ > Issue Type: New Feature > Components: Tests >Reporter: hongwu >Assignee: hongwu > > For example, define a string: > {noformat} > std::string s = stringFormat("hello %s %s world", "xunzhang", "wuhong"); > {noformat} > instead of: > {noformat} > std::string s = "hello" + "xunzhang" + "wuhong" + "world"; > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)