mirror of https://github.com/ARMmbed/mbed-os.git
				
				
				
			Update unittests
							parent
							
								
									82964a3a0c
								
							
						
					
					
						commit
						d001b7a441
					
				| 
						 | 
				
			
			@ -26,6 +26,11 @@ const char *NetworkInterface::get_mac_address()
 | 
			
		|||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
nsapi_error_t NetworkInterface::set_mac_address(uint8_t *mac_addr, nsapi_size_t addr_len)
 | 
			
		||||
{
 | 
			
		||||
    return NSAPI_ERROR_UNSUPPORTED;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
nsapi_error_t NetworkInterface::get_ip_address(SocketAddress *)
 | 
			
		||||
{
 | 
			
		||||
    return NSAPI_ERROR_UNSUPPORTED;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -155,6 +155,11 @@ char *EmacTestNetworkStack::Interface::get_mac_address(char *buf, nsapi_size_t b
 | 
			
		|||
    return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
nsapi_error_t EmacTestNetworkStack::Interface::set_mac_address(uint8_t *buf, nsapi_size_t buflen)
 | 
			
		||||
{
 | 
			
		||||
    return NSAPI_ERROR_OK;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
nsapi_error_t EmacTestNetworkStack::Interface::get_ip_address(SocketAddress *address)
 | 
			
		||||
{
 | 
			
		||||
    return NSAPI_ERROR_OK;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -84,7 +84,9 @@ public:
 | 
			
		|||
         *
 | 
			
		||||
         * @return              MAC address as "V:W:X:Y:Z"
 | 
			
		||||
         */
 | 
			
		||||
        virtual char *get_mac_address(char *buf, nsapi_size_t buflen);
 | 
			
		||||
        //virtual char *get_mac_address(char *buf, nsapi_size_t buflen);
 | 
			
		||||
 | 
			
		||||
        virtual nsapi_error_t set_mac_address(uint8_t *mac_addr, nsapi_size_t addr_len);
 | 
			
		||||
 | 
			
		||||
        /** Copies IP address of the network interface to user supplied buffer
 | 
			
		||||
         *
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -75,6 +75,12 @@ TEST_F(TestNetworkInterface, get_mac_address)
 | 
			
		|||
    EXPECT_EQ(iface->get_mac_address(), n);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST_F(TestNetworkInterface, set_mac_address)
 | 
			
		||||
{
 | 
			
		||||
    uint8_t mac_buf[8];
 | 
			
		||||
    EXPECT_EQ(iface->set_mac_address(mac_buf, 8), NSAPI_ERROR_UNSUPPORTED);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST_F(TestNetworkInterface, get_ip_address)
 | 
			
		||||
{
 | 
			
		||||
    SocketAddress addr;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue