Browse Source

fix(mgb/opr): fix string append error

GitOrigin-RevId: 295a941edd
tags/v1.3.0
Megvii Engine Team 4 years ago
parent
commit
b9bbf802bd
2 changed files with 4 additions and 2 deletions
  1. +1
    -1
      src/core/include/megbrain/utils/metahelper.h
  2. +3
    -1
      src/plugin/test/opr_io_dump.cpp

+ 1
- 1
src/core/include/megbrain/utils/metahelper.h View File

@@ -122,7 +122,7 @@ class DynTypeObj {
//! get class name from class object
#define _MGB_TYPEINFO_CLASS_NAME(_cls) #_cls
#else
#define _MGB_TYPEINFO_CLASS_NAME(_cls) nullptr
#define _MGB_TYPEINFO_CLASS_NAME(_cls) ""
#endif

//! put in the impl file of a class that needs static typeinfo()


+ 3
- 1
src/plugin/test/opr_io_dump.cpp View File

@@ -147,7 +147,7 @@ std::vector<std::string> getlines(std::istream& inp, size_t skip_head = 0) {
}

} // anonymous namespace
#if MGB_VERBOSE_TYPEINFO_NAME
TEST(TestOprIODump, Text) {
auto fname_base = output_file("test_opr_iodump");
std::array<std::string, 3> fnames;
@@ -180,8 +180,10 @@ TEST(TestOprIODump, Text) {

run_test(make_plugin, check_result);
}
#endif

TEST(TestOprIODump, StdErr) {
MGB_MARK_USED_VAR(EXPECTED_TEXT_OUT_REC);
HostTensorGenerator<> gen;
auto host_x = gen({5});
auto host_y = gen({5});


Loading…
Cancel
Save