Skip to content

Commit

Permalink
Fix build failures for Windows.
Browse files Browse the repository at this point in the history
* Fixed the unused error in process_watch_dog_test.cc
* Fixed the non-virtual destructor error in com_inplements_test.cc

#codehealth

PiperOrigin-RevId: 725105920
  • Loading branch information
hiroyuki-komatsu committed Feb 10, 2025
1 parent 9979b63 commit 0a14384
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
22 changes: 17 additions & 5 deletions src/base/win32/com_implements_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,31 @@ namespace {

// Mock interfaces for testing.
MIDL_INTERFACE("A03A80F4-9254-4C8B-AF25-0674FCED18E5")
IMock1 : public IUnknown { STDMETHOD(Test1)() = 0; };
IMock1 : public IUnknown {
virtual ~IMock1() = default;
STDMETHOD(Test1)() = 0;
};

MIDL_INTERFACE("863EF391-8485-4257-8423-8D919D1AE8DC")
IMock2 : public IUnknown { STDMETHOD(Test2)() = 0; };
IMock2 : public IUnknown {
virtual ~IMock2() = default;
STDMETHOD(Test2)() = 0;
};

MIDL_INTERFACE("7CC0C082-8CA5-4A87-97C4-4FC14FBCE0B3")
IDerived : public IMock1 { STDMETHOD(Derived()) = 0; };
IDerived : public IMock1 {
virtual ~IDerived() = default;
STDMETHOD(Derived()) = 0;
};

MIDL_INTERFACE("F2B8DCC5-226C-4123-8F78-2BC36B574629")
IDerivedDerived : public IDerived{};
IDerivedDerived : public IDerived { virtual ~IDerivedDerived() = default; };

MIDL_INTERFACE("9C1A7121-BF54-4826-856E-55A90864EE64")
IRefCount : public IUnknown { STDMETHOD_(ULONG, RefCount)() = 0; };
IRefCount : public IUnknown {
virtual ~IRefCount() = default;
STDMETHOD_(ULONG, RefCount)() = 0;
};

} // namespace

Expand Down
3 changes: 1 addition & 2 deletions src/ipc/process_watch_dog_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@
namespace mozc {

TEST(ProcessWatchDog, ProcessWatchDogTest) {
absl::Time start = absl::Now();

#ifndef _WIN32
absl::Time start = absl::Now();
// revoke myself with different parameter
pid_t pid = fork();
if (pid == 0) {
Expand Down

0 comments on commit 0a14384

Please sign in to comment.