blob: 12fe6f264eeebf9f27d0c068ae82168d6ad843ce [file] [log] [blame]
Jamie Madill71c3b2c2015-05-07 11:49:20 -04001//
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
14using namespace gl;
15
16namespace
17{
18
19// Tests that the log length properly counts the terminating \0.
20TEST(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