Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
widget_test.cc File Reference
#include <string>
#include "gtest/gtest.h"
#include <Widget/widget.h>
Include dependency graph for widget_test.cc:

Go to the source code of this file.

Functions

 TEST (WidgetInitializerTest, TestConstructor)
 
 TEST (WidgetInitializerTest, TestConversion)
 

Function Documentation

◆ TEST() [1/2]

TEST ( WidgetInitializerTest ,
TestConstructor  )

Definition at line 45 of file widget_test.cc.

45 {
46 Widget widget(1.0f, "name");
47 EXPECT_FLOAT_EQ(1.0f, widget.GetFloatValue());
48 EXPECT_EQ(std::string("name"), widget.GetStringValue());
49}
#define EXPECT_EQ(val1, val2)
Definition gtest.h:1954
#define EXPECT_FLOAT_EQ(val1, val2)
Definition gtest.h:2059
Here is the call graph for this function:

◆ TEST() [2/2]

TEST ( WidgetInitializerTest ,
TestConversion  )

Definition at line 53 of file widget_test.cc.

53 {
54 Widget widget(1.0f, "name");
55 EXPECT_EQ(1, widget.GetIntValue());
56
57 size_t max_size = 128;
58 char buffer[max_size];
59 widget.GetCharPtrValue(buffer, max_size);
60 EXPECT_STREQ("name", buffer);
61}
#define EXPECT_STREQ(s1, s2)
Definition gtest.h:2027
Here is the call graph for this function: