Edit

kc3-lang/angle/src/libANGLE/renderer/serial_utils_unittest.cpp

Branch :

  • Show log

    Commit

  • Author : Jamie Madill
    Date : 2019-12-17 13:57:12
    Hash : d50151d3
    Message : Move Serial utils to their own file. This will let the front-end access them without pulling in the rest of renderer_utils. The Serial class in particular will be useful for capture/replay. Also adds a very minimal unit test. Bug: angleproject:4223 Change-Id: I9e63b8a8227a245b20a8f024b960fcf60c7840db Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1954611 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>

  • src/libANGLE/renderer/serial_utils_unittest.cpp
  • //
    // Copyright 2019 The ANGLE Project Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style license that can be
    // found in the LICENSE file.
    //
    // serial_utils_unittest:
    //   Unit tests for the Serial utils.
    //
    
    #include <gtest/gtest.h>
    
    #include "libANGLE/renderer/serial_utils.h"
    
    namespace rx
    {
    TEST(SerialTest, Monotonic)
    {
        SerialFactory factory;
    
        Serial a = factory.generate();
        Serial b = factory.generate();
    
        EXPECT_GT(b, a);
    
        Serial zero;
    
        EXPECT_GT(a, zero);
        EXPECT_GT(b, zero);
    }
    }  // namespace rx