-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathtest_xtoolbar.cpp
32 lines (27 loc) · 1.06 KB
/
test_xtoolbar.cpp
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 (c) 2016, Johan Mabille and Sylvain Corlay *
* *
* Distributed under the terms of the BSD 3-Clause License. *
* *
* The full license is in the file LICENSE, distributed with this software. *
****************************************************************************/
#include "gtest/gtest.h"
#include "xplot/xtoolbar.hpp"
namespace xpl
{
TEST(xtoolbar, constructor)
{
figure f1;
f1.title = "fig1";
toolbar t1(f1);
EXPECT_EQ(t1.figure().get<figure>().title(), "fig1");
figure f2;
f2.title = "fig2";
toolbar t2(f2);
EXPECT_EQ(t2.figure().get<figure>().title(), "fig2");
auto f3 = std::make_shared<figure>();
f3->title = "fig3";
toolbar t3(f3);
EXPECT_EQ(t3.figure().get<figure>().title(), "fig3");
}
}