TextStubV1Tests.cpp 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473
  1. //===-- TextStubV1Tests.cpp - TBD V1 File Test ----------------------------===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===-----------------------------------------------------------------------===/
  8. #include "llvm/TextAPI/MachO/InterfaceFile.h"
  9. #include "llvm/TextAPI/MachO/TextAPIReader.h"
  10. #include "llvm/TextAPI/MachO/TextAPIWriter.h"
  11. #include "gtest/gtest.h"
  12. #include <string>
  13. #include <vector>
  14. using namespace llvm;
  15. using namespace llvm::MachO;
  16. struct ExportedSymbol {
  17. SymbolKind Kind;
  18. std::string Name;
  19. bool WeakDefined;
  20. bool ThreadLocalValue;
  21. };
  22. using ExportedSymbolSeq = std::vector<ExportedSymbol>;
  23. inline bool operator<(const ExportedSymbol &lhs, const ExportedSymbol &rhs) {
  24. return std::tie(lhs.Kind, lhs.Name) < std::tie(rhs.Kind, rhs.Name);
  25. }
  26. inline bool operator==(const ExportedSymbol &lhs, const ExportedSymbol &rhs) {
  27. return std::tie(lhs.Kind, lhs.Name, lhs.WeakDefined, lhs.ThreadLocalValue) ==
  28. std::tie(rhs.Kind, rhs.Name, rhs.WeakDefined, rhs.ThreadLocalValue);
  29. }
  30. static ExportedSymbol TBDv1Symbols[] = {
  31. {SymbolKind::GlobalSymbol, "$ld$hide$os9.0$_sym1", false, false},
  32. {SymbolKind::GlobalSymbol, "_sym1", false, false},
  33. {SymbolKind::GlobalSymbol, "_sym2", false, false},
  34. {SymbolKind::GlobalSymbol, "_sym3", false, false},
  35. {SymbolKind::GlobalSymbol, "_sym4", false, false},
  36. {SymbolKind::GlobalSymbol, "_sym5", false, false},
  37. {SymbolKind::GlobalSymbol, "_tlv1", false, true},
  38. {SymbolKind::GlobalSymbol, "_tlv2", false, true},
  39. {SymbolKind::GlobalSymbol, "_tlv3", false, true},
  40. {SymbolKind::GlobalSymbol, "_weak1", true, false},
  41. {SymbolKind::GlobalSymbol, "_weak2", true, false},
  42. {SymbolKind::GlobalSymbol, "_weak3", true, false},
  43. {SymbolKind::ObjectiveCClass, "class1", false, false},
  44. {SymbolKind::ObjectiveCClass, "class2", false, false},
  45. {SymbolKind::ObjectiveCClass, "class3", false, false},
  46. {SymbolKind::ObjectiveCInstanceVariable, "class1._ivar1", false, false},
  47. {SymbolKind::ObjectiveCInstanceVariable, "class1._ivar2", false, false},
  48. {SymbolKind::ObjectiveCInstanceVariable, "class1._ivar3", false, false},
  49. };
  50. namespace TBDv1 {
  51. TEST(TBDv1, ReadFile) {
  52. static const char tbd_v1_file1[] =
  53. "---\n"
  54. "archs: [ armv7, armv7s, armv7k, arm64 ]\n"
  55. "platform: ios\n"
  56. "install-name: Test.dylib\n"
  57. "current-version: 2.3.4\n"
  58. "compatibility-version: 1.0\n"
  59. "swift-version: 1.1\n"
  60. "exports:\n"
  61. " - archs: [ armv7, armv7s, armv7k, arm64 ]\n"
  62. " allowed-clients: [ clientA ]\n"
  63. " re-exports: [ /usr/lib/libfoo.dylib ]\n"
  64. " symbols: [ _sym1, _sym2, _sym3, _sym4, $ld$hide$os9.0$_sym1 ]\n"
  65. " objc-classes: [ _class1, _class2 ]\n"
  66. " objc-ivars: [ _class1._ivar1, _class1._ivar2 ]\n"
  67. " weak-def-symbols: [ _weak1, _weak2 ]\n"
  68. " thread-local-symbols: [ _tlv1, _tlv2 ]\n"
  69. " - archs: [ armv7, armv7s, armv7k ]\n"
  70. " symbols: [ _sym5 ]\n"
  71. " objc-classes: [ _class3 ]\n"
  72. " objc-ivars: [ _class1._ivar3 ]\n"
  73. " weak-def-symbols: [ _weak3 ]\n"
  74. " thread-local-symbols: [ _tlv3 ]\n"
  75. "...\n";
  76. auto Result = TextAPIReader::get(MemoryBufferRef(tbd_v1_file1, "Test.tbd"));
  77. EXPECT_TRUE(!!Result);
  78. auto File = std::move(Result.get());
  79. EXPECT_EQ(FileType::TBD_V1, File->getFileType());
  80. auto Archs = AK_armv7 | AK_armv7s | AK_armv7k | AK_arm64;
  81. auto Platform = PlatformKind::iOS;
  82. TargetList Targets;
  83. for (auto &&arch : Archs)
  84. Targets.emplace_back(Target(arch, Platform));
  85. EXPECT_EQ(Archs, File->getArchitectures());
  86. EXPECT_EQ(File->getPlatforms().size(), 1U);
  87. EXPECT_EQ(Platform, *File->getPlatforms().begin());
  88. EXPECT_EQ(std::string("Test.dylib"), File->getInstallName());
  89. EXPECT_EQ(PackedVersion(2, 3, 4), File->getCurrentVersion());
  90. EXPECT_EQ(PackedVersion(1, 0, 0), File->getCompatibilityVersion());
  91. EXPECT_EQ(2U, File->getSwiftABIVersion());
  92. EXPECT_EQ(ObjCConstraintType::None, File->getObjCConstraint());
  93. EXPECT_TRUE(File->isTwoLevelNamespace());
  94. EXPECT_TRUE(File->isApplicationExtensionSafe());
  95. EXPECT_FALSE(File->isInstallAPI());
  96. InterfaceFileRef client("clientA", Targets);
  97. InterfaceFileRef reexport("/usr/lib/libfoo.dylib", Targets);
  98. EXPECT_EQ(1U, File->allowableClients().size());
  99. EXPECT_EQ(client, File->allowableClients().front());
  100. EXPECT_EQ(1U, File->reexportedLibraries().size());
  101. EXPECT_EQ(reexport, File->reexportedLibraries().front());
  102. ExportedSymbolSeq Exports;
  103. for (const auto *Sym : File->symbols()) {
  104. EXPECT_FALSE(Sym->isWeakReferenced());
  105. EXPECT_FALSE(Sym->isUndefined());
  106. Exports.emplace_back(ExportedSymbol{Sym->getKind(), Sym->getName(),
  107. Sym->isWeakDefined(),
  108. Sym->isThreadLocalValue()});
  109. }
  110. llvm::sort(Exports.begin(), Exports.end());
  111. EXPECT_EQ(sizeof(TBDv1Symbols) / sizeof(ExportedSymbol), Exports.size());
  112. EXPECT_TRUE(
  113. std::equal(Exports.begin(), Exports.end(), std::begin(TBDv1Symbols)));
  114. File->addSymbol(SymbolKind::ObjectiveCClassEHType, "Class1", {Targets[1]});
  115. File->addSymbol(SymbolKind::ObjectiveCInstanceVariable, "Class1._ivar1",
  116. {Targets[1]});
  117. }
  118. TEST(TBDv1, ReadFile2) {
  119. static const char tbd_v1_file2[] = "--- !tapi-tbd-v1\n"
  120. "archs: [ armv7, armv7s, armv7k, arm64 ]\n"
  121. "platform: ios\n"
  122. "install-name: Test.dylib\n"
  123. "...\n";
  124. auto Result = TextAPIReader::get(MemoryBufferRef(tbd_v1_file2, "Test.tbd"));
  125. EXPECT_TRUE(!!Result);
  126. auto File = std::move(Result.get());
  127. EXPECT_EQ(FileType::TBD_V1, File->getFileType());
  128. auto Archs = AK_armv7 | AK_armv7s | AK_armv7k | AK_arm64;
  129. auto Platform = PlatformKind::iOS;
  130. TargetList Targets;
  131. for (auto &&arch : Archs)
  132. Targets.emplace_back(Target(arch, Platform));
  133. EXPECT_EQ(Archs, File->getArchitectures());
  134. EXPECT_EQ(File->getPlatforms().size(), 1U);
  135. EXPECT_EQ(Platform, *File->getPlatforms().begin());
  136. EXPECT_EQ(std::string("Test.dylib"), File->getInstallName());
  137. EXPECT_EQ(PackedVersion(1, 0, 0), File->getCurrentVersion());
  138. EXPECT_EQ(PackedVersion(1, 0, 0), File->getCompatibilityVersion());
  139. EXPECT_EQ(0U, File->getSwiftABIVersion());
  140. EXPECT_EQ(ObjCConstraintType::None, File->getObjCConstraint());
  141. EXPECT_TRUE(File->isTwoLevelNamespace());
  142. EXPECT_TRUE(File->isApplicationExtensionSafe());
  143. EXPECT_FALSE(File->isInstallAPI());
  144. EXPECT_EQ(0U, File->allowableClients().size());
  145. EXPECT_EQ(0U, File->reexportedLibraries().size());
  146. }
  147. TEST(TBDv1, WriteFile) {
  148. static const char tbd_v1_file3[] =
  149. "---\n"
  150. "archs: [ i386, x86_64 ]\n"
  151. "platform: macosx\n"
  152. "install-name: '/usr/lib/libfoo.dylib'\n"
  153. "current-version: 1.2.3\n"
  154. "compatibility-version: 0\n"
  155. "swift-version: 5\n"
  156. "objc-constraint: retain_release\n"
  157. "exports:\n"
  158. " - archs: [ i386 ]\n"
  159. " symbols: [ _sym1 ]\n"
  160. " weak-def-symbols: [ _sym2 ]\n"
  161. " thread-local-symbols: [ _sym3 ]\n"
  162. " - archs: [ x86_64 ]\n"
  163. " allowed-clients: [ clientA ]\n"
  164. " re-exports: [ '/usr/lib/libfoo.dylib' ]\n"
  165. " symbols: [ '_OBJC_EHTYPE_$_Class1' ]\n"
  166. " objc-classes: [ _Class1 ]\n"
  167. " objc-ivars: [ _Class1._ivar1 ]\n"
  168. "...\n";
  169. InterfaceFile File;
  170. TargetList Targets;
  171. for (auto &&arch : AK_i386 | AK_x86_64)
  172. Targets.emplace_back(Target(arch, PlatformKind::macOS));
  173. File.setPath("libfoo.dylib");
  174. File.setInstallName("/usr/lib/libfoo.dylib");
  175. File.setFileType(FileType::TBD_V1);
  176. File.addTargets(Targets);
  177. File.setCurrentVersion(PackedVersion(1, 2, 3));
  178. File.setSwiftABIVersion(5);
  179. File.setObjCConstraint(ObjCConstraintType::Retain_Release);
  180. File.addAllowableClient("clientA", Targets[1]);
  181. File.addReexportedLibrary("/usr/lib/libfoo.dylib", Targets[1]);
  182. File.addSymbol(SymbolKind::GlobalSymbol, "_sym1", {Targets[0]});
  183. File.addSymbol(SymbolKind::GlobalSymbol, "_sym2", {Targets[0]},
  184. SymbolFlags::WeakDefined);
  185. File.addSymbol(SymbolKind::GlobalSymbol, "_sym3", {Targets[0]},
  186. SymbolFlags::ThreadLocalValue);
  187. File.addSymbol(SymbolKind::ObjectiveCClass, "Class1", {Targets[1]});
  188. File.addSymbol(SymbolKind::ObjectiveCClassEHType, "Class1", {Targets[1]});
  189. File.addSymbol(SymbolKind::ObjectiveCInstanceVariable, "Class1._ivar1",
  190. {Targets[1]});
  191. SmallString<4096> Buffer;
  192. raw_svector_ostream OS(Buffer);
  193. auto Result = TextAPIWriter::writeToStream(OS, File);
  194. EXPECT_FALSE(Result);
  195. EXPECT_STREQ(tbd_v1_file3, Buffer.c_str());
  196. }
  197. TEST(TBDv1, Platform_macOS) {
  198. static const char tbd_v1_platform_macos[] = "---\n"
  199. "archs: [ x86_64 ]\n"
  200. "platform: macosx\n"
  201. "install-name: Test.dylib\n"
  202. "...\n";
  203. auto Result =
  204. TextAPIReader::get(MemoryBufferRef(tbd_v1_platform_macos, "Test.tbd"));
  205. EXPECT_TRUE(!!Result);
  206. auto Platform = PlatformKind::macOS;
  207. auto File = std::move(Result.get());
  208. EXPECT_EQ(FileType::TBD_V1, File->getFileType());
  209. EXPECT_EQ(File->getPlatforms().size(), 1U);
  210. EXPECT_EQ(Platform, *File->getPlatforms().begin());
  211. }
  212. TEST(TBDv1, Platform_iOS) {
  213. static const char tbd_v1_platform_ios[] = "---\n"
  214. "archs: [ arm64 ]\n"
  215. "platform: ios\n"
  216. "install-name: Test.dylib\n"
  217. "...\n";
  218. auto Result =
  219. TextAPIReader::get(MemoryBufferRef(tbd_v1_platform_ios, "Test.tbd"));
  220. EXPECT_TRUE(!!Result);
  221. auto Platform = PlatformKind::iOS;
  222. auto File = std::move(Result.get());
  223. EXPECT_EQ(FileType::TBD_V1, File->getFileType());
  224. EXPECT_EQ(File->getPlatforms().size(), 1U);
  225. EXPECT_EQ(Platform, *File->getPlatforms().begin());
  226. }
  227. TEST(TBDv1, Platform_watchOS) {
  228. static const char tbd_v1_platform_watchos[] = "---\n"
  229. "archs: [ armv7k ]\n"
  230. "platform: watchos\n"
  231. "install-name: Test.dylib\n"
  232. "...\n";
  233. auto Result =
  234. TextAPIReader::get(MemoryBufferRef(tbd_v1_platform_watchos, "Test.tbd"));
  235. EXPECT_TRUE(!!Result);
  236. auto Platform = PlatformKind::watchOS;
  237. auto File = std::move(Result.get());
  238. EXPECT_EQ(FileType::TBD_V1, File->getFileType());
  239. EXPECT_EQ(File->getPlatforms().size(), 1U);
  240. EXPECT_EQ(Platform, *File->getPlatforms().begin());
  241. }
  242. TEST(TBDv1, Platform_tvOS) {
  243. static const char tbd_v1_platform_tvos[] = "---\n"
  244. "archs: [ arm64 ]\n"
  245. "platform: tvos\n"
  246. "install-name: Test.dylib\n"
  247. "...\n";
  248. auto Result =
  249. TextAPIReader::get(MemoryBufferRef(tbd_v1_platform_tvos, "Test.tbd"));
  250. EXPECT_TRUE(!!Result);
  251. auto Platform = PlatformKind::tvOS;
  252. auto File = std::move(Result.get());
  253. EXPECT_EQ(FileType::TBD_V1, File->getFileType());
  254. EXPECT_EQ(File->getPlatforms().size(), 1U);
  255. EXPECT_EQ(Platform, *File->getPlatforms().begin());
  256. }
  257. TEST(TBDv1, Platform_bridgeOS) {
  258. static const char tbd_v1_platform_bridgeos[] = "---\n"
  259. "archs: [ armv7k ]\n"
  260. "platform: bridgeos\n"
  261. "install-name: Test.dylib\n"
  262. "...\n";
  263. auto Result =
  264. TextAPIReader::get(MemoryBufferRef(tbd_v1_platform_bridgeos, "Test.tbd"));
  265. EXPECT_TRUE(!!Result);
  266. auto Platform = PlatformKind::bridgeOS;
  267. auto File = std::move(Result.get());
  268. EXPECT_EQ(FileType::TBD_V1, File->getFileType());
  269. EXPECT_EQ(File->getPlatforms().size(), 1U);
  270. EXPECT_EQ(Platform, *File->getPlatforms().begin());
  271. }
  272. TEST(TBDv1, Swift_1_0) {
  273. static const char tbd_v1_swift_1_0[] = "---\n"
  274. "archs: [ arm64 ]\n"
  275. "platform: ios\n"
  276. "install-name: Test.dylib\n"
  277. "swift-version: 1.0\n"
  278. "...\n";
  279. auto Result =
  280. TextAPIReader::get(MemoryBufferRef(tbd_v1_swift_1_0, "Test.tbd"));
  281. EXPECT_TRUE(!!Result);
  282. auto File = std::move(Result.get());
  283. EXPECT_EQ(FileType::TBD_V1, File->getFileType());
  284. EXPECT_EQ(1U, File->getSwiftABIVersion());
  285. }
  286. TEST(TBDv1, Swift_1_1) {
  287. static const char tbd_v1_swift_1_1[] = "---\n"
  288. "archs: [ arm64 ]\n"
  289. "platform: ios\n"
  290. "install-name: Test.dylib\n"
  291. "swift-version: 1.1\n"
  292. "...\n";
  293. auto Result =
  294. TextAPIReader::get(MemoryBufferRef(tbd_v1_swift_1_1, "Test.tbd"));
  295. EXPECT_TRUE(!!Result);
  296. auto File = std::move(Result.get());
  297. EXPECT_EQ(FileType::TBD_V1, File->getFileType());
  298. EXPECT_EQ(2U, File->getSwiftABIVersion());
  299. }
  300. TEST(TBDv1, Swift_2_0) {
  301. static const char tbd_v1_swift_2_0[] = "---\n"
  302. "archs: [ arm64 ]\n"
  303. "platform: ios\n"
  304. "install-name: Test.dylib\n"
  305. "swift-version: 2.0\n"
  306. "...\n";
  307. auto Result =
  308. TextAPIReader::get(MemoryBufferRef(tbd_v1_swift_2_0, "Test.tbd"));
  309. EXPECT_TRUE(!!Result);
  310. auto File = std::move(Result.get());
  311. EXPECT_EQ(FileType::TBD_V1, File->getFileType());
  312. EXPECT_EQ(3U, File->getSwiftABIVersion());
  313. }
  314. TEST(TBDv1, Swift_3_0) {
  315. static const char tbd_v1_swift_3_0[] = "---\n"
  316. "archs: [ arm64 ]\n"
  317. "platform: ios\n"
  318. "install-name: Test.dylib\n"
  319. "swift-version: 3.0\n"
  320. "...\n";
  321. auto Result =
  322. TextAPIReader::get(MemoryBufferRef(tbd_v1_swift_3_0, "Test.tbd"));
  323. EXPECT_TRUE(!!Result);
  324. auto File = std::move(Result.get());
  325. EXPECT_EQ(FileType::TBD_V1, File->getFileType());
  326. EXPECT_EQ(4U, File->getSwiftABIVersion());
  327. }
  328. TEST(TBDv1, Swift_4_0) {
  329. static const char tbd_v1_swift_4_0[] = "---\n"
  330. "archs: [ arm64 ]\n"
  331. "platform: ios\n"
  332. "install-name: Test.dylib\n"
  333. "swift-version: 4.0\n"
  334. "...\n";
  335. auto Result =
  336. TextAPIReader::get(MemoryBufferRef(tbd_v1_swift_4_0, "Test.tbd"));
  337. EXPECT_FALSE(!!Result);
  338. auto errorMessage = toString(Result.takeError());
  339. EXPECT_EQ("malformed file\nTest.tbd:5:16: error: invalid Swift ABI "
  340. "version.\nswift-version: 4.0\n ^~~\n",
  341. errorMessage);
  342. }
  343. TEST(TBDv1, Swift_5) {
  344. static const char tbd_v1_swift_5[] = "---\n"
  345. "archs: [ arm64 ]\n"
  346. "platform: ios\n"
  347. "install-name: Test.dylib\n"
  348. "swift-version: 5\n"
  349. "...\n";
  350. auto Result = TextAPIReader::get(MemoryBufferRef(tbd_v1_swift_5, "Test.tbd"));
  351. EXPECT_TRUE(!!Result);
  352. auto File = std::move(Result.get());
  353. EXPECT_EQ(FileType::TBD_V1, File->getFileType());
  354. EXPECT_EQ(5U, File->getSwiftABIVersion());
  355. }
  356. TEST(TBDv1, Swift_99) {
  357. static const char tbd_v1_swift_99[] = "---\n"
  358. "archs: [ arm64 ]\n"
  359. "platform: ios\n"
  360. "install-name: Test.dylib\n"
  361. "swift-version: 99\n"
  362. "...\n";
  363. auto Result =
  364. TextAPIReader::get(MemoryBufferRef(tbd_v1_swift_99, "Test.tbd"));
  365. EXPECT_TRUE(!!Result);
  366. auto File = std::move(Result.get());
  367. EXPECT_EQ(FileType::TBD_V1, File->getFileType());
  368. EXPECT_EQ(99U, File->getSwiftABIVersion());
  369. }
  370. TEST(TBDv1, UnknownArchitecture) {
  371. static const char tbd_v1_file_unknown_architecture[] =
  372. "---\n"
  373. "archs: [ foo ]\n"
  374. "platform: macosx\n"
  375. "install-name: Test.dylib\n"
  376. "...\n";
  377. auto Result = TextAPIReader::get(
  378. MemoryBufferRef(tbd_v1_file_unknown_architecture, "Test.tbd"));
  379. EXPECT_TRUE(!!Result);
  380. }
  381. TEST(TBDv1, UnknownPlatform) {
  382. static const char tbd_v1_file_unknown_platform[] = "---\n"
  383. "archs: [ i386 ]\n"
  384. "platform: newOS\n"
  385. "...\n";
  386. auto Result = TextAPIReader::get(
  387. MemoryBufferRef(tbd_v1_file_unknown_platform, "Test.tbd"));
  388. EXPECT_FALSE(!!Result);
  389. auto errorMessage = toString(Result.takeError());
  390. EXPECT_EQ("malformed file\nTest.tbd:3:11: error: unknown platform\nplatform: "
  391. "newOS\n ^~~~~\n",
  392. errorMessage);
  393. }
  394. TEST(TBDv1, MalformedFile1) {
  395. static const char malformed_file1[] = "---\n"
  396. "archs: [ arm64 ]\n"
  397. "foobar: \"Unsupported key\"\n"
  398. "...\n";
  399. auto Result =
  400. TextAPIReader::get(MemoryBufferRef(malformed_file1, "Test.tbd"));
  401. EXPECT_FALSE(!!Result);
  402. auto errorMessage = toString(Result.takeError());
  403. ASSERT_EQ("malformed file\nTest.tbd:2:1: error: missing required key "
  404. "'platform'\narchs: [ arm64 ]\n^\n",
  405. errorMessage);
  406. }
  407. TEST(TBDv1, MalformedFile2) {
  408. static const char malformed_file2[] = "---\n"
  409. "archs: [ arm64 ]\n"
  410. "platform: ios\n"
  411. "install-name: Test.dylib\n"
  412. "foobar: \"Unsupported key\"\n"
  413. "...\n";
  414. auto Result =
  415. TextAPIReader::get(MemoryBufferRef(malformed_file2, "Test.tbd"));
  416. EXPECT_FALSE(!!Result);
  417. auto errorMessage = toString(Result.takeError());
  418. ASSERT_EQ(
  419. "malformed file\nTest.tbd:5:9: error: unknown key 'foobar'\nfoobar: "
  420. "\"Unsupported key\"\n ^~~~~~~~~~~~~~~~~\n",
  421. errorMessage);
  422. }
  423. } // end namespace TBDv1.