OpenCores
URL https://opencores.org/ocsvn/1g_ethernet_dpi/1g_ethernet_dpi/trunk

Subversion Repositories 1g_ethernet_dpi

[/] [1g_ethernet_dpi/] [trunk/] [sw/] [app/] [gtest/] [gtest_1.cpp] - Rev 4

Compare with Previous | Blame | View Log

#include <gtest/gtest.h>
#include <string>
 
#include "ethlc.hpp"
 
//TEST_F(TestDev, test_1)
TEST(TestDev, test_1)
{
    // dec vars
    std::string dev_addr;
    std::string details;
    bool result;
 
    // prep WRONG ipv4-addr
    dev_addr = "192.168.43.6";
 
    // proc
    try {
        ethlc dev(dev_addr);
        // if there are here == ERR
        FAIL() << "-> ethlc-init problem#1" << std::endl;
    }
    catch (int val) { // no device found == OK
        SUCCEED();
    }
    // Final
}
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.