Skip to content

Commit

Permalink
Add SaiAttrWrap tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kcudnik committed Aug 23, 2021
1 parent c6e7ac0 commit 734c7ef
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion unittest/vslib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ tests_SOURCES = main.cpp \
TestEventPayloadNetLinkMsg.cpp \
TestEventPayloadPacket.cpp \
TestEventQueue.cpp \
TestFdbInfo.cpp
TestFdbInfo.cpp \
TestSaiAttrWrap.cpp

tests_CXXFLAGS = $(DBGFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS_COMMON)
tests_LDADD = $(LDADD_GTEST) $(top_srcdir)/vslib/libSaiVS.a -lhiredis -lswsscommon -lpthread -L$(top_srcdir)/meta/.libs -lsaimetadata -lsaimeta -lzmq $(CODE_COVERAGE_LIBS)
Expand Down
10 changes: 10 additions & 0 deletions unittest/vslib/TestSaiAttrWrap.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include "SaiAttrWrap.h"

#include <gtest/gtest.h>

using namespace saivs;

TEST(SaiAttrWrap, ctr)
{
EXPECT_THROW(std::make_shared<SaiAttrWrap>("attrId", "attrValue"), std::runtime_error);
}

0 comments on commit 734c7ef

Please sign in to comment.