Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
A
angle
  • Project
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Chen Yisong
  • angle
  • Repository

Switch branch/tag
  • angle
  • src
  • tests
  • test_utils
  • ANGLETest.cpp
Find file
BlameHistoryPermalink
  • Martin Radev's avatar
    Decouple ANGLETest functionality and test parameters · cdadb3ff
    Martin Radev authored Jun 09, 2017
    ANGLETest provides useful functionality for end2end tests, but it
    cannot be used for tests which take other test parameters than the
    platform. The patch introduces another level of abstraction by moving
    all of ANGLETest's functionality to another class - ANGLETestBase -
    which does not inherit from ::testing::TestWithParam<>. New tests can
    either inherit from ANGLETest as before to have only platform
    parameters, or they can inherit from ANGLETestBase and add handling
    of custom test parameters.
    
    Example:
    
    // The new parameter type must inherit from PlatformParameters.
    struct MyCustomParameters : PlatformParameters
    {
        bool mWorkaroundState;
    };
    
    class MyTest : public ANGLETestBase,
                   public ::testing::TestWithParam<MyCustomParameters>
    {
        protected:
        void overrideWorkaroundsD3D(
            angle::WorkaroundsD3D *workaroundsD3D) override
        {
            workaroundsD3D->myCustomWorkaround = GetParam().mWorkaroundState;
        }
    
    };
    
    ANGLE_INSTANTIATE_TEST(MyTest, MyCustomParameters(ES3_D3D11(), false),
                                   MyCustomParameters(ES3_D3D11(), true));
    
    BUG=angleproject:2062
    TEST=angle_end2end_tests
    
    Change-Id: Ia36e429cff8c4c291fc87a286a1d1a3004d6fad6
    Reviewed-on: https://chromium-review.googlesource.com/530945
    Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
    Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
    cdadb3ff
ANGLETest.cpp 27.1 KB
EditWeb IDE
×

Replace ANGLETest.cpp

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.