diff options
author | dan sinclair <dj2@everburning.com> | 2019-02-19 12:51:20 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-19 12:51:20 -0500 |
commit | f2a13b59ad5cbff97c7a672e59766291a2eddaee (patch) | |
tree | f91b4978f77879920ee607e689713a3d365413e8 /src/descriptor_set_and_binding_parser_test.cc | |
parent | 735243802dc66120ca9a536c8059f42db2ac9b72 (diff) | |
download | amber-f2a13b59ad5cbff97c7a672e59766291a2eddaee.tar.gz |
Fixup sample app buffer parsing (#300)
This CL fixes the -B flag to default to 0:0 if not provided. It also
fixes the code to use : as the separator instead of ,
Diffstat (limited to 'src/descriptor_set_and_binding_parser_test.cc')
-rw-r--r-- | src/descriptor_set_and_binding_parser_test.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/descriptor_set_and_binding_parser_test.cc b/src/descriptor_set_and_binding_parser_test.cc index 139a7ef..6010130 100644 --- a/src/descriptor_set_and_binding_parser_test.cc +++ b/src/descriptor_set_and_binding_parser_test.cc @@ -22,7 +22,7 @@ using DescriptorSetAndBindingParserTest = testing::Test; TEST_F(DescriptorSetAndBindingParserTest, CommaAndBinding) { DescriptorSetAndBindingParser parser; - Result r = parser.Parse(",1234"); + Result r = parser.Parse(":1234"); ASSERT_TRUE(r.IsSuccess()) << r.Error(); EXPECT_EQ(0, parser.GetDescriptorSet()); @@ -40,7 +40,7 @@ TEST_F(DescriptorSetAndBindingParserTest, Binding) { TEST_F(DescriptorSetAndBindingParserTest, DescSetAndBinding) { DescriptorSetAndBindingParser parser; - Result r = parser.Parse("1234,5678"); + Result r = parser.Parse("1234:5678"); ASSERT_TRUE(r.IsSuccess()) << r.Error(); EXPECT_EQ(1234, parser.GetDescriptorSet()); @@ -67,7 +67,7 @@ TEST_F(DescriptorSetAndBindingParserTest, InvalidCharacterBetweenTwoNumbers) { TEST_F(DescriptorSetAndBindingParserTest, InvalidCharacterAfterComma) { DescriptorSetAndBindingParser parser; - Result r = parser.Parse("1234,a5678"); + Result r = parser.Parse("1234:a5678"); EXPECT_EQ( "Binding for a buffer must be non-negative integer, but you gave: a5678", r.Error()); @@ -75,7 +75,7 @@ TEST_F(DescriptorSetAndBindingParserTest, InvalidCharacterAfterComma) { TEST_F(DescriptorSetAndBindingParserTest, NegativeDescSet) { DescriptorSetAndBindingParser parser; - Result r = parser.Parse("-1234,5678"); + Result r = parser.Parse("-1234:5678"); EXPECT_EQ( "Descriptor set and binding for a buffer must be non-negative integer, " "but you gave: -1234", @@ -84,7 +84,7 @@ TEST_F(DescriptorSetAndBindingParserTest, NegativeDescSet) { TEST_F(DescriptorSetAndBindingParserTest, NegativeBindingAfterComma) { DescriptorSetAndBindingParser parser; - Result r = parser.Parse(",-1234"); + Result r = parser.Parse(":-1234"); EXPECT_EQ( "Binding for a buffer must be non-negative integer, but you gave: -1234", r.Error()); @@ -101,7 +101,7 @@ TEST_F(DescriptorSetAndBindingParserTest, NegativeBinding) { TEST_F(DescriptorSetAndBindingParserTest, DescSetAndNegativeBinding) { DescriptorSetAndBindingParser parser; - Result r = parser.Parse("1234,-5678"); + Result r = parser.Parse("1234:-5678"); EXPECT_EQ( "Binding for a buffer must be non-negative integer, but you gave: -5678", r.Error()); |