diff options
Diffstat (limited to 'ipc/ipdl/test/ipdl/error')
99 files changed, 833 insertions, 0 deletions
diff --git a/ipc/ipdl/test/ipdl/error/AsyncCtorReturns.ipdl b/ipc/ipdl/test/ipdl/error/AsyncCtorReturns.ipdl new file mode 100644 index 0000000000..831d4d1159 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/AsyncCtorReturns.ipdl @@ -0,0 +1,10 @@ +//error: asynchronous ctor/dtor message `AsyncCtorReturnsManageeConstructor' declares return values + +include protocol AsyncCtorReturnsManagee; + +protocol AsyncCtorReturns { + manages AsyncCtorReturnsManagee; + +child: + async AsyncCtorReturnsManagee() returns (bool unused); +}; diff --git a/ipc/ipdl/test/ipdl/error/AsyncCtorReturnsManagee.ipdl b/ipc/ipdl/test/ipdl/error/AsyncCtorReturnsManagee.ipdl new file mode 100644 index 0000000000..f38e2bd0ea --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/AsyncCtorReturnsManagee.ipdl @@ -0,0 +1,10 @@ +//error: asynchronous ctor/dtor message `AsyncCtorReturnsManageeConstructor' declares return values + +include protocol AsyncCtorReturns; + +protocol AsyncCtorReturnsManagee { + manager AsyncCtorReturns; + +parent: + async __delete__(); +}; diff --git a/ipc/ipdl/test/ipdl/error/AsyncInsideSync.ipdl b/ipc/ipdl/test/ipdl/error/AsyncInsideSync.ipdl new file mode 100644 index 0000000000..d2fa481e7f --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/AsyncInsideSync.ipdl @@ -0,0 +1,9 @@ +// inside_sync nested messages must be sync + +//error: inside_sync nested messages must be sync (here, message `Msg' in protocol `AsyncInsideSync') +//error: message `Msg' requires more powerful send semantics than its protocol `AsyncInsideSync' provides + +protocol AsyncInsideSync { +child: + [Nested=inside_sync] async Msg(); +}; diff --git a/ipc/ipdl/test/ipdl/error/ExtendedAttrBadValue.ipdlh b/ipc/ipdl/test/ipdl/error/ExtendedAttrBadValue.ipdlh new file mode 100644 index 0000000000..880bf54179 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/ExtendedAttrBadValue.ipdlh @@ -0,0 +1,5 @@ +//error: unexpected value for valueless attribute `RefCounted' + +[RefCounted=Invalid] using SomeType from "SomeFile.h"; + +struct ExtendedAttrBadValue {};
\ No newline at end of file diff --git a/ipc/ipdl/test/ipdl/error/ExtendedAttrEmpty.ipdlh b/ipc/ipdl/test/ipdl/error/ExtendedAttrEmpty.ipdlh new file mode 100644 index 0000000000..625bedc58a --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/ExtendedAttrEmpty.ipdlh @@ -0,0 +1,5 @@ +//error: bad syntax near `]' + +[ ] using SomeType from "SomeFile.h"; + +struct ExtendedAttrEmpty {}; diff --git a/ipc/ipdl/test/ipdl/error/ExtendedAttrInvalidNestedValue.ipdl b/ipc/ipdl/test/ipdl/error/ExtendedAttrInvalidNestedValue.ipdl new file mode 100644 index 0000000000..e58d5d5533 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/ExtendedAttrInvalidNestedValue.ipdl @@ -0,0 +1,6 @@ +//error: invalid value for attribute `Nested', expected one of: not, inside_sync, inside_cpow + +protocol ExtendedAttrInvalidNestedValue { +child: + [Nested=invalid] async __delete__(); +}; diff --git a/ipc/ipdl/test/ipdl/error/ExtendedAttrInvalidPriorityValue.ipdl b/ipc/ipdl/test/ipdl/error/ExtendedAttrInvalidPriorityValue.ipdl new file mode 100644 index 0000000000..7625a85e13 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/ExtendedAttrInvalidPriorityValue.ipdl @@ -0,0 +1,6 @@ +//error: invalid value for attribute `Priority', expected one of: normal, input, vsync, mediumhigh, control + +protocol ExtendedAttrInvalidPriorityValue { +child: + [Priority=invalid] async __delete__(); +}; diff --git a/ipc/ipdl/test/ipdl/error/ExtendedAttrRepeated.ipdlh b/ipc/ipdl/test/ipdl/error/ExtendedAttrRepeated.ipdlh new file mode 100644 index 0000000000..33defc8ca4 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/ExtendedAttrRepeated.ipdlh @@ -0,0 +1,5 @@ +//error: Repeated extended attribute `RefCounted' + +[RefCounted, RefCounted] using SomeType from "SomeFile.h"; + +struct ExtendedAttrRepeated {}; diff --git a/ipc/ipdl/test/ipdl/error/ExtendedAttrUnknown.ipdlh b/ipc/ipdl/test/ipdl/error/ExtendedAttrUnknown.ipdlh new file mode 100644 index 0000000000..c41e91008f --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/ExtendedAttrUnknown.ipdlh @@ -0,0 +1,5 @@ +//error: unknown attribute `InvalidAttribute' + +[InvalidAttribute] using SomeType from "SomeFile.h"; + +struct ExtendedAttrUnknown {}; diff --git a/ipc/ipdl/test/ipdl/error/ForgottenManagee.ipdl b/ipc/ipdl/test/ipdl/error/ForgottenManagee.ipdl new file mode 100644 index 0000000000..35f6f02e4d --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/ForgottenManagee.ipdl @@ -0,0 +1,12 @@ +//error: |manager| declaration in protocol `ForgottenManagee' does not match any |manages| declaration in protocol `ManagerForgot' + +include protocol ManagerForgot; + +// This protocol says ManagerForgot manages it, +// but ManagerForgot does not manage it. + +protocol ForgottenManagee { + manager ManagerForgot; +child: + async __delete__(); +}; diff --git a/ipc/ipdl/test/ipdl/error/ForgottenManager.ipdl b/ipc/ipdl/test/ipdl/error/ForgottenManager.ipdl new file mode 100644 index 0000000000..4335dc8dc7 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/ForgottenManager.ipdl @@ -0,0 +1,11 @@ +//error: |manages| declaration in protocol `ForgottenManager' does not match any |manager| declaration in protocol `ManageeForgot' + +include protocol ManageeForgot; + +// ManageeForgot should have this protocol as its manager. + +protocol ForgottenManager { + manages ManageeForgot; +child: + async ManageeForgot(); +}; diff --git a/ipc/ipdl/test/ipdl/error/InsideCpowToChild.ipdl b/ipc/ipdl/test/ipdl/error/InsideCpowToChild.ipdl new file mode 100644 index 0000000000..4338555952 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/InsideCpowToChild.ipdl @@ -0,0 +1,9 @@ +// inside_cpow nested parent-to-child messages are verboten + +//error: inside_cpow nested parent-to-child messages are verboten (here, message `Msg' in protocol `InsideCpowToChild') +//error: message `Msg' requires more powerful send semantics than its protocol `InsideCpowToChild' provides + +protocol InsideCpowToChild { +child: + [Nested=inside_cpow] sync Msg(); +}; diff --git a/ipc/ipdl/test/ipdl/error/IntrAsyncManagee.ipdl b/ipc/ipdl/test/ipdl/error/IntrAsyncManagee.ipdl new file mode 100644 index 0000000000..527c007ec4 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/IntrAsyncManagee.ipdl @@ -0,0 +1,9 @@ +//error: protocol `IntrAsyncManagee' requires more powerful send semantics than its manager `IntrAsyncManager' provides + +include protocol IntrAsyncManager; + +intr protocol IntrAsyncManagee { + manager IntrAsyncManager; +child: + async __delete__(); +}; diff --git a/ipc/ipdl/test/ipdl/error/IntrAsyncManager.ipdl b/ipc/ipdl/test/ipdl/error/IntrAsyncManager.ipdl new file mode 100644 index 0000000000..7bf413ef61 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/IntrAsyncManager.ipdl @@ -0,0 +1,9 @@ +//error: protocol `IntrAsyncManagee' requires more powerful send semantics than its manager `IntrAsyncManager' provides + +include protocol IntrAsyncManagee; + +async protocol IntrAsyncManager { + manages IntrAsyncManagee; +parent: + async IntrAsyncManagee(); +}; diff --git a/ipc/ipdl/test/ipdl/error/IntrSyncManagee.ipdl b/ipc/ipdl/test/ipdl/error/IntrSyncManagee.ipdl new file mode 100644 index 0000000000..d0b1462e86 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/IntrSyncManagee.ipdl @@ -0,0 +1,9 @@ +//error: protocol `IntrSyncManagee' requires more powerful send semantics than its manager `IntrSyncManager' provides + +include protocol IntrSyncManager; + +intr protocol IntrSyncManagee { + manager IntrSyncManager; +child: + async __delete__(); +}; diff --git a/ipc/ipdl/test/ipdl/error/IntrSyncManager.ipdl b/ipc/ipdl/test/ipdl/error/IntrSyncManager.ipdl new file mode 100644 index 0000000000..80a82ab6d8 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/IntrSyncManager.ipdl @@ -0,0 +1,9 @@ +//error: protocol `IntrSyncManagee' requires more powerful send semantics than its manager `IntrSyncManager' provides + +include protocol IntrSyncManagee; + +sync protocol IntrSyncManager { + manages IntrSyncManagee; +parent: + async IntrSyncManagee(); +}; diff --git a/ipc/ipdl/test/ipdl/error/ManageeForgot.ipdl b/ipc/ipdl/test/ipdl/error/ManageeForgot.ipdl new file mode 100644 index 0000000000..babe2f0658 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/ManageeForgot.ipdl @@ -0,0 +1,11 @@ +//error: |manages| declaration in protocol `ForgottenManager' does not match any |manager| declaration in protocol `ManageeForgot' + +include protocol ForgottenManager; + +// See ForgottenManager. This includes ForgottenManager to ensure that +// loading this file fails. + +protocol ManageeForgot { +child: + async __delete__(); +}; diff --git a/ipc/ipdl/test/ipdl/error/ManagerForgot.ipdl b/ipc/ipdl/test/ipdl/error/ManagerForgot.ipdl new file mode 100644 index 0000000000..00c08ebe87 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/ManagerForgot.ipdl @@ -0,0 +1,11 @@ +//error: |manager| declaration in protocol `ForgottenManagee' does not match any |manages| declaration in protocol `ManagerForgot' + +include protocol ForgottenManagee; + +// See ForgottenManagee.ipdl. This includes ForgottenManagee to +// ensure that loading this file fails. + +protocol ManagerForgot { +child: + async Msg(); +}; diff --git a/ipc/ipdl/test/ipdl/error/Nullable.ipdl b/ipc/ipdl/test/ipdl/error/Nullable.ipdl new file mode 100644 index 0000000000..7761f73646 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/Nullable.ipdl @@ -0,0 +1,6 @@ +//error: `nullable' qualifier for type `int' is unsupported + +protocol PNullable { +child: + async Msg(nullable int i); +}; diff --git a/ipc/ipdl/test/ipdl/error/Nullable2.ipdl b/ipc/ipdl/test/ipdl/error/Nullable2.ipdl new file mode 100644 index 0000000000..8248b7cb7c --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/Nullable2.ipdl @@ -0,0 +1,10 @@ +//error: `nullable' qualifier for type `int' is unsupported + +union Union { + nullable int; +}; + +protocol Nullable2 { +child: + async Msg(Union i); +}; diff --git a/ipc/ipdl/test/ipdl/error/PBadArrayBase.ipdl b/ipc/ipdl/test/ipdl/error/PBadArrayBase.ipdl new file mode 100644 index 0000000000..4afdcb4c8e --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/PBadArrayBase.ipdl @@ -0,0 +1,7 @@ +//error: argument typename `X' of message `Test' has not been declared + +protocol PBadArrayBase { +child: + async Test(X[] x); + async __delete__(); +}; diff --git a/ipc/ipdl/test/ipdl/error/PBadNestedManagee.ipdl b/ipc/ipdl/test/ipdl/error/PBadNestedManagee.ipdl new file mode 100644 index 0000000000..eca24e00d4 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/PBadNestedManagee.ipdl @@ -0,0 +1,9 @@ +//error: protocol `PBadNestedManagee' requires more powerful send semantics than its manager `PBadNestedManager' provides + +include protocol PBadNestedManager; + +[NestedUpTo=inside_sync] async protocol PBadNestedManagee { + manager PBadNestedManager; +child: + async __delete__(); +}; diff --git a/ipc/ipdl/test/ipdl/error/PBadNestedManager.ipdl b/ipc/ipdl/test/ipdl/error/PBadNestedManager.ipdl new file mode 100644 index 0000000000..9fc744f13a --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/PBadNestedManager.ipdl @@ -0,0 +1,9 @@ +//error: protocol `PBadNestedManagee' requires more powerful send semantics than its manager `PBadNestedManager' provides + +include protocol PBadNestedManagee; + +[NestedUpTo=not] async protocol PBadNestedManager { + manages PBadNestedManagee; +parent: + async PBadNestedManagee(); +}; diff --git a/ipc/ipdl/test/ipdl/error/PBadSideImpl.ipdl b/ipc/ipdl/test/ipdl/error/PBadSideImpl.ipdl new file mode 100644 index 0000000000..75aebd4670 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/PBadSideImpl.ipdl @@ -0,0 +1,8 @@ +//error: invalid value for attribute `ParentImpl', expected one of: virtual, StringLiteral +//error: invalid value for attribute `ChildImpl', expected one of: virtual, StringLiteral + +[ParentImpl=NotQuoted, ChildImpl] +async protocol PBadSideImpl { + parent: + async __delete__(); +}; diff --git a/ipc/ipdl/test/ipdl/error/PBadUniquePtrBase.ipdl b/ipc/ipdl/test/ipdl/error/PBadUniquePtrBase.ipdl new file mode 100644 index 0000000000..b93b20742d --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/PBadUniquePtrBase.ipdl @@ -0,0 +1,7 @@ +//error: argument typename `UndeclaredType' of message `Test' has not been declared + +protocol PBadUniquePtrBase { +child: + async Test(UniquePtr<UndeclaredType> x); + async __delete__(); +}; diff --git a/ipc/ipdl/test/ipdl/error/PCompressInvalid.ipdl b/ipc/ipdl/test/ipdl/error/PCompressInvalid.ipdl new file mode 100644 index 0000000000..5ceaaad9ac --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/PCompressInvalid.ipdl @@ -0,0 +1,8 @@ +//error: invalid value for attribute `Compress', expected one of: None, all + +include protocol compressCtor; + +async protocol PCompressInvalid { +child: + [Compress=Invalid] async Message(); +}; diff --git a/ipc/ipdl/test/ipdl/error/PDouble.ipdl b/ipc/ipdl/test/ipdl/error/PDouble.ipdl new file mode 100644 index 0000000000..e08ff1d063 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/PDouble.ipdl @@ -0,0 +1,11 @@ +//error: Trying to load `PDouble' from a file when we'd already seen it in file + +// This will load extra/PDouble.ipdl because extra/ is earlier +// in the list of include directories than the current working +// directory. Loading the same protocol from two files is +// obviously bad. +include protocol PDouble; + +protocol PDouble { +child: async Msg(); +}; diff --git a/ipc/ipdl/test/ipdl/error/PExtendedAttrInvalidValue.ipdl b/ipc/ipdl/test/ipdl/error/PExtendedAttrInvalidValue.ipdl new file mode 100644 index 0000000000..9720acdd41 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/PExtendedAttrInvalidValue.ipdl @@ -0,0 +1,6 @@ +//error: invalid value for attribute `NestedUpTo', expected one of: not, inside_sync, inside_cpow + +[NestedUpTo=invalid] async protocol PExtendedAttrInvalidValue { +parent: + async Msg(); +}; diff --git a/ipc/ipdl/test/ipdl/error/PExtendedAttrRepeated.ipdl b/ipc/ipdl/test/ipdl/error/PExtendedAttrRepeated.ipdl new file mode 100644 index 0000000000..e33411a877 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/PExtendedAttrRepeated.ipdl @@ -0,0 +1,6 @@ +//error: Repeated extended attribute `RefCounted' + +[RefCounted, RefCounted] async protocol PExtendedAttrRepeated { +parent: + async Msg(); +}; diff --git a/ipc/ipdl/test/ipdl/error/PExtendedAttrUnexpectedValue.ipdl b/ipc/ipdl/test/ipdl/error/PExtendedAttrUnexpectedValue.ipdl new file mode 100644 index 0000000000..de1d81c0eb --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/PExtendedAttrUnexpectedValue.ipdl @@ -0,0 +1,6 @@ +//error: unexpected value for valueless attribute `ManualDealloc' + +[ManualDealloc=invalid] async protocol PExtendedAttrUnexpectedValue { +parent: + async Msg(); +}; diff --git a/ipc/ipdl/test/ipdl/error/PExtendedAttrUnknownAttribute.ipdl b/ipc/ipdl/test/ipdl/error/PExtendedAttrUnknownAttribute.ipdl new file mode 100644 index 0000000000..414763efdd --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/PExtendedAttrUnknownAttribute.ipdl @@ -0,0 +1,6 @@ +//error: unknown attribute `InvalidAttr' + +[InvalidAttr] async protocol PExtendedAttrUnknownValue { +parent: + async Msg(); +}; diff --git a/ipc/ipdl/test/ipdl/error/PInconsistentMoveOnly.ipdl b/ipc/ipdl/test/ipdl/error/PInconsistentMoveOnly.ipdl new file mode 100644 index 0000000000..4e88a82050 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/PInconsistentMoveOnly.ipdl @@ -0,0 +1,13 @@ +//error: inconsistent moveonly status of type `::mozilla::ipc::SomeMoveonlyType` +//error: inconsistent moveonly status of type `::mozilla::ipc::SomeMoveonlySendType` + +[MoveOnly] using class mozilla::ipc::SomeMoveonlyType from "SomeFile.h"; +using class mozilla::ipc::SomeMoveonlyType from "SomeFile.h"; + +[MoveOnly=send] using class mozilla::ipc::SomeMoveonlySendType from "SomeFile.h"; +[MoveOnly=data] using class mozilla::ipc::SomeMoveonlySendType from "SomeFile.h"; + +protocol PInconsistentMoveOnly { +child: + async SomeMessage(); +}; diff --git a/ipc/ipdl/test/ipdl/error/PIntrNested.ipdl b/ipc/ipdl/test/ipdl/error/PIntrNested.ipdl new file mode 100644 index 0000000000..948cdc1118 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/PIntrNested.ipdl @@ -0,0 +1,6 @@ +//error: intr message `Msg' cannot specify [Nested] + +intr protocol PIntrNested { +child: + [Nested=inside_sync, LegacyIntr] intr Msg(); +}; diff --git a/ipc/ipdl/test/ipdl/error/PIntrNestedProtocol.ipdl b/ipc/ipdl/test/ipdl/error/PIntrNestedProtocol.ipdl new file mode 100644 index 0000000000..4267bf7a84 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/PIntrNestedProtocol.ipdl @@ -0,0 +1,6 @@ +//error: intr protocol `PIntrNestedProtocol' cannot specify [NestedUpTo] + +[NestedUpTo=inside_sync] intr protocol PIntrNestedProtocol { +child: + [LegacyIntr] intr Msg(); +}; diff --git a/ipc/ipdl/test/ipdl/error/PIntrPriority.ipdl b/ipc/ipdl/test/ipdl/error/PIntrPriority.ipdl new file mode 100644 index 0000000000..5bc539983a --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/PIntrPriority.ipdl @@ -0,0 +1,6 @@ +//error: intr message `Msg' cannot specify [Priority] + +intr protocol PIntrPriority { +child: + [Priority=vsync, LegacyIntr] intr Msg(); +}; diff --git a/ipc/ipdl/test/ipdl/error/PLazySendInvalid.ipdl b/ipc/ipdl/test/ipdl/error/PLazySendInvalid.ipdl new file mode 100644 index 0000000000..282a007add --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/PLazySendInvalid.ipdl @@ -0,0 +1,6 @@ +//error: unexpected value for valueless attribute `LazySend' + +async protocol PLazySendInvalid { +child: + [LazySend=Invalid] async Message(); +}; diff --git a/ipc/ipdl/test/ipdl/error/PLazySendSync.ipdl b/ipc/ipdl/test/ipdl/error/PLazySendSync.ipdl new file mode 100644 index 0000000000..308b734fe5 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/PLazySendSync.ipdl @@ -0,0 +1,6 @@ +//error: non-async message `Message' cannot specify [LazySend] + +sync protocol PLazySendSync { +child: + [LazySend] sync Message() returns (bool ok); +}; diff --git a/ipc/ipdl/test/ipdl/error/PNoTaintWithoutTainted.ipdl b/ipc/ipdl/test/ipdl/error/PNoTaintWithoutTainted.ipdl new file mode 100644 index 0000000000..cfdde1f02c --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/PNoTaintWithoutTainted.ipdl @@ -0,0 +1,6 @@ +//error: argument typename `int' of message `foo' has a NoTaint attribute, but the message lacks the Tainted attribute + +intr protocol PNoTaintWithoutTainted { +child: + async foo([NoTaint=passback] int id); +}; diff --git a/ipc/ipdl/test/ipdl/error/PToplevelManualDealloc.ipdl b/ipc/ipdl/test/ipdl/error/PToplevelManualDealloc.ipdl new file mode 100644 index 0000000000..97822b65bd --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/PToplevelManualDealloc.ipdl @@ -0,0 +1,6 @@ +//error: Toplevel protocols cannot be [ManualDealloc] + +[ManualDealloc] async protocol PToplevelManualDealloc { +child: + async __delete__(); +}; diff --git a/ipc/ipdl/test/ipdl/error/PUniquePtrRecursive.ipdl b/ipc/ipdl/test/ipdl/error/PUniquePtrRecursive.ipdl new file mode 100644 index 0000000000..83c9459ec6 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/PUniquePtrRecursive.ipdl @@ -0,0 +1,5 @@ +//error: bad syntax near `UniquePtr' + +protocol PUniquePtrRecursive { +child: async Msg( UniquePtr< UniquePtr<int> > aa); +}; diff --git a/ipc/ipdl/test/ipdl/error/PUniquePtrSelfRecStruct.ipdl b/ipc/ipdl/test/ipdl/error/PUniquePtrSelfRecStruct.ipdl new file mode 100644 index 0000000000..c9a54b22b2 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/PUniquePtrSelfRecStruct.ipdl @@ -0,0 +1,9 @@ +//error: struct `X' is only partially defined + +struct X { + UniquePtr<X> x; +}; + +protocol PUniquePtrSelfRecStruct { +child: async Msg(UniquePtr<X> aa); +}; diff --git a/ipc/ipdl/test/ipdl/error/PUniquePtrSelfRecUnion.ipdl b/ipc/ipdl/test/ipdl/error/PUniquePtrSelfRecUnion.ipdl new file mode 100644 index 0000000000..5dba38263f --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/PUniquePtrSelfRecUnion.ipdl @@ -0,0 +1,7 @@ +//error: union `X' is only partially defined + +union X { UniquePtr<X>; }; + +protocol PUniquePtrSelfRecUnion { +child: async Msg(UniquePtr<X> aa); +}; diff --git a/ipc/ipdl/test/ipdl/error/PasyncMessageListed.ipdl b/ipc/ipdl/test/ipdl/error/PasyncMessageListed.ipdl new file mode 100644 index 0000000000..6a3cdad0ee --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/PasyncMessageListed.ipdl @@ -0,0 +1,6 @@ +//error: IPC message PasyncMessageListed::Msg is async, can be delisted + +protocol PasyncMessageListed { +parent: + async Msg(); +}; diff --git a/ipc/ipdl/test/ipdl/error/ReplyPrioWithoutReturns.ipdl b/ipc/ipdl/test/ipdl/error/ReplyPrioWithoutReturns.ipdl new file mode 100644 index 0000000000..0d1cd51217 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/ReplyPrioWithoutReturns.ipdl @@ -0,0 +1,6 @@ +//error: non-returns message `NormalPrio' cannot specify [ReplyPriority] +async protocol ReplyPrioWithoutReturns +{ +child: + [ReplyPriority=normal] async NormalPrio(); +}; diff --git a/ipc/ipdl/test/ipdl/error/SyncAsyncManagee.ipdl b/ipc/ipdl/test/ipdl/error/SyncAsyncManagee.ipdl new file mode 100644 index 0000000000..166881ae1e --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/SyncAsyncManagee.ipdl @@ -0,0 +1,9 @@ +//error: protocol `SyncAsyncManagee' requires more powerful send semantics than its manager `SyncAsyncManager' provides + +include protocol SyncAsyncManager; + +sync protocol SyncAsyncManagee { + manager SyncAsyncManager; +child: + async __delete__(); +}; diff --git a/ipc/ipdl/test/ipdl/error/SyncAsyncManager.ipdl b/ipc/ipdl/test/ipdl/error/SyncAsyncManager.ipdl new file mode 100644 index 0000000000..9dbc7a6318 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/SyncAsyncManager.ipdl @@ -0,0 +1,9 @@ +//error: protocol `SyncAsyncManagee' requires more powerful send semantics than its manager `SyncAsyncManager' provides + +include protocol SyncAsyncManagee; + +async protocol SyncAsyncManager { + manages SyncAsyncManagee; +parent: + async SyncAsyncManagee(); +}; diff --git a/ipc/ipdl/test/ipdl/error/SyncPrio.ipdl b/ipc/ipdl/test/ipdl/error/SyncPrio.ipdl new file mode 100644 index 0000000000..cbf833b620 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/SyncPrio.ipdl @@ -0,0 +1,6 @@ +//error: non-async message `NormalPrio' cannot specify [ReplyPriority] +sync protocol SyncPrio +{ +child: + [ReplyPriority=normal] sync NormalPrio() returns (bool aValue); +}; diff --git a/ipc/ipdl/test/ipdl/error/array_Recursive.ipdl b/ipc/ipdl/test/ipdl/error/array_Recursive.ipdl new file mode 100644 index 0000000000..f5027e2299 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/array_Recursive.ipdl @@ -0,0 +1,5 @@ +//error: bad syntax near `[' + +protocol array_Recursive { +child: async Msg(int[][] aa); +}; diff --git a/ipc/ipdl/test/ipdl/error/badProtocolInclude.ipdl b/ipc/ipdl/test/ipdl/error/badProtocolInclude.ipdl new file mode 100644 index 0000000000..3f82bef9b2 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/badProtocolInclude.ipdl @@ -0,0 +1,9 @@ +//error: can't locate include file `IDONTEXIST.ipdl' + +include protocol IDONTEXIST; + +// error: nonexistent protocol ^^^ + +protocol badProtocolInclude { +child: async Msg(); +}; diff --git a/ipc/ipdl/test/ipdl/error/compressCtor.ipdl b/ipc/ipdl/test/ipdl/error/compressCtor.ipdl new file mode 100644 index 0000000000..9db05d495d --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/compressCtor.ipdl @@ -0,0 +1,11 @@ +//error: destructor messages can't use compression (here, in protocol `compressCtorManagee') +//error: constructor messages can't use compression (here, in protocol `compressCtor') + +include protocol compressCtorManagee; + +intr protocol compressCtor { + manages compressCtorManagee; + +parent: + [Compress] async compressCtorManagee(); +}; diff --git a/ipc/ipdl/test/ipdl/error/compressCtorManagee.ipdl b/ipc/ipdl/test/ipdl/error/compressCtorManagee.ipdl new file mode 100644 index 0000000000..52ec2cc1cd --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/compressCtorManagee.ipdl @@ -0,0 +1,11 @@ +//error: constructor messages can't use compression (here, in protocol `compressCtor') +//error: destructor messages can't use compression (here, in protocol `compressCtorManagee') + +include protocol compressCtor; + +intr protocol compressCtorManagee { + manager compressCtor; + +child: + [Compress] async __delete__(); +}; diff --git a/ipc/ipdl/test/ipdl/error/conflictProtocolMsg.ipdl b/ipc/ipdl/test/ipdl/error/conflictProtocolMsg.ipdl new file mode 100644 index 0000000000..b223dab783 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/conflictProtocolMsg.ipdl @@ -0,0 +1,9 @@ +//error: ctor for protocol `conflictProtocolMsg', which is not managed by protocol `conflictProtocolMsg' + +protocol conflictProtocolMsg { + + // it's an error to re-use the protocol name as a message ID; these + // are reserved +child: async conflictProtocolMsg(); + +}; diff --git a/ipc/ipdl/test/ipdl/error/cyclecheck_Child.ipdl b/ipc/ipdl/test/ipdl/error/cyclecheck_Child.ipdl new file mode 100644 index 0000000000..dd27586d8b --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/cyclecheck_Child.ipdl @@ -0,0 +1,15 @@ +//error: cycle(s) detected in manager/manages hierarchy: `cyclecheck_Parent -> cyclecheck_Child -> cyclecheck_Grandchild -> cyclecheck_Parent' +//error: |manages| declaration in protocol `cyclecheck_Grandchild' does not match any |manager| declaration in protocol `cyclecheck_Parent' + +include protocol cyclecheck_Parent; +include protocol cyclecheck_Grandchild; + +protocol cyclecheck_Child { + manager cyclecheck_Parent; + manages cyclecheck_Grandchild; + +child: + async cyclecheck_Grandchild(); + async __delete__(); +}; + diff --git a/ipc/ipdl/test/ipdl/error/cyclecheck_Grandchild.ipdl b/ipc/ipdl/test/ipdl/error/cyclecheck_Grandchild.ipdl new file mode 100644 index 0000000000..9152a56a16 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/cyclecheck_Grandchild.ipdl @@ -0,0 +1,15 @@ +//error: cycle(s) detected in manager/manages hierarchy: `cyclecheck_Parent -> cyclecheck_Child -> cyclecheck_Grandchild -> cyclecheck_Parent' +//error: |manages| declaration in protocol `cyclecheck_Grandchild' does not match any |manager| declaration in protocol `cyclecheck_Parent' + +include protocol cyclecheck_Child; +include protocol cyclecheck_Parent; + +protocol cyclecheck_Grandchild { + manager cyclecheck_Child; + manages cyclecheck_Parent; + +child: + async cyclecheck_Parent(); + async __delete__(); +}; + diff --git a/ipc/ipdl/test/ipdl/error/cyclecheck_Parent.ipdl b/ipc/ipdl/test/ipdl/error/cyclecheck_Parent.ipdl new file mode 100644 index 0000000000..f2eb060641 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/cyclecheck_Parent.ipdl @@ -0,0 +1,12 @@ +//error: cycle(s) detected in manager/manages hierarchy: `cyclecheck_Parent -> cyclecheck_Child -> cyclecheck_Grandchild -> cyclecheck_Parent' + +include protocol cyclecheck_Child; + +protocol cyclecheck_Parent { + manages cyclecheck_Child; + +child: + async cyclecheck_Child(); + async __delete__(); +}; + diff --git a/ipc/ipdl/test/ipdl/error/dtorReserved.ipdl b/ipc/ipdl/test/ipdl/error/dtorReserved.ipdl new file mode 100644 index 0000000000..51833489be --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/dtorReserved.ipdl @@ -0,0 +1,10 @@ +//error: lexically invalid characters `~SomeMsg(); + +protocol dtorReserved { + + // it's an error to use old-style dtor syntax + +child: + ~SomeMsg(); + +}; diff --git a/ipc/ipdl/test/ipdl/error/empty.ipdl b/ipc/ipdl/test/ipdl/error/empty.ipdl new file mode 100644 index 0000000000..c6249c280b --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/empty.ipdl @@ -0,0 +1 @@ +//error: bad syntax near `???'
\ No newline at end of file diff --git a/ipc/ipdl/test/ipdl/error/extra/PDouble.ipdl b/ipc/ipdl/test/ipdl/error/extra/PDouble.ipdl new file mode 100644 index 0000000000..2efae8fff4 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/extra/PDouble.ipdl @@ -0,0 +1,5 @@ +// This is a valid file. + +protocol PDouble { +child: async Msg(); +}; diff --git a/ipc/ipdl/test/ipdl/error/inconsistentRC.ipdl b/ipc/ipdl/test/ipdl/error/inconsistentRC.ipdl new file mode 100644 index 0000000000..ee1375c312 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/inconsistentRC.ipdl @@ -0,0 +1,9 @@ +//error: inconsistent refcounted status of type `::mozilla::ipc::SomeRefcountedType` + +[RefCounted] using class mozilla::ipc::SomeRefcountedType from "SomeFile.h"; +using class mozilla::ipc::SomeRefcountedType from "SomeFile.h"; + +protocol inconsistentRC { +child: + async SomeMessage(); +}; diff --git a/ipc/ipdl/test/ipdl/error/intrMessageCompress.ipdl b/ipc/ipdl/test/ipdl/error/intrMessageCompress.ipdl new file mode 100644 index 0000000000..49bd5d4721 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/intrMessageCompress.ipdl @@ -0,0 +1,9 @@ +//error: message `foo' in protocol `intrMessageCompress' requests compression but is not async +//error: message `bar' in protocol `intrMessageCompress' requests compression but is not async + +intr protocol intrMessageCompress { +parent: + [Compress, LegacyIntr] intr foo(); +child: + [Compress, LegacyIntr] intr bar(); +}; diff --git a/ipc/ipdl/test/ipdl/error/lex1.ipdl b/ipc/ipdl/test/ipdl/error/lex1.ipdl new file mode 100644 index 0000000000..a00629cbca --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/lex1.ipdl @@ -0,0 +1,2 @@ +//error: bad syntax near `slkdjfl' +slkdjfl*&^* diff --git a/ipc/ipdl/test/ipdl/error/manageSelfToplevel.ipdl b/ipc/ipdl/test/ipdl/error/manageSelfToplevel.ipdl new file mode 100644 index 0000000000..4540c2c2f6 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/manageSelfToplevel.ipdl @@ -0,0 +1,10 @@ +//error: top-level protocol `manageSelfToplevel' cannot manage itself + +protocol manageSelfToplevel { + manager manageSelfToplevel; + manages manageSelfToplevel; + +child: + async manageSelfToplevel(); + async __delete__(); +}; diff --git a/ipc/ipdl/test/ipdl/error/managedNoDtor.ipdl b/ipc/ipdl/test/ipdl/error/managedNoDtor.ipdl new file mode 100644 index 0000000000..41bbd76689 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/managedNoDtor.ipdl @@ -0,0 +1,7 @@ +//error: destructor declaration `__delete__(...)' required for managed protocol `managedNoDtor' +include protocol managerNoDtor; + +protocol managedNoDtor { + manager managerNoDtor; + // empty +}; diff --git a/ipc/ipdl/test/ipdl/error/managerNoDtor.ipdl b/ipc/ipdl/test/ipdl/error/managerNoDtor.ipdl new file mode 100644 index 0000000000..0417cc5ace --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/managerNoDtor.ipdl @@ -0,0 +1,11 @@ +//error: destructor declaration `__delete__(...)' required for managed protocol `managedNoDtor' + +include protocol managedNoDtor; + +protocol managerNoDtor { + manages managedNoDtor; + +parent: + async managedNoDtor(); + // error: no ctor defined +}; diff --git a/ipc/ipdl/test/ipdl/error/maybe_Recursive.ipdl b/ipc/ipdl/test/ipdl/error/maybe_Recursive.ipdl new file mode 100644 index 0000000000..b039924199 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/maybe_Recursive.ipdl @@ -0,0 +1,5 @@ +//error: bad syntax near `?' + +protocol maybe_Recursive { +child: async Msg(int?? aa); +}; diff --git a/ipc/ipdl/test/ipdl/error/maybe_SelfRecStruct.ipdl b/ipc/ipdl/test/ipdl/error/maybe_SelfRecStruct.ipdl new file mode 100644 index 0000000000..a13cdc3647 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/maybe_SelfRecStruct.ipdl @@ -0,0 +1,9 @@ +//error: struct `X' is only partially defined + +struct X { + X? x; +}; + +protocol maybe_SelfRecStruct { +child: async Msg(X? aa); +}; diff --git a/ipc/ipdl/test/ipdl/error/maybe_SelfRecUnion.ipdl b/ipc/ipdl/test/ipdl/error/maybe_SelfRecUnion.ipdl new file mode 100644 index 0000000000..3cd5cde22a --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/maybe_SelfRecUnion.ipdl @@ -0,0 +1,7 @@ +//error: union `X' is only partially defined + +union X { X?; }; + +protocol maybe_SelfRecUnion { +child: async Msg(X? aa); +}; diff --git a/ipc/ipdl/test/ipdl/error/messageNoDirection.ipdl b/ipc/ipdl/test/ipdl/error/messageNoDirection.ipdl new file mode 100644 index 0000000000..199bb089c3 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/messageNoDirection.ipdl @@ -0,0 +1,5 @@ +//error: missing message direction + +protocol messageNoDirection { + async NoDirection(); +}; diff --git a/ipc/ipdl/test/ipdl/error/multimanDupMgrs.ipdl b/ipc/ipdl/test/ipdl/error/multimanDupMgrs.ipdl new file mode 100644 index 0000000000..805a9f905e --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/multimanDupMgrs.ipdl @@ -0,0 +1,10 @@ +//error: manager `multimanDupMgrsMgr' appears multiple times + +include protocol multimanDupMgrsMgr; + +protocol multimanDupMgrs { + manager multimanDupMgrsMgr or multimanDupMgrsMgr; + +child: + async __delete__(); +}; diff --git a/ipc/ipdl/test/ipdl/error/multimanDupMgrsMgr.ipdl b/ipc/ipdl/test/ipdl/error/multimanDupMgrsMgr.ipdl new file mode 100644 index 0000000000..ff96fe91a3 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/multimanDupMgrsMgr.ipdl @@ -0,0 +1,11 @@ +//error: manager `multimanDupMgrsMgr' appears multiple times + +include protocol multimanDupMgrs; + +protocol multimanDupMgrsMgr { + manages multimanDupMgrs; + +child: + async multimanDupMgrs(); + async __delete__(); +}; diff --git a/ipc/ipdl/test/ipdl/error/multimanNonexistentMgrs.ipdl b/ipc/ipdl/test/ipdl/error/multimanNonexistentMgrs.ipdl new file mode 100644 index 0000000000..24dafb8163 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/multimanNonexistentMgrs.ipdl @@ -0,0 +1,10 @@ +//error: protocol `Starsky' referenced as |manager| of `multimanNonexistentMgrs' has not been declared +//error: protocol `Hutch' referenced as |manager| of `multimanNonexistentMgrs' has not been declared + +protocol multimanNonexistentMgrs { + manager Starsky or Hutch; + +child: + async Dummy(); + async __delete__(); +}; diff --git a/ipc/ipdl/test/ipdl/error/mutualRecStruct.ipdl b/ipc/ipdl/test/ipdl/error/mutualRecStruct.ipdl new file mode 100644 index 0000000000..9df16543bf --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/mutualRecStruct.ipdl @@ -0,0 +1,24 @@ +//error: struct `X' is only partially defined +//error: struct `Y' is only partially defined +//error: struct `Z' is only partially defined + +struct X { + int i; + Y[] y; +}; + +struct Y { + X x; + Z z; +}; + +struct Z { + double d; + X x; +}; + +protocol mutualRecStruct { +child: + async Test(X x, Y y, Z z); + async __delete__(); +}; diff --git a/ipc/ipdl/test/ipdl/error/mutualRecStructUnion.ipdl b/ipc/ipdl/test/ipdl/error/mutualRecStructUnion.ipdl new file mode 100644 index 0000000000..cd193f9f29 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/mutualRecStructUnion.ipdl @@ -0,0 +1,24 @@ +//error: struct `X' is only partially defined +//error: union `Y' is only partially defined +//error: struct `Z' is only partially defined + +struct X { + int i; + Y[] y; +}; + +union Y { + X; + Z; +}; + +struct Z { + double d; + X x; +}; + +protocol mutualRecStructUnion { +child: + async Test(X x, Y y, Z z); + async __delete__(); +}; diff --git a/ipc/ipdl/test/ipdl/error/noEmptyToplevel.ipdl b/ipc/ipdl/test/ipdl/error/noEmptyToplevel.ipdl new file mode 100644 index 0000000000..bc36cead42 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/noEmptyToplevel.ipdl @@ -0,0 +1,7 @@ +//error: top-level protocol `noEmptyToplevel' cannot be empty + +protocol noEmptyToplevel { + + // it's an error for top-level protocols to be empty + +}; diff --git a/ipc/ipdl/test/ipdl/error/noProtocolInHeader.ipdlh b/ipc/ipdl/test/ipdl/error/noProtocolInHeader.ipdlh new file mode 100644 index 0000000000..8351adf4cc --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/noProtocolInHeader.ipdlh @@ -0,0 +1,6 @@ +//error: can't define a protocol in a header. Do it in a protocol spec instead. + +protocol noProtocolInHeader { +child: + async __delete__(); +}; diff --git a/ipc/ipdl/test/ipdl/error/oldIncludeSyntax.ipdl b/ipc/ipdl/test/ipdl/error/oldIncludeSyntax.ipdl new file mode 100644 index 0000000000..d13659a8e7 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/oldIncludeSyntax.ipdl @@ -0,0 +1,7 @@ +//error: bad syntax near `"Foo.ipdl"' + +include protocol "Foo.ipdl"; + +protocol oldIncludeSyntax { +child: async __delete__(X x); +}; diff --git a/ipc/ipdl/test/ipdl/error/parser.ipdl b/ipc/ipdl/test/ipdl/error/parser.ipdl new file mode 100644 index 0000000000..8bfd63546a --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/parser.ipdl @@ -0,0 +1,3 @@ +//error: bad syntax near `???' + +protocol parser { diff --git a/ipc/ipdl/test/ipdl/error/redeclMessage.ipdl b/ipc/ipdl/test/ipdl/error/redeclMessage.ipdl new file mode 100644 index 0000000000..1247aa41cf --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/redeclMessage.ipdl @@ -0,0 +1,12 @@ +//error: message name `Msg' already declared as `MessageType' +//error: redeclaration of symbol `Msg', first declared at + +protocol redeclMessage { + + // can't declare two messages with the same name + +child: + async Msg(); + async Msg(); + +}; diff --git a/ipc/ipdl/test/ipdl/error/redeclParamReturn.ipdl b/ipc/ipdl/test/ipdl/error/redeclParamReturn.ipdl new file mode 100644 index 0000000000..ccdcbbe0d1 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/redeclParamReturn.ipdl @@ -0,0 +1,9 @@ +//error: redeclaration of symbol `f', first declared at + +sync protocol redeclParamReturn { + + // it's an error to name a parameter with the same id as a return + +parent: async Msg(int f) returns (bool f); + +}; diff --git a/ipc/ipdl/test/ipdl/error/redeclScope.ipdlh b/ipc/ipdl/test/ipdl/error/redeclScope.ipdlh new file mode 100644 index 0000000000..a64439b599 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/redeclScope.ipdlh @@ -0,0 +1,12 @@ +//error: redeclaration of symbol `Foo', first declared at + +struct Foo { + bool b; +}; + +struct Bar { + // This should produce an error saying that Foo is a redeclaration, + // even though the initial declaration was in a different frame of + // the symbol table. + bool Foo; +}; diff --git a/ipc/ipdl/test/ipdl/error/shmem.ipdl b/ipc/ipdl/test/ipdl/error/shmem.ipdl new file mode 100644 index 0000000000..7f4326ccf5 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/shmem.ipdl @@ -0,0 +1,8 @@ +//error: redeclaration of symbol `Shmem', first declared at +//error: redeclaration of symbol `::mozilla::ipc::Shmem', first declared at + +using class mozilla::ipc::Shmem from "mozilla/ipc/Shmem.h"; // redeclaration + +protocol shmem { +child: async Msg(Shmem s); +}; diff --git a/ipc/ipdl/test/ipdl/error/structRedecl.ipdl b/ipc/ipdl/test/ipdl/error/structRedecl.ipdl new file mode 100644 index 0000000000..03a5557877 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/structRedecl.ipdl @@ -0,0 +1,10 @@ +//error: redeclaration of symbol `a', first declared at + +struct Redecl { + int a; + double a; +}; + +protocol structRedecl { +child: async __delete__(); +}; diff --git a/ipc/ipdl/test/ipdl/error/structUnknownField.ipdl b/ipc/ipdl/test/ipdl/error/structUnknownField.ipdl new file mode 100644 index 0000000000..ac92edee23 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/structUnknownField.ipdl @@ -0,0 +1,9 @@ +//error: field `i' of struct `S' has unknown type `Foobers' + +struct S { + Foobers i; +}; + +protocol structUnknownField { +child: async __delete__(S s); +}; diff --git a/ipc/ipdl/test/ipdl/error/syncMessageCompress.ipdl b/ipc/ipdl/test/ipdl/error/syncMessageCompress.ipdl new file mode 100644 index 0000000000..376f2ae2dd --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/syncMessageCompress.ipdl @@ -0,0 +1,6 @@ +//error: message `foo' in protocol `syncMessageCompress' requests compression but is not async + +sync protocol syncMessageCompress { +parent: + [Compress] sync foo(); +}; diff --git a/ipc/ipdl/test/ipdl/error/syncParentToChild.ipdl b/ipc/ipdl/test/ipdl/error/syncParentToChild.ipdl new file mode 100644 index 0000000000..bd6c8bc5b1 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/syncParentToChild.ipdl @@ -0,0 +1,8 @@ +//error: sync parent-to-child messages are verboten (here, message `Msg' in protocol `syncParentToChild') + +intr protocol syncParentToChild { + + // can't declare sync parent-to-child messages +child: sync Msg(); + +}; diff --git a/ipc/ipdl/test/ipdl/error/tooWeakIntrAsync.ipdl b/ipc/ipdl/test/ipdl/error/tooWeakIntrAsync.ipdl new file mode 100644 index 0000000000..220e4c3c28 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/tooWeakIntrAsync.ipdl @@ -0,0 +1,9 @@ +//error: message `Msg' requires more powerful send semantics than its protocol `tooWeakIntrAsync' provides + +protocol tooWeakIntrAsync { + + // it's an error to declare an async protocol with an intr message + +parent: [LegacyIntr] intr Msg(); + +}; diff --git a/ipc/ipdl/test/ipdl/error/tooWeakIntrSync.ipdl b/ipc/ipdl/test/ipdl/error/tooWeakIntrSync.ipdl new file mode 100644 index 0000000000..4c3b61d0d9 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/tooWeakIntrSync.ipdl @@ -0,0 +1,8 @@ +//error: message `Msg' requires more powerful send semantics than its protocol `tooWeakIntrSync' provides + +sync protocol tooWeakIntrSync { + + // it's an error to declare a sync protocol with an interrupt message +parent: + [LegacyIntr] intr Msg(); +}; diff --git a/ipc/ipdl/test/ipdl/error/tooWeakSyncAsync.ipdl b/ipc/ipdl/test/ipdl/error/tooWeakSyncAsync.ipdl new file mode 100644 index 0000000000..49e4d3b75b --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/tooWeakSyncAsync.ipdl @@ -0,0 +1,9 @@ +//error: message `Msg' requires more powerful send semantics than its protocol `tooWeakSyncAsync' provides + +protocol tooWeakSyncAsync { + + // it's an error to declare an async protocol with a sync message + +parent: sync Msg(); + +}; diff --git a/ipc/ipdl/test/ipdl/error/twoprotocols.ipdl b/ipc/ipdl/test/ipdl/error/twoprotocols.ipdl new file mode 100644 index 0000000000..7e2a51a61a --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/twoprotocols.ipdl @@ -0,0 +1,11 @@ +// it's an error to define two protocols in the same file + +//error: only one protocol definition per file + +protocol p1 { +child: async Msg(); +}; + +protocol p2 { +child: async Msg(); +}; diff --git a/ipc/ipdl/test/ipdl/error/undeclParamType.ipdl b/ipc/ipdl/test/ipdl/error/undeclParamType.ipdl new file mode 100644 index 0000000000..3f93e747e1 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/undeclParamType.ipdl @@ -0,0 +1,7 @@ +//error: argument typename `FARGLEGARGLE' of message `Msg' has not been declared + +protocol undeclParamType { + +child: async Msg(FARGLEGARGLE p); + +}; diff --git a/ipc/ipdl/test/ipdl/error/undeclProtocol.ipdl b/ipc/ipdl/test/ipdl/error/undeclProtocol.ipdl new file mode 100644 index 0000000000..cddf57267f --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/undeclProtocol.ipdl @@ -0,0 +1,8 @@ +//error: protocol `undeclared', managed by `undeclProtocol', has not been declared + +protocol undeclProtocol { + manages undeclared; + +child: + async undeclared(); +}; diff --git a/ipc/ipdl/test/ipdl/error/undeclReturnType.ipdl b/ipc/ipdl/test/ipdl/error/undeclReturnType.ipdl new file mode 100644 index 0000000000..2f353a1957 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/undeclReturnType.ipdl @@ -0,0 +1,7 @@ +//error: argument typename `FARGLEGARGLE' of message `Msg' has not been declared + +sync protocol undeclReturnType { + +child: sync Msg() returns (FARGLEGARGLE r); + +}; diff --git a/ipc/ipdl/test/ipdl/error/undefMutualRecStruct.ipdl b/ipc/ipdl/test/ipdl/error/undefMutualRecStruct.ipdl new file mode 100644 index 0000000000..5ede1d8299 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/undefMutualRecStruct.ipdl @@ -0,0 +1,11 @@ +//error: struct `X' is only partially defined +//error: struct `Y' is only partially defined +//error: struct `Z' is only partially defined + +struct X { Y y; }; +struct Y { Z z; }; +struct Z { X x; }; + +protocol undefMutualRecStruct { +child: async __delete__(X x); +}; diff --git a/ipc/ipdl/test/ipdl/error/undefMutualRecStructUnion.ipdl b/ipc/ipdl/test/ipdl/error/undefMutualRecStructUnion.ipdl new file mode 100644 index 0000000000..0e88c126e0 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/undefMutualRecStructUnion.ipdl @@ -0,0 +1,11 @@ +//error: struct `X' is only partially defined +//error: union `Y' is only partially defined +//error: struct `Z' is only partially defined + +struct X { Y y; }; +union Y { Z; }; +struct Z { X x; }; + +protocol undefMutualRecStructUnion { +child: async __delete__(X x); +}; diff --git a/ipc/ipdl/test/ipdl/error/undefMutualRecUnion.ipdl b/ipc/ipdl/test/ipdl/error/undefMutualRecUnion.ipdl new file mode 100644 index 0000000000..3fc99bbb95 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/undefMutualRecUnion.ipdl @@ -0,0 +1,11 @@ +//error: union `X' is only partially defined +//error: union `Y' is only partially defined +//error: union `Z' is only partially defined + +union X { Y; }; +union Y { Z; }; +union Z { X; }; + +protocol undefMutualRecUnion { +child: async __delete__(X x); +}; diff --git a/ipc/ipdl/test/ipdl/error/undefSelfRecStruct.ipdl b/ipc/ipdl/test/ipdl/error/undefSelfRecStruct.ipdl new file mode 100644 index 0000000000..15fc45abcd --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/undefSelfRecStruct.ipdl @@ -0,0 +1,7 @@ +//error: struct `X' is only partially defined + +struct X { X x; }; + +protocol undefSelfRecStruct { +child: async __delete__(X x); +}; diff --git a/ipc/ipdl/test/ipdl/error/undefSelfRecUnion.ipdl b/ipc/ipdl/test/ipdl/error/undefSelfRecUnion.ipdl new file mode 100644 index 0000000000..951f916c57 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/undefSelfRecUnion.ipdl @@ -0,0 +1,7 @@ +//error: union `X' is only partially defined + +union X { X; }; + +protocol undefSelfRecUnion { +child: async __delete__(X x); +}; diff --git a/ipc/ipdl/test/ipdl/error/unknownIntrMessage.ipdl b/ipc/ipdl/test/ipdl/error/unknownIntrMessage.ipdl new file mode 100644 index 0000000000..4790232685 --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/unknownIntrMessage.ipdl @@ -0,0 +1,6 @@ +//error: Unknown sync IPC message unknownIntrMessage::Msg + +intr protocol unknownIntrMessage { +parent: + [LegacyIntr] intr Msg(); +}; diff --git a/ipc/ipdl/test/ipdl/error/unknownSyncMessage.ipdl b/ipc/ipdl/test/ipdl/error/unknownSyncMessage.ipdl new file mode 100644 index 0000000000..be2cfad0cc --- /dev/null +++ b/ipc/ipdl/test/ipdl/error/unknownSyncMessage.ipdl @@ -0,0 +1,6 @@ +//error: Unknown sync IPC message unknownSyncMessage::Msg + +sync protocol unknownSyncMessage { +parent: + sync Msg(); +}; |