File size: 938 Bytes
985c397
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// SPDX-License-Identifier: LGPL-2.1-or-later

#include "gtest/gtest.h"
#include <src/App/InitApplication.h>
#include <Mod/Mesh/App/MeshFeature.h>

class MeshFeatureTest: public ::testing::Test
{
protected:
    static void SetUpTestSuite()
    {
        tests::initApplication();
    }

    void SetUp() override
    {}

    void TearDown() override
    {}
};

// NOLINTBEGIN(cppcoreguidelines-*,readability-*)
TEST_F(MeshFeatureTest, getElementTypes)
{
    Mesh::Feature mf;
    std::vector<const char*> types = mf.getElementTypes();

    EXPECT_EQ(types.size(), 2);
    EXPECT_STREQ(types[0], "Mesh");
    EXPECT_STREQ(types[1], "Segment");
}

TEST_F(MeshFeatureTest, getComplexElementTypes)
{
    Mesh::MeshObject mf;
    std::vector<const char*> types = mf.getElementTypes();

    EXPECT_EQ(types.size(), 2);
    EXPECT_STREQ(types[0], "Mesh");
    EXPECT_STREQ(types[1], "Segment");
}
// NOLINTEND(cppcoreguidelines-*,readability-*)