mirror of
https://github.com/luau-lang/luau.git
synced 2025-01-19 17:28:06 +00:00
try to disable self-move warning
This commit is contained in:
parent
912798e5c7
commit
afa4fa601e
1 changed files with 2 additions and 0 deletions
|
@ -177,10 +177,12 @@ TEST_CASE("NativeModuleRefRefcounting")
|
||||||
|
|
||||||
// NativeModuleRef self move assignment:
|
// NativeModuleRef self move assignment:
|
||||||
{
|
{
|
||||||
|
#pragma warning(push, 0)
|
||||||
NativeModuleRef modRef1{modRefA};
|
NativeModuleRef modRef1{modRefA};
|
||||||
modRef1 = std::move(modRef1);
|
modRef1 = std::move(modRef1);
|
||||||
REQUIRE(modRef1.get() == modRefA.get());
|
REQUIRE(modRef1.get() == modRefA.get());
|
||||||
REQUIRE(modRefA->getRefcount() == 2);
|
REQUIRE(modRefA->getRefcount() == 2);
|
||||||
|
#pragma warning(pop)
|
||||||
}
|
}
|
||||||
|
|
||||||
REQUIRE(modRefA->getRefcount() == 1);
|
REQUIRE(modRefA->getRefcount() == 1);
|
||||||
|
|
Loading…
Reference in a new issue