예제 #1
0
TEST(TestDeclaration, testImportKind_Var)
{
    PARSE_STATEMENT(L"import var Foundation.NSFileManager");
    ImportPtr import;
    ASSERT_NOT_NULL(import = std::dynamic_pointer_cast<Import>(root));
    ASSERT_EQ(L"Foundation.NSFileManager", import->getPath());
    ASSERT_EQ(Import::Var, import->getKind());
}
예제 #2
0
TEST(TestDeclaration, testImportSubModule)
{
    PARSE_STATEMENT(L"import Foundation.SubModule");
    ImportPtr import;
    ASSERT_NOT_NULL(import = std::dynamic_pointer_cast<Import>(root));
    ASSERT_EQ(L"Foundation.SubModule", import->getPath());
    ASSERT_EQ(Import::_, import->getKind());
}