notcurses/tests/libav.cpp
2019-11-26 20:23:40 -05:00

29 lines
587 B
C++

#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);
}