This source file includes following definitions.
- TestIrtInterfaceHidden
- TestDyncodeCreate
- TestDyncodeModify
- TestDyncodeDelete
- SetupTests
- SetupPluginInterfaces
#include <errno.h>
#include <nacl/nacl_dyncode.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "native_client/src/shared/platform/nacl_check.h"
#include "native_client/src/untrusted/nacl/nacl_irt.h"
#include "ppapi/native_client/tests/ppapi_test_lib/get_browser_interface.h"
#include "ppapi/native_client/tests/ppapi_test_lib/test_interface.h"
namespace {
void TestIrtInterfaceHidden(void) {
struct nacl_irt_dyncode interface;
size_t result = __nacl_irt_query(NACL_IRT_DYNCODE_v0_1,
&interface, sizeof(interface));
EXPECT(result == 0);
TEST_PASSED;
}
void TestDyncodeCreate(void) {
EXPECT(nacl_dyncode_create(NULL, NULL, 0) == -1);
EXPECT(errno == ENOSYS);
TEST_PASSED;
}
void TestDyncodeModify(void) {
EXPECT(nacl_dyncode_modify(NULL, NULL, 0) == -1);
EXPECT(errno == ENOSYS);
TEST_PASSED;
}
void TestDyncodeDelete(void) {
EXPECT(nacl_dyncode_delete(NULL, 0) == -1);
EXPECT(errno == ENOSYS);
TEST_PASSED;
}
}
void SetupTests() {
RegisterTest("TestIrtInterfaceHidden", TestIrtInterfaceHidden);
RegisterTest("TestDyncodeCreate", TestDyncodeCreate);
RegisterTest("TestDyncodeModify", TestDyncodeModify);
RegisterTest("TestDyncodeDelete", TestDyncodeDelete);
}
void SetupPluginInterfaces() {
}