notcurses/tests/libav.cpp

29 lines
587 B
C++
Raw Normal View History

2019-11-25 03:22:18 +00:00
#include <notcurses.h>
#include "main.h"
class LibavTest : public :: testing::Test {
protected:
void SetUp() override {
notcurses_options nopts{};
nopts.outfd = STDIN_FILENO;
nc_ = notcurses_init(&nopts);
ASSERT_NE(nullptr, nc_);
n_ = notcurses_stdplane(nc_);
ASSERT_NE(nullptr, n_);
}
void TearDown() override {
if(nc_){
EXPECT_EQ(0, notcurses_stop(nc_));
}
}
struct notcurses* nc_{};
struct ncplane* n_{};
};
TEST_F(LibavTest, LoadImage) {
int ret = notcurses_image_open(nc_, "../tools/dsscaw-purp.png");
ASSERT_EQ(0, ret);
}