Bug 1545306 - Add some tests for using moveonly. r=nika
authorAndrew McCreight <continuation@gmail.com>
Tue, 23 Apr 2019 21:57:48 +0000
changeset 470570 f6c7072bff79d93ecfe9f568d54e603622a74e1f
parent 470569 179c0370dfa12b59d2214509d41a8356962f5df7
child 470571 ab21aa4e92f6063ccc9b51a725ce49e2040055af
push id35908
push useraciure@mozilla.com
push dateWed, 24 Apr 2019 04:28:40 +0000
treeherdermozilla-central@c9f0730a57a6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnika
bugs1545306
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1545306 - Add some tests for using moveonly. r=nika Differential Revision: https://phabricator.services.mozilla.com/D28562
ipc/ipdl/test/ipdl/error/PInconsistentMoveOnly.ipdl
ipc/ipdl/test/ipdl/ok/PbasicUsing.ipdl
new file mode 100644
--- /dev/null
+++ b/ipc/ipdl/test/ipdl/error/PInconsistentMoveOnly.ipdl
@@ -0,0 +1,9 @@
+//error: inconsistent moveonly status of type `mozilla::ipc::SomeMoveonlyType`
+
+using moveonly class mozilla::ipc::SomeMoveonlyType from "SomeFile.h";
+using class mozilla::ipc::SomeMoveonlyType from "SomeFile.h";
+
+protocol PInconsistentMoveOnly {
+child:
+  async SomeMessage();
+};
--- a/ipc/ipdl/test/ipdl/ok/PbasicUsing.ipdl
+++ b/ipc/ipdl/test/ipdl/ok/PbasicUsing.ipdl
@@ -1,22 +1,36 @@
 using SomeType from "SomeFile.h";
 using class SomeClass from "SomeFile.h";
 using struct SomeStruct from "SomeFile.h";
 
 using refcounted SomeRefcountedType from "SomeFile.h";
 using refcounted class SomeRefcountedClass from "SomeFile.h";
 using refcounted struct SomeRefcountedStruct from "SomeFile.h";
 
+using moveonly SomeMoveonlyType from "SomeFile.h";
+using moveonly class SomeMoveonlyClass from "SomeFile.h";
+using moveonly struct SomeMoveonlyStruct from "SomeFile.h";
+
+using refcounted moveonly SomeRefcountedMoveonlyType from "SomeFile.h";
+using refcounted moveonly class SomeRefcountedMoveonlyClass from "SomeFile.h";
+using refcounted moveonly struct SomeRefcountedMoveonlyStruct from "SomeFile.h";
+
 union SomeUnion
 {
   SomeType;
   SomeClass;
   SomeStruct;
   SomeRefcountedType;
   SomeRefcountedClass;
   SomeRefcountedStruct;
+  SomeMoveonlyType;
+  SomeMoveonlyClass;
+  SomeMoveonlyStruct;
+  SomeRefcountedMoveonlyType;
+  SomeRefcountedMoveonlyClass;
+  SomeRefcountedMoveonlyStruct;
 };
 
 protocol PbasicUsing {
 child:
     async Msg(SomeUnion foo);
 };