thread_br_add_onmesh_prefix(instance, onmeshIpv6Prefix,
onmeshIpv6PrefixLen, preference, preferred, slaac,
dhcp, configure, defaultRoute, onMesh, stable, &onmeshPrefix));
+}
+
+TEST_F(ThreadBRTest, BRRemoveOnmeshPrefixNotInitialized)
+{
+ EXPECT_EQ(THREAD_ERROR_NONE, thread_deinitialize());
+ EXPECT_EQ(THREAD_ERROR_NOT_INITIALIZED,
+ thread_br_remove_onmesh_prefix(instance, onmeshPrefix));
+}
+
+TEST_F(ThreadBRTest, BRRemoveOnmeshPrefixInvalidParameter)
+{
+ EXPECT_EQ(THREAD_ERROR_INVALID_PARAMETER,
+ thread_br_remove_onmesh_prefix(instance, onmeshPrefix));
+}
+
+TEST_F(ThreadBRTest, BRRemoveOnmeshPrefixNotEnabled)
+{
+ EXPECT_EQ(THREAD_ERROR_NONE, thread_enable(&instance));
+ EXPECT_EQ(THREAD_ERROR_NOT_ENABLED,
+ thread_br_remove_onmesh_prefix(instance, onmeshPrefix));
+}
+
+TEST_F(ThreadBRTest, BRRemoveOnmeshPrefixErrorNone)
+{
+ EXPECT_EQ(THREAD_ERROR_NONE, thread_enable(&instance));
+ EXPECT_EQ(THREAD_ERROR_NONE, thread_br_enable(instance));
+ EXPECT_EQ(THREAD_ERROR_NONE,
+ thread_br_add_onmesh_prefix(instance, onmeshIpv6Prefix,
+ onmeshIpv6PrefixLen, preference, preferred, slaac,
+ dhcp, configure, defaultRoute, onMesh, stable, &onmeshPrefix));
+ EXPECT_EQ(THREAD_ERROR_NONE,
+ thread_br_remove_onmesh_prefix(instance, onmeshPrefix));
}
\ No newline at end of file