summaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/attribute/guard/attributeguard.cpp
blob: 9eef5e93490a39355dbcefb2342a5b7b8020664a (plain) (blame)
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
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/fastos/fastos.h>
#include <vespa/log/log.h>
LOG_SETUP("attributeguard_test");
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/searchlib/attribute/attributeguard.h>
#include <vespa/searchlib/attribute/extendableattributes.h>

namespace search {

class AttributeGuardTest : public vespalib::TestApp
{
public:
    int Main() override;
};

int
AttributeGuardTest::Main()
{
    TEST_INIT("attributeguard_test");


    AttributeVector::SP ssattr(new SingleStringExtAttribute("ss1"));
    AttributeEnumGuard guard(ssattr);
    EXPECT_TRUE(guard.valid());

    TEST_DONE();
}

}

TEST_APPHOOK(search::AttributeGuardTest);