proc_ut.cpp 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #include "../pg_compat.h"
  2. extern "C" {
  3. #include <yql/essentials/parser/pg_wrapper/postgresql/src/include/postgres.h>
  4. #include <yql/essentials/parser/pg_wrapper/postgresql/src/include/c.h>
  5. #include <yql/essentials/parser/pg_wrapper/postgresql/src/include/fmgr.h>
  6. #include <yql/essentials/parser/pg_wrapper/postgresql/src/include/varatt.h>
  7. }
  8. #include <yql/essentials/parser/pg_catalog/catalog.h>
  9. #include <yql/essentials/parser/pg_wrapper/utils.h>
  10. #include <library/cpp/testing/unittest/registar.h>
  11. namespace NYql {
  12. Y_UNIT_TEST_SUITE(TProcTests) {
  13. Y_UNIT_TEST(BuiltinsHasRuntimeFuncs) {
  14. if (NPg::AreAllFunctionsAllowed()) {
  15. return;
  16. }
  17. NPg::EnumProc([](ui32 oid, const NPg::TProcDesc& desc) {
  18. if (desc.ExtensionIndex == 0 && desc.Kind == NPg::EProcKind::Function &&
  19. desc.Lang == NPg::LangInternal) {
  20. FmgrInfo finfo;
  21. UNIT_ASSERT(GetPgFuncAddr(oid, finfo));
  22. UNIT_ASSERT(finfo.fn_addr);
  23. }
  24. });
  25. }
  26. }
  27. }