Jamie Madill | 71c3b2c | 2015-05-07 11:49:20 -0400 | [diff] [blame^] | 1 | // |
| 2 | // Copyright 2015 The ANGLE Project Authors. All rights reserved. |
| 3 | // Use of this source code is governed by a BSD-style license that can be |
| 4 | // found in the LICENSE file. |
| 5 | // |
| 6 | // Unit tests for Program and related classes. |
| 7 | // |
| 8 | |
| 9 | #include <gtest/gtest.h> |
| 10 | |
| 11 | #include "angle_unittests_utils.h" |
| 12 | #include "libANGLE/Program.h" |
| 13 | |
| 14 | using namespace gl; |
| 15 | |
| 16 | namespace |
| 17 | { |
| 18 | |
| 19 | // Tests that the log length properly counts the terminating \0. |
| 20 | TEST(InfoLogTest, LogLengthCountsTerminator) |
| 21 | { |
| 22 | InfoLog infoLog; |
| 23 | EXPECT_EQ(0u, infoLog.getLength()); |
| 24 | infoLog.append(" "); |
| 25 | |
| 26 | // " \n\0" = 3 characters |
| 27 | EXPECT_EQ(3u, infoLog.getLength()); |
| 28 | } |
| 29 | |
| 30 | } // namespace |