From d702ab0e7344df8a353f74eefaf3772ca1bb1e12 Mon Sep 17 00:00:00 2001 From: Tinderbox user Date: Fri, 11 Sep 2009 09:02:09 +1000 Subject: More Xproto rennaming --- xts5/scenarios/Xproto_scen | 196 +++++------ xts5/tet_scen | 196 +++++------ xts5/tset/Xproto/.gitignore | 196 +++++------ xts5/tset/Xproto/AllocColor/AllocColor.m | 4 +- xts5/tset/Xproto/AllocColorCells/AllocColorCells.m | 300 +++++++++++++++++ .../tset/Xproto/AllocColorCells/XAllocColorCells.m | 300 ----------------- .../Xproto/AllocColorPlanes/AllocColorPlanes.m | 300 +++++++++++++++++ .../Xproto/AllocColorPlanes/XAllocColorPlanes.m | 300 ----------------- xts5/tset/Xproto/AllocNamedColor/AllocNamedColor.m | 265 +++++++++++++++ .../tset/Xproto/AllocNamedColor/XAllocNamedColor.m | 265 --------------- xts5/tset/Xproto/AllowEvents/AllowEvents.m | 260 ++++++++++++++ xts5/tset/Xproto/AllowEvents/XAllowEvents.m | 260 -------------- xts5/tset/Xproto/Bell/Bell.m | 237 +++++++++++++ xts5/tset/Xproto/Bell/XBell.m | 237 ------------- .../ChangeActivePointerGrab.m | 256 ++++++++++++++ .../XChangeActivePointerGrab.m | 256 -------------- xts5/tset/Xproto/ChangeGC/ChangeGC.m | 271 +++++++++++++++ xts5/tset/Xproto/ChangeGC/XChangeGC.m | 271 --------------- .../ChangeKeyboardControl/ChangeKeyboardControl.m | 284 ++++++++++++++++ .../ChangeKeyboardControl/XChangeKeyboardControl.m | 284 ---------------- .../ChangeKeyboardMapping/ChangeKeyboardMapping.m | 282 ++++++++++++++++ .../ChangeKeyboardMapping/XChangeKeyboardMapping.m | 282 ---------------- .../ChangePointerControl/ChangePointerControl.m | 255 ++++++++++++++ .../ChangePointerControl/XChangePointerControl.m | 255 -------------- xts5/tset/Xproto/ChangeProperty/ChangeProperty.m | 245 ++++++++++++++ xts5/tset/Xproto/ChangeProperty/XChangeProperty.m | 245 -------------- xts5/tset/Xproto/ChangeSaveSet/ChangeSaveSet.m | 245 ++++++++++++++ xts5/tset/Xproto/ChangeSaveSet/XChangeSaveSet.m | 245 -------------- .../ChangeWindowAttributes.m | 273 +++++++++++++++ .../XChangeWindowAttributes.m | 273 --------------- xts5/tset/Xproto/ClearArea/ClearArea.m | 258 ++++++++++++++ xts5/tset/Xproto/ClearArea/XClearArea.m | 258 -------------- xts5/tset/Xproto/ConfigureWindow/ConfigureWindow.m | 273 +++++++++++++++ .../tset/Xproto/ConfigureWindow/XConfigureWindow.m | 273 --------------- .../Xproto/ConvertSelection/ConvertSelection.m | 255 ++++++++++++++ .../Xproto/ConvertSelection/XConvertSelection.m | 255 -------------- xts5/tset/Xproto/CopyArea/CopyArea.m | 258 ++++++++++++++ xts5/tset/Xproto/CopyArea/XCopyArea.m | 258 -------------- .../CopyColormapAndFree/CopyColormapAndFree.m | 333 ++++++++++++++++++ .../CopyColormapAndFree/XCopyColormapAndFree.m | 333 ------------------ xts5/tset/Xproto/CopyGC/CopyGC.m | 280 ++++++++++++++++ xts5/tset/Xproto/CopyGC/XCopyGC.m | 280 ---------------- xts5/tset/Xproto/CopyPlane/CopyPlane.m | 257 ++++++++++++++ xts5/tset/Xproto/CopyPlane/XCopyPlane.m | 257 -------------- xts5/tset/Xproto/CreateColormap/CreateColormap.m | 313 +++++++++++++++++ xts5/tset/Xproto/CreateColormap/XCreateColormap.m | 313 ----------------- xts5/tset/Xproto/CreateGC/CreateGC.m | 334 ++++++++++++++++++ xts5/tset/Xproto/CreateGC/XCreateGC.m | 334 ------------------ .../Xproto/CreateGlyphCursor/CreateGlyphCursor.m | 308 +++++++++++++++++ .../Xproto/CreateGlyphCursor/XCreateGlyphCursor.m | 308 ----------------- xts5/tset/Xproto/CreatePixmap/CreatePixmap.m | 303 +++++++++++++++++ xts5/tset/Xproto/CreatePixmap/XCreatePixmap.m | 303 ----------------- xts5/tset/Xproto/CreateWindow/CreateWindow.m | 339 +++++++++++++++++++ xts5/tset/Xproto/CreateWindow/XCreateWindow.m | 339 ------------------- xts5/tset/Xproto/DeleteProperty/DeleteProperty.m | 253 ++++++++++++++ xts5/tset/Xproto/DeleteProperty/XDeleteProperty.m | 253 -------------- .../Xproto/DestroySubwindows/DestroySubwindows.m | 251 ++++++++++++++ .../Xproto/DestroySubwindows/XDestroySubwindows.m | 251 -------------- xts5/tset/Xproto/DestroyWindow/DestroyWindow.m | 242 ++++++++++++++ xts5/tset/Xproto/DestroyWindow/XDestroyWindow.m | 242 -------------- .../Xproto/ForceScreenSaver/ForceScreenSaver.m | 239 +++++++++++++ .../Xproto/ForceScreenSaver/XForceScreenSaver.m | 239 ------------- xts5/tset/Xproto/FreeColormap/FreeColormap.m | 252 ++++++++++++++ xts5/tset/Xproto/FreeColormap/XFreeColormap.m | 252 -------------- xts5/tset/Xproto/FreeColors/FreeColors.m | 260 ++++++++++++++ xts5/tset/Xproto/FreeColors/XFreeColors.m | 260 -------------- xts5/tset/Xproto/FreeCursor/FreeCursor.m | 241 +++++++++++++ xts5/tset/Xproto/FreeCursor/XFreeCursor.m | 241 ------------- xts5/tset/Xproto/FreeGC/FreeGC.m | 240 +++++++++++++ xts5/tset/Xproto/FreeGC/XFreeGC.m | 240 ------------- xts5/tset/Xproto/FreePixmap/FreePixmap.m | 241 +++++++++++++ xts5/tset/Xproto/FreePixmap/XFreePixmap.m | 241 ------------- xts5/tset/Xproto/GetAtomName/GetAtomName.m | 247 ++++++++++++++ xts5/tset/Xproto/GetAtomName/XGetAtomName.m | 247 -------------- xts5/tset/Xproto/GetFontPath/GetFontPath.m | 247 ++++++++++++++ xts5/tset/Xproto/GetFontPath/XGetFontPath.m | 247 -------------- xts5/tset/Xproto/GetGeometry/GetGeometry.m | 249 ++++++++++++++ xts5/tset/Xproto/GetGeometry/XGetGeometry.m | 249 -------------- xts5/tset/Xproto/GetImage/GetImage.m | 257 ++++++++++++++ xts5/tset/Xproto/GetImage/XGetImage.m | 257 -------------- xts5/tset/Xproto/GetInputFocus/GetInputFocus.m | 247 ++++++++++++++ xts5/tset/Xproto/GetInputFocus/XGetInputFocus.m | 247 -------------- .../Xproto/GetKeyboardControl/GetKeyboardControl.m | 247 ++++++++++++++ .../GetKeyboardControl/XGetKeyboardControl.m | 247 -------------- .../Xproto/GetKeyboardMapping/GetKeyboardMapping.m | 247 ++++++++++++++ .../GetKeyboardMapping/XGetKeyboardMapping.m | 247 -------------- .../Xproto/GetModifierMapping/GetModifierMapping.m | 247 ++++++++++++++ .../GetModifierMapping/XGetModifierMapping.m | 247 -------------- xts5/tset/Xproto/GetMotionEvents/GetMotionEvents.m | 249 ++++++++++++++ .../tset/Xproto/GetMotionEvents/XGetMotionEvents.m | 249 -------------- .../Xproto/GetPointerControl/GetPointerControl.m | 247 ++++++++++++++ .../Xproto/GetPointerControl/XGetPointerControl.m | 247 -------------- .../Xproto/GetPointerMapping/GetPointerMapping.m | 247 ++++++++++++++ .../Xproto/GetPointerMapping/XGetPointerMapping.m | 247 -------------- xts5/tset/Xproto/GetScreenSaver/GetScreenSaver.m | 247 ++++++++++++++ xts5/tset/Xproto/GetScreenSaver/XGetScreenSaver.m | 247 -------------- .../Xproto/GetSelectionOwner/GetSelectionOwner.m | 257 ++++++++++++++ .../Xproto/GetSelectionOwner/XGetSelectionOwner.m | 257 -------------- .../GetWindowAttributes/GetWindowAttributes.m | 249 ++++++++++++++ .../GetWindowAttributes/XGetWindowAttributes.m | 249 -------------- xts5/tset/Xproto/GrabButton/GrabButton.m | 239 +++++++++++++ xts5/tset/Xproto/GrabButton/XGrabButton.m | 239 ------------- xts5/tset/Xproto/GrabKey/GrabKey.m | 239 +++++++++++++ xts5/tset/Xproto/GrabKey/XGrabKey.m | 239 ------------- xts5/tset/Xproto/GrabKeyboard/GrabKeyboard.m | 249 ++++++++++++++ xts5/tset/Xproto/GrabKeyboard/XGrabKeyboard.m | 249 -------------- xts5/tset/Xproto/GrabPointer/GrabPointer.m | 249 ++++++++++++++ xts5/tset/Xproto/GrabPointer/XGrabPointer.m | 249 -------------- xts5/tset/Xproto/GrabServer/GrabServer.m | 239 +++++++++++++ xts5/tset/Xproto/GrabServer/XGrabServer.m | 239 ------------- xts5/tset/Xproto/InstallColormap/InstallColormap.m | 275 +++++++++++++++ .../tset/Xproto/InstallColormap/XInstallColormap.m | 275 --------------- xts5/tset/Xproto/InternAtom/InternAtom.m | 247 ++++++++++++++ xts5/tset/Xproto/InternAtom/XInternAtom.m | 247 -------------- xts5/tset/Xproto/KillClient/KillClient.m | 248 ++++++++++++++ xts5/tset/Xproto/KillClient/XKillClient.m | 248 -------------- xts5/tset/Xproto/ListFonts/ListFonts.m | 247 ++++++++++++++ xts5/tset/Xproto/ListFonts/XListFonts.m | 247 -------------- .../Xproto/ListFontsWithInfo/ListFontsWithInfo.m | 258 ++++++++++++++ .../Xproto/ListFontsWithInfo/XListFontsWithInfo.m | 258 -------------- xts5/tset/Xproto/ListHosts/ListHosts.m | 247 ++++++++++++++ xts5/tset/Xproto/ListHosts/XListHosts.m | 247 -------------- .../ListInstalledColormaps.m | 261 +++++++++++++++ .../XListInstalledColormaps.m | 261 --------------- xts5/tset/Xproto/ListProperties/ListProperties.m | 249 ++++++++++++++ xts5/tset/Xproto/ListProperties/XListProperties.m | 249 -------------- xts5/tset/Xproto/LookupColor/LookupColor.m | 259 ++++++++++++++ xts5/tset/Xproto/LookupColor/XLookupColor.m | 259 -------------- xts5/tset/Xproto/Makefile.am | 194 +++++------ xts5/tset/Xproto/MapSubwindows/MapSubwindows.m | 252 ++++++++++++++ xts5/tset/Xproto/MapSubwindows/XMapSubwindows.m | 252 -------------- xts5/tset/Xproto/MapWindow/MapWindow.m | 249 ++++++++++++++ xts5/tset/Xproto/MapWindow/XMapWindow.m | 249 -------------- xts5/tset/Xproto/OpenDisplay/OpenDisplay.m | 205 ++++++++++++ xts5/tset/Xproto/OpenDisplay/XOpenDisplay.m | 205 ------------ xts5/tset/Xproto/PutImage/PutImage.m | 317 ++++++++++++++++++ xts5/tset/Xproto/PutImage/XPutImage.m | 317 ------------------ xts5/tset/Xproto/QueryBestSize/QueryBestSize.m | 251 ++++++++++++++ xts5/tset/Xproto/QueryBestSize/XQueryBestSize.m | 251 -------------- xts5/tset/Xproto/QueryColors/QueryColors.m | 272 +++++++++++++++ xts5/tset/Xproto/QueryColors/XQueryColors.m | 272 --------------- xts5/tset/Xproto/QueryFont/QueryFont.m | 254 ++++++++++++++ xts5/tset/Xproto/QueryFont/XQueryFont.m | 254 -------------- xts5/tset/Xproto/QueryKeymap/QueryKeymap.m | 247 ++++++++++++++ xts5/tset/Xproto/QueryKeymap/XQueryKeymap.m | 247 -------------- xts5/tset/Xproto/QueryPointer/QueryPointer.m | 249 ++++++++++++++ xts5/tset/Xproto/QueryPointer/XQueryPointer.m | 249 -------------- .../Xproto/QueryTextExtents/QueryTextExtents.m | 240 +++++++++++++ .../Xproto/QueryTextExtents/XQueryTextExtents.m | 240 ------------- xts5/tset/Xproto/QueryTree/QueryTree.m | 249 ++++++++++++++ xts5/tset/Xproto/QueryTree/XQueryTree.m | 249 -------------- xts5/tset/Xproto/RecolorCursor/RecolorCursor.m | 241 +++++++++++++ xts5/tset/Xproto/RecolorCursor/XRecolorCursor.m | 241 ------------- xts5/tset/Xproto/ReparentWindow/ReparentWindow.m | 252 ++++++++++++++ xts5/tset/Xproto/ReparentWindow/XReparentWindow.m | 252 -------------- xts5/tset/Xproto/SendEvent/SendEvent.m | 280 ++++++++++++++++ xts5/tset/Xproto/SendEvent/XSendEvent.m | 280 ---------------- .../Xproto/SetAccessControl/SetAccessControl.m | 238 +++++++++++++ .../Xproto/SetAccessControl/XSetAccessControl.m | 238 ------------- .../Xproto/SetClipRectangles/SetClipRectangles.m | 240 +++++++++++++ .../Xproto/SetClipRectangles/XSetClipRectangles.m | 240 ------------- .../Xproto/SetCloseDownMode/SetCloseDownMode.m | 238 +++++++++++++ .../Xproto/SetCloseDownMode/XSetCloseDownMode.m | 238 ------------- xts5/tset/Xproto/SetDashes/SetDashes.m | 240 +++++++++++++ xts5/tset/Xproto/SetDashes/XSetDashes.m | 240 ------------- xts5/tset/Xproto/SetFontPath/SetFontPath.m | 237 +++++++++++++ xts5/tset/Xproto/SetFontPath/XSetFontPath.m | 237 ------------- xts5/tset/Xproto/SetInputFocus/SetInputFocus.m | 254 ++++++++++++++ xts5/tset/Xproto/SetInputFocus/XSetInputFocus.m | 254 -------------- .../Xproto/SetModifierMapping/SetModifierMapping.m | 291 ++++++++++++++++ .../SetModifierMapping/XSetModifierMapping.m | 291 ---------------- .../Xproto/SetPointerMapping/SetPointerMapping.m | 285 ++++++++++++++++ .../Xproto/SetPointerMapping/XSetPointerMapping.m | 285 ---------------- xts5/tset/Xproto/SetScreenSaver/SetScreenSaver.m | 256 ++++++++++++++ xts5/tset/Xproto/SetScreenSaver/XSetScreenSaver.m | 256 -------------- .../Xproto/SetSelectionOwner/SetSelectionOwner.m | 242 ++++++++++++++ .../Xproto/SetSelectionOwner/XSetSelectionOwner.m | 242 -------------- xts5/tset/Xproto/StoreColors/StoreColors.m | 372 +++++++++++++++++++++ xts5/tset/Xproto/StoreColors/XStoreColors.m | 372 --------------------- xts5/tset/Xproto/StoreNamedColor/StoreNamedColor.m | 368 ++++++++++++++++++++ .../tset/Xproto/StoreNamedColor/XStoreNamedColor.m | 368 -------------------- xts5/tset/Xproto/UngrabButton/UngrabButton.m | 246 ++++++++++++++ xts5/tset/Xproto/UngrabButton/XUngrabButton.m | 246 -------------- xts5/tset/Xproto/UngrabKey/UngrabKey.m | 246 ++++++++++++++ xts5/tset/Xproto/UngrabKey/XUngrabKey.m | 246 -------------- xts5/tset/Xproto/UngrabKeyboard/UngrabKeyboard.m | 259 ++++++++++++++ xts5/tset/Xproto/UngrabKeyboard/XUngrabKeyboard.m | 259 -------------- xts5/tset/Xproto/UngrabPointer/UngrabPointer.m | 259 ++++++++++++++ xts5/tset/Xproto/UngrabPointer/XUngrabPointer.m | 259 -------------- xts5/tset/Xproto/UngrabServer/UngrabServer.m | 246 ++++++++++++++ xts5/tset/Xproto/UngrabServer/XUngrabServer.m | 246 -------------- .../Xproto/UninstallColormap/UninstallColormap.m | 281 ++++++++++++++++ .../Xproto/UninstallColormap/XUninstallColormap.m | 281 ---------------- xts5/tset/Xproto/UnmapSubwindows/UnmapSubwindows.m | 261 +++++++++++++++ .../tset/Xproto/UnmapSubwindows/XUnmapSubwindows.m | 261 --------------- xts5/tset/Xproto/UnmapWindow/UnmapWindow.m | 244 ++++++++++++++ xts5/tset/Xproto/UnmapWindow/XUnmapWindow.m | 244 -------------- xts5/tset/Xproto/WarpPointer/WarpPointer.m | 241 +++++++++++++ xts5/tset/Xproto/WarpPointer/XWarpPointer.m | 241 ------------- 199 files changed, 25688 insertions(+), 25688 deletions(-) create mode 100644 xts5/tset/Xproto/AllocColorCells/AllocColorCells.m delete mode 100644 xts5/tset/Xproto/AllocColorCells/XAllocColorCells.m create mode 100644 xts5/tset/Xproto/AllocColorPlanes/AllocColorPlanes.m delete mode 100644 xts5/tset/Xproto/AllocColorPlanes/XAllocColorPlanes.m create mode 100644 xts5/tset/Xproto/AllocNamedColor/AllocNamedColor.m delete mode 100644 xts5/tset/Xproto/AllocNamedColor/XAllocNamedColor.m create mode 100644 xts5/tset/Xproto/AllowEvents/AllowEvents.m delete mode 100644 xts5/tset/Xproto/AllowEvents/XAllowEvents.m create mode 100644 xts5/tset/Xproto/Bell/Bell.m delete mode 100644 xts5/tset/Xproto/Bell/XBell.m create mode 100644 xts5/tset/Xproto/ChangeActivePointerGrab/ChangeActivePointerGrab.m delete mode 100644 xts5/tset/Xproto/ChangeActivePointerGrab/XChangeActivePointerGrab.m create mode 100644 xts5/tset/Xproto/ChangeGC/ChangeGC.m delete mode 100644 xts5/tset/Xproto/ChangeGC/XChangeGC.m create mode 100644 xts5/tset/Xproto/ChangeKeyboardControl/ChangeKeyboardControl.m delete mode 100644 xts5/tset/Xproto/ChangeKeyboardControl/XChangeKeyboardControl.m create mode 100644 xts5/tset/Xproto/ChangeKeyboardMapping/ChangeKeyboardMapping.m delete mode 100644 xts5/tset/Xproto/ChangeKeyboardMapping/XChangeKeyboardMapping.m create mode 100644 xts5/tset/Xproto/ChangePointerControl/ChangePointerControl.m delete mode 100644 xts5/tset/Xproto/ChangePointerControl/XChangePointerControl.m create mode 100644 xts5/tset/Xproto/ChangeProperty/ChangeProperty.m delete mode 100644 xts5/tset/Xproto/ChangeProperty/XChangeProperty.m create mode 100644 xts5/tset/Xproto/ChangeSaveSet/ChangeSaveSet.m delete mode 100644 xts5/tset/Xproto/ChangeSaveSet/XChangeSaveSet.m create mode 100644 xts5/tset/Xproto/ChangeWindowAttributes/ChangeWindowAttributes.m delete mode 100644 xts5/tset/Xproto/ChangeWindowAttributes/XChangeWindowAttributes.m create mode 100644 xts5/tset/Xproto/ClearArea/ClearArea.m delete mode 100644 xts5/tset/Xproto/ClearArea/XClearArea.m create mode 100644 xts5/tset/Xproto/ConfigureWindow/ConfigureWindow.m delete mode 100644 xts5/tset/Xproto/ConfigureWindow/XConfigureWindow.m create mode 100644 xts5/tset/Xproto/ConvertSelection/ConvertSelection.m delete mode 100644 xts5/tset/Xproto/ConvertSelection/XConvertSelection.m create mode 100644 xts5/tset/Xproto/CopyArea/CopyArea.m delete mode 100644 xts5/tset/Xproto/CopyArea/XCopyArea.m create mode 100644 xts5/tset/Xproto/CopyColormapAndFree/CopyColormapAndFree.m delete mode 100644 xts5/tset/Xproto/CopyColormapAndFree/XCopyColormapAndFree.m create mode 100644 xts5/tset/Xproto/CopyGC/CopyGC.m delete mode 100644 xts5/tset/Xproto/CopyGC/XCopyGC.m create mode 100644 xts5/tset/Xproto/CopyPlane/CopyPlane.m delete mode 100644 xts5/tset/Xproto/CopyPlane/XCopyPlane.m create mode 100644 xts5/tset/Xproto/CreateColormap/CreateColormap.m delete mode 100644 xts5/tset/Xproto/CreateColormap/XCreateColormap.m create mode 100644 xts5/tset/Xproto/CreateGC/CreateGC.m delete mode 100644 xts5/tset/Xproto/CreateGC/XCreateGC.m create mode 100644 xts5/tset/Xproto/CreateGlyphCursor/CreateGlyphCursor.m delete mode 100644 xts5/tset/Xproto/CreateGlyphCursor/XCreateGlyphCursor.m create mode 100644 xts5/tset/Xproto/CreatePixmap/CreatePixmap.m delete mode 100644 xts5/tset/Xproto/CreatePixmap/XCreatePixmap.m create mode 100644 xts5/tset/Xproto/CreateWindow/CreateWindow.m delete mode 100644 xts5/tset/Xproto/CreateWindow/XCreateWindow.m create mode 100644 xts5/tset/Xproto/DeleteProperty/DeleteProperty.m delete mode 100644 xts5/tset/Xproto/DeleteProperty/XDeleteProperty.m create mode 100644 xts5/tset/Xproto/DestroySubwindows/DestroySubwindows.m delete mode 100644 xts5/tset/Xproto/DestroySubwindows/XDestroySubwindows.m create mode 100644 xts5/tset/Xproto/DestroyWindow/DestroyWindow.m delete mode 100644 xts5/tset/Xproto/DestroyWindow/XDestroyWindow.m create mode 100644 xts5/tset/Xproto/ForceScreenSaver/ForceScreenSaver.m delete mode 100644 xts5/tset/Xproto/ForceScreenSaver/XForceScreenSaver.m create mode 100644 xts5/tset/Xproto/FreeColormap/FreeColormap.m delete mode 100644 xts5/tset/Xproto/FreeColormap/XFreeColormap.m create mode 100644 xts5/tset/Xproto/FreeColors/FreeColors.m delete mode 100644 xts5/tset/Xproto/FreeColors/XFreeColors.m create mode 100644 xts5/tset/Xproto/FreeCursor/FreeCursor.m delete mode 100644 xts5/tset/Xproto/FreeCursor/XFreeCursor.m create mode 100644 xts5/tset/Xproto/FreeGC/FreeGC.m delete mode 100644 xts5/tset/Xproto/FreeGC/XFreeGC.m create mode 100644 xts5/tset/Xproto/FreePixmap/FreePixmap.m delete mode 100644 xts5/tset/Xproto/FreePixmap/XFreePixmap.m create mode 100644 xts5/tset/Xproto/GetAtomName/GetAtomName.m delete mode 100644 xts5/tset/Xproto/GetAtomName/XGetAtomName.m create mode 100644 xts5/tset/Xproto/GetFontPath/GetFontPath.m delete mode 100644 xts5/tset/Xproto/GetFontPath/XGetFontPath.m create mode 100644 xts5/tset/Xproto/GetGeometry/GetGeometry.m delete mode 100644 xts5/tset/Xproto/GetGeometry/XGetGeometry.m create mode 100644 xts5/tset/Xproto/GetImage/GetImage.m delete mode 100644 xts5/tset/Xproto/GetImage/XGetImage.m create mode 100644 xts5/tset/Xproto/GetInputFocus/GetInputFocus.m delete mode 100644 xts5/tset/Xproto/GetInputFocus/XGetInputFocus.m create mode 100644 xts5/tset/Xproto/GetKeyboardControl/GetKeyboardControl.m delete mode 100644 xts5/tset/Xproto/GetKeyboardControl/XGetKeyboardControl.m create mode 100644 xts5/tset/Xproto/GetKeyboardMapping/GetKeyboardMapping.m delete mode 100644 xts5/tset/Xproto/GetKeyboardMapping/XGetKeyboardMapping.m create mode 100644 xts5/tset/Xproto/GetModifierMapping/GetModifierMapping.m delete mode 100644 xts5/tset/Xproto/GetModifierMapping/XGetModifierMapping.m create mode 100644 xts5/tset/Xproto/GetMotionEvents/GetMotionEvents.m delete mode 100644 xts5/tset/Xproto/GetMotionEvents/XGetMotionEvents.m create mode 100644 xts5/tset/Xproto/GetPointerControl/GetPointerControl.m delete mode 100644 xts5/tset/Xproto/GetPointerControl/XGetPointerControl.m create mode 100644 xts5/tset/Xproto/GetPointerMapping/GetPointerMapping.m delete mode 100644 xts5/tset/Xproto/GetPointerMapping/XGetPointerMapping.m create mode 100644 xts5/tset/Xproto/GetScreenSaver/GetScreenSaver.m delete mode 100644 xts5/tset/Xproto/GetScreenSaver/XGetScreenSaver.m create mode 100644 xts5/tset/Xproto/GetSelectionOwner/GetSelectionOwner.m delete mode 100644 xts5/tset/Xproto/GetSelectionOwner/XGetSelectionOwner.m create mode 100644 xts5/tset/Xproto/GetWindowAttributes/GetWindowAttributes.m delete mode 100644 xts5/tset/Xproto/GetWindowAttributes/XGetWindowAttributes.m create mode 100644 xts5/tset/Xproto/GrabButton/GrabButton.m delete mode 100644 xts5/tset/Xproto/GrabButton/XGrabButton.m create mode 100644 xts5/tset/Xproto/GrabKey/GrabKey.m delete mode 100644 xts5/tset/Xproto/GrabKey/XGrabKey.m create mode 100644 xts5/tset/Xproto/GrabKeyboard/GrabKeyboard.m delete mode 100644 xts5/tset/Xproto/GrabKeyboard/XGrabKeyboard.m create mode 100644 xts5/tset/Xproto/GrabPointer/GrabPointer.m delete mode 100644 xts5/tset/Xproto/GrabPointer/XGrabPointer.m create mode 100644 xts5/tset/Xproto/GrabServer/GrabServer.m delete mode 100644 xts5/tset/Xproto/GrabServer/XGrabServer.m create mode 100644 xts5/tset/Xproto/InstallColormap/InstallColormap.m delete mode 100644 xts5/tset/Xproto/InstallColormap/XInstallColormap.m create mode 100644 xts5/tset/Xproto/InternAtom/InternAtom.m delete mode 100644 xts5/tset/Xproto/InternAtom/XInternAtom.m create mode 100644 xts5/tset/Xproto/KillClient/KillClient.m delete mode 100644 xts5/tset/Xproto/KillClient/XKillClient.m create mode 100644 xts5/tset/Xproto/ListFonts/ListFonts.m delete mode 100644 xts5/tset/Xproto/ListFonts/XListFonts.m create mode 100644 xts5/tset/Xproto/ListFontsWithInfo/ListFontsWithInfo.m delete mode 100644 xts5/tset/Xproto/ListFontsWithInfo/XListFontsWithInfo.m create mode 100644 xts5/tset/Xproto/ListHosts/ListHosts.m delete mode 100644 xts5/tset/Xproto/ListHosts/XListHosts.m create mode 100644 xts5/tset/Xproto/ListInstalledColormaps/ListInstalledColormaps.m delete mode 100644 xts5/tset/Xproto/ListInstalledColormaps/XListInstalledColormaps.m create mode 100644 xts5/tset/Xproto/ListProperties/ListProperties.m delete mode 100644 xts5/tset/Xproto/ListProperties/XListProperties.m create mode 100644 xts5/tset/Xproto/LookupColor/LookupColor.m delete mode 100644 xts5/tset/Xproto/LookupColor/XLookupColor.m create mode 100644 xts5/tset/Xproto/MapSubwindows/MapSubwindows.m delete mode 100644 xts5/tset/Xproto/MapSubwindows/XMapSubwindows.m create mode 100644 xts5/tset/Xproto/MapWindow/MapWindow.m delete mode 100644 xts5/tset/Xproto/MapWindow/XMapWindow.m create mode 100644 xts5/tset/Xproto/OpenDisplay/OpenDisplay.m delete mode 100644 xts5/tset/Xproto/OpenDisplay/XOpenDisplay.m create mode 100644 xts5/tset/Xproto/PutImage/PutImage.m delete mode 100644 xts5/tset/Xproto/PutImage/XPutImage.m create mode 100644 xts5/tset/Xproto/QueryBestSize/QueryBestSize.m delete mode 100644 xts5/tset/Xproto/QueryBestSize/XQueryBestSize.m create mode 100644 xts5/tset/Xproto/QueryColors/QueryColors.m delete mode 100644 xts5/tset/Xproto/QueryColors/XQueryColors.m create mode 100644 xts5/tset/Xproto/QueryFont/QueryFont.m delete mode 100644 xts5/tset/Xproto/QueryFont/XQueryFont.m create mode 100644 xts5/tset/Xproto/QueryKeymap/QueryKeymap.m delete mode 100644 xts5/tset/Xproto/QueryKeymap/XQueryKeymap.m create mode 100644 xts5/tset/Xproto/QueryPointer/QueryPointer.m delete mode 100644 xts5/tset/Xproto/QueryPointer/XQueryPointer.m create mode 100644 xts5/tset/Xproto/QueryTextExtents/QueryTextExtents.m delete mode 100644 xts5/tset/Xproto/QueryTextExtents/XQueryTextExtents.m create mode 100644 xts5/tset/Xproto/QueryTree/QueryTree.m delete mode 100644 xts5/tset/Xproto/QueryTree/XQueryTree.m create mode 100644 xts5/tset/Xproto/RecolorCursor/RecolorCursor.m delete mode 100644 xts5/tset/Xproto/RecolorCursor/XRecolorCursor.m create mode 100644 xts5/tset/Xproto/ReparentWindow/ReparentWindow.m delete mode 100644 xts5/tset/Xproto/ReparentWindow/XReparentWindow.m create mode 100644 xts5/tset/Xproto/SendEvent/SendEvent.m delete mode 100644 xts5/tset/Xproto/SendEvent/XSendEvent.m create mode 100644 xts5/tset/Xproto/SetAccessControl/SetAccessControl.m delete mode 100644 xts5/tset/Xproto/SetAccessControl/XSetAccessControl.m create mode 100644 xts5/tset/Xproto/SetClipRectangles/SetClipRectangles.m delete mode 100644 xts5/tset/Xproto/SetClipRectangles/XSetClipRectangles.m create mode 100644 xts5/tset/Xproto/SetCloseDownMode/SetCloseDownMode.m delete mode 100644 xts5/tset/Xproto/SetCloseDownMode/XSetCloseDownMode.m create mode 100644 xts5/tset/Xproto/SetDashes/SetDashes.m delete mode 100644 xts5/tset/Xproto/SetDashes/XSetDashes.m create mode 100644 xts5/tset/Xproto/SetFontPath/SetFontPath.m delete mode 100644 xts5/tset/Xproto/SetFontPath/XSetFontPath.m create mode 100644 xts5/tset/Xproto/SetInputFocus/SetInputFocus.m delete mode 100644 xts5/tset/Xproto/SetInputFocus/XSetInputFocus.m create mode 100644 xts5/tset/Xproto/SetModifierMapping/SetModifierMapping.m delete mode 100644 xts5/tset/Xproto/SetModifierMapping/XSetModifierMapping.m create mode 100644 xts5/tset/Xproto/SetPointerMapping/SetPointerMapping.m delete mode 100644 xts5/tset/Xproto/SetPointerMapping/XSetPointerMapping.m create mode 100644 xts5/tset/Xproto/SetScreenSaver/SetScreenSaver.m delete mode 100644 xts5/tset/Xproto/SetScreenSaver/XSetScreenSaver.m create mode 100644 xts5/tset/Xproto/SetSelectionOwner/SetSelectionOwner.m delete mode 100644 xts5/tset/Xproto/SetSelectionOwner/XSetSelectionOwner.m create mode 100644 xts5/tset/Xproto/StoreColors/StoreColors.m delete mode 100644 xts5/tset/Xproto/StoreColors/XStoreColors.m create mode 100644 xts5/tset/Xproto/StoreNamedColor/StoreNamedColor.m delete mode 100644 xts5/tset/Xproto/StoreNamedColor/XStoreNamedColor.m create mode 100644 xts5/tset/Xproto/UngrabButton/UngrabButton.m delete mode 100644 xts5/tset/Xproto/UngrabButton/XUngrabButton.m create mode 100644 xts5/tset/Xproto/UngrabKey/UngrabKey.m delete mode 100644 xts5/tset/Xproto/UngrabKey/XUngrabKey.m create mode 100644 xts5/tset/Xproto/UngrabKeyboard/UngrabKeyboard.m delete mode 100644 xts5/tset/Xproto/UngrabKeyboard/XUngrabKeyboard.m create mode 100644 xts5/tset/Xproto/UngrabPointer/UngrabPointer.m delete mode 100644 xts5/tset/Xproto/UngrabPointer/XUngrabPointer.m create mode 100644 xts5/tset/Xproto/UngrabServer/UngrabServer.m delete mode 100644 xts5/tset/Xproto/UngrabServer/XUngrabServer.m create mode 100644 xts5/tset/Xproto/UninstallColormap/UninstallColormap.m delete mode 100644 xts5/tset/Xproto/UninstallColormap/XUninstallColormap.m create mode 100644 xts5/tset/Xproto/UnmapSubwindows/UnmapSubwindows.m delete mode 100644 xts5/tset/Xproto/UnmapSubwindows/XUnmapSubwindows.m create mode 100644 xts5/tset/Xproto/UnmapWindow/UnmapWindow.m delete mode 100644 xts5/tset/Xproto/UnmapWindow/XUnmapWindow.m create mode 100644 xts5/tset/Xproto/WarpPointer/WarpPointer.m delete mode 100644 xts5/tset/Xproto/WarpPointer/XWarpPointer.m (limited to 'xts5') diff --git a/xts5/scenarios/Xproto_scen b/xts5/scenarios/Xproto_scen index 4e08f73c..b1352651 100644 --- a/xts5/scenarios/Xproto_scen +++ b/xts5/scenarios/Xproto_scen @@ -56,159 +56,159 @@ # "VSW5TESTSUITE CASE AllocColor 3" - /tset/Xproto/XAllocColor/XAllocColor + /tset/Xproto/AllocColor/XAllocColor "VSW5TESTSUITE CASE AllocColorCells 3" - /tset/Xproto/XAllocColorCells/XAllocColorCells + /tset/Xproto/AllocColorCells/XAllocColorCells "VSW5TESTSUITE CASE AllocColorPlanes 3" - /tset/Xproto/XAllocColorPlanes/XAllocColorPlanes + /tset/Xproto/AllocColorPlanes/XAllocColorPlanes "VSW5TESTSUITE CASE AllocNamedColor 3" - /tset/Xproto/XAllocNamedColor/XAllocNamedColor + /tset/Xproto/AllocNamedColor/XAllocNamedColor "VSW5TESTSUITE CASE AllowEvents 3" - /tset/Xproto/XAllowEvents/XAllowEvents + /tset/Xproto/AllowEvents/XAllowEvents "VSW5TESTSUITE CASE BadRequest 1" /tset/Xproto/BadRequest/BadRequest "VSW5TESTSUITE CASE Bell 3" - /tset/Xproto/XBell/XBell + /tset/Xproto/Bell/XBell "VSW5TESTSUITE CASE ChangeActivePointerGrab 3" - /tset/Xproto/XChangeActivePointerGrab/XChangeActivePointerGrab + /tset/Xproto/ChangeActivePointerGrab/XChangeActivePointerGrab "VSW5TESTSUITE CASE ChangeGC 4" - /tset/Xproto/XChangeGC/XChangeGC + /tset/Xproto/ChangeGC/XChangeGC "VSW5TESTSUITE CASE ChangeHosts 3" /tset/Xproto/ChangeHosts/ChangeHosts "VSW5TESTSUITE CASE ChangeKeyboardControl 4" - /tset/Xproto/XChangeKeyboardControl/XChangeKeyboardControl + /tset/Xproto/ChangeKeyboardControl/XChangeKeyboardControl "VSW5TESTSUITE CASE ChangeKeyboardMapping 3" - /tset/Xproto/XChangeKeyboardMapping/XChangeKeyboardMapping + /tset/Xproto/ChangeKeyboardMapping/XChangeKeyboardMapping "VSW5TESTSUITE CASE ChangePointerControl 3" - /tset/Xproto/XChangePointerControl/XChangePointerControl + /tset/Xproto/ChangePointerControl/XChangePointerControl "VSW5TESTSUITE CASE ChangeProperty 3" - /tset/Xproto/XChangeProperty/XChangeProperty + /tset/Xproto/ChangeProperty/XChangeProperty "VSW5TESTSUITE CASE ChangeSaveSet 3" - /tset/Xproto/XChangeSaveSet/XChangeSaveSet + /tset/Xproto/ChangeSaveSet/XChangeSaveSet "VSW5TESTSUITE CASE ChangeWindowAttributes 4" - /tset/Xproto/XChangeWindowAttributes/XChangeWindowAttributes + /tset/Xproto/ChangeWindowAttributes/XChangeWindowAttributes "VSW5TESTSUITE CASE ClearArea 3" - /tset/Xproto/XClearArea/XClearArea + /tset/Xproto/ClearArea/XClearArea "VSW5TESTSUITE CASE CloseFont 3" /tset/Xproto/CloseFont/CloseFont "VSW5TESTSUITE CASE ConfigureWindow 4" - /tset/Xproto/XConfigureWindow/XConfigureWindow + /tset/Xproto/ConfigureWindow/XConfigureWindow "VSW5TESTSUITE CASE ConvertSelection 3" - /tset/Xproto/XConvertSelection/XConvertSelection + /tset/Xproto/ConvertSelection/XConvertSelection "VSW5TESTSUITE CASE CopyArea 3" - /tset/Xproto/XCopyArea/XCopyArea + /tset/Xproto/CopyArea/XCopyArea "VSW5TESTSUITE CASE CopyColormapAndFree 5" - /tset/Xproto/XCopyColormapAndFree/XCopyColormapAndFree + /tset/Xproto/CopyColormapAndFree/XCopyColormapAndFree "VSW5TESTSUITE CASE CopyGC 4" - /tset/Xproto/XCopyGC/XCopyGC + /tset/Xproto/CopyGC/XCopyGC "VSW5TESTSUITE CASE CopyPlane 3" - /tset/Xproto/XCopyPlane/XCopyPlane + /tset/Xproto/CopyPlane/XCopyPlane "VSW5TESTSUITE CASE CirculateWindow 3" /tset/Xproto/CirculateWindow/CirculateWindow "VSW5TESTSUITE CASE CreateColormap 5" - /tset/Xproto/XCreateColormap/XCreateColormap + /tset/Xproto/CreateColormap/XCreateColormap "VSW5TESTSUITE CASE CreateCursor 5" /tset/Xproto/CreateCursor/CreateCursor "VSW5TESTSUITE CASE CreateGC 6" - /tset/Xproto/XCreateGC/XCreateGC + /tset/Xproto/CreateGC/XCreateGC "VSW5TESTSUITE CASE CreateGlyphCursor 5" - /tset/Xproto/XCreateGlyphCursor/XCreateGlyphCursor + /tset/Xproto/CreateGlyphCursor/XCreateGlyphCursor "VSW5TESTSUITE CASE CreatePixmap 5" - /tset/Xproto/XCreatePixmap/XCreatePixmap + /tset/Xproto/CreatePixmap/XCreatePixmap "VSW5TESTSUITE CASE CreateWindow 6" - /tset/Xproto/XCreateWindow/XCreateWindow + /tset/Xproto/CreateWindow/XCreateWindow "VSW5TESTSUITE CASE DeleteProperty 3" - /tset/Xproto/XDeleteProperty/XDeleteProperty + /tset/Xproto/DeleteProperty/XDeleteProperty "VSW5TESTSUITE CASE DestroySubwindows 3" - /tset/Xproto/XDestroySubwindows/XDestroySubwindows + /tset/Xproto/DestroySubwindows/XDestroySubwindows "VSW5TESTSUITE CASE DestroyWindow 3" - /tset/Xproto/XDestroyWindow/XDestroyWindow + /tset/Xproto/DestroyWindow/XDestroyWindow "VSW5TESTSUITE CASE FillPoly 3" /tset/Xproto/FillPoly/FillPoly "VSW5TESTSUITE CASE FreeColormap 3" - /tset/Xproto/XFreeColormap/XFreeColormap + /tset/Xproto/FreeColormap/XFreeColormap "VSW5TESTSUITE CASE FreeColors 3" - /tset/Xproto/XFreeColors/XFreeColors + /tset/Xproto/FreeColors/XFreeColors "VSW5TESTSUITE CASE FreeCursor 3" - /tset/Xproto/XFreeCursor/XFreeCursor + /tset/Xproto/FreeCursor/XFreeCursor "VSW5TESTSUITE CASE ForceScreenSaver 3" - /tset/Xproto/XForceScreenSaver/XForceScreenSaver + /tset/Xproto/ForceScreenSaver/XForceScreenSaver "VSW5TESTSUITE CASE FreeGC 3" - /tset/Xproto/XFreeGC/XFreeGC + /tset/Xproto/FreeGC/XFreeGC "VSW5TESTSUITE CASE FreePixmap 3" - /tset/Xproto/XFreePixmap/XFreePixmap + /tset/Xproto/FreePixmap/XFreePixmap "VSW5TESTSUITE CASE GrabButton 3" - /tset/Xproto/XGrabButton/XGrabButton + /tset/Xproto/GrabButton/XGrabButton "VSW5TESTSUITE CASE GrabKey 3" - /tset/Xproto/XGrabKey/XGrabKey + /tset/Xproto/GrabKey/XGrabKey "VSW5TESTSUITE CASE GrabKeyboard 3" - /tset/Xproto/XGrabKeyboard/XGrabKeyboard + /tset/Xproto/GrabKeyboard/XGrabKeyboard "VSW5TESTSUITE CASE GrabPointer 3" - /tset/Xproto/XGrabPointer/XGrabPointer + /tset/Xproto/GrabPointer/XGrabPointer "VSW5TESTSUITE CASE GrabServer 3" - /tset/Xproto/XGrabServer/XGrabServer + /tset/Xproto/GrabServer/XGrabServer "VSW5TESTSUITE CASE GetAtomName 3" - /tset/Xproto/XGetAtomName/XGetAtomName + /tset/Xproto/GetAtomName/XGetAtomName "VSW5TESTSUITE CASE GetFontPath 3" - /tset/Xproto/XGetFontPath/XGetFontPath + /tset/Xproto/GetFontPath/XGetFontPath "VSW5TESTSUITE CASE GetGeometry 3" - /tset/Xproto/XGetGeometry/XGetGeometry + /tset/Xproto/GetGeometry/XGetGeometry "VSW5TESTSUITE CASE GetImage 3" - /tset/Xproto/XGetImage/XGetImage + /tset/Xproto/GetImage/XGetImage "VSW5TESTSUITE CASE GetInputFocus 3" - /tset/Xproto/XGetInputFocus/XGetInputFocus + /tset/Xproto/GetInputFocus/XGetInputFocus "VSW5TESTSUITE CASE GetKeyboardControl 3" - /tset/Xproto/XGetKeyboardControl/XGetKeyboardControl + /tset/Xproto/GetKeyboardControl/XGetKeyboardControl "VSW5TESTSUITE CASE GetKeyboardMapping 3" - /tset/Xproto/XGetKeyboardMapping/XGetKeyboardMapping + /tset/Xproto/GetKeyboardMapping/XGetKeyboardMapping "VSW5TESTSUITE CASE GetModifierMapping 3" - /tset/Xproto/XGetModifierMapping/XGetModifierMapping + /tset/Xproto/GetModifierMapping/XGetModifierMapping "VSW5TESTSUITE CASE GetMotionEvents 3" - /tset/Xproto/XGetMotionEvents/XGetMotionEvents + /tset/Xproto/GetMotionEvents/XGetMotionEvents "VSW5TESTSUITE CASE GetPointerControl 3" - /tset/Xproto/XGetPointerControl/XGetPointerControl + /tset/Xproto/GetPointerControl/XGetPointerControl "VSW5TESTSUITE CASE GetPointerMapping 3" - /tset/Xproto/XGetPointerMapping/XGetPointerMapping + /tset/Xproto/GetPointerMapping/XGetPointerMapping "VSW5TESTSUITE CASE GetProperty 3" /tset/Xproto/GetProperty/GetProperty "VSW5TESTSUITE CASE GetScreenSaver 3" - /tset/Xproto/XGetScreenSaver/XGetScreenSaver + /tset/Xproto/GetScreenSaver/XGetScreenSaver "VSW5TESTSUITE CASE GetSelectionOwner 3" - /tset/Xproto/XGetSelectionOwner/XGetSelectionOwner + /tset/Xproto/GetSelectionOwner/XGetSelectionOwner "VSW5TESTSUITE CASE GetWindowAttributes 3" - /tset/Xproto/XGetWindowAttributes/XGetWindowAttributes + /tset/Xproto/GetWindowAttributes/XGetWindowAttributes "VSW5TESTSUITE CASE ImageText16 3" /tset/Xproto/ImageText16/ImageText16 "VSW5TESTSUITE CASE ImageText8 3" /tset/Xproto/ImageText8/ImageText8 "VSW5TESTSUITE CASE InstallColormap 3" - /tset/Xproto/XInstallColormap/XInstallColormap + /tset/Xproto/InstallColormap/XInstallColormap "VSW5TESTSUITE CASE InternAtom 3" - /tset/Xproto/XInternAtom/XInternAtom + /tset/Xproto/InternAtom/XInternAtom "VSW5TESTSUITE CASE KillClient 3" - /tset/Xproto/XKillClient/XKillClient + /tset/Xproto/KillClient/XKillClient "VSW5TESTSUITE CASE LookupColor 3" - /tset/Xproto/XLookupColor/XLookupColor + /tset/Xproto/LookupColor/XLookupColor "VSW5TESTSUITE CASE ListExtensions 3" /tset/Xproto/ListExtensions/ListExtensions "VSW5TESTSUITE CASE ListFonts 3" - /tset/Xproto/XListFonts/XListFonts + /tset/Xproto/ListFonts/XListFonts "VSW5TESTSUITE CASE ListFontsWithInfo 3" - /tset/Xproto/XListFontsWithInfo/XListFontsWithInfo + /tset/Xproto/ListFontsWithInfo/XListFontsWithInfo "VSW5TESTSUITE CASE ListHosts 3" - /tset/Xproto/XListHosts/XListHosts + /tset/Xproto/ListHosts/XListHosts "VSW5TESTSUITE CASE ListInstalledColormaps 3" - /tset/Xproto/XListInstalledColormaps/XListInstalledColormaps + /tset/Xproto/ListInstalledColormaps/XListInstalledColormaps "VSW5TESTSUITE CASE ListProperties 3" - /tset/Xproto/XListProperties/XListProperties + /tset/Xproto/ListProperties/XListProperties "VSW5TESTSUITE CASE MapSubwindows 3" - /tset/Xproto/XMapSubwindows/XMapSubwindows + /tset/Xproto/MapSubwindows/XMapSubwindows "VSW5TESTSUITE CASE MapWindow 3" - /tset/Xproto/XMapWindow/XMapWindow + /tset/Xproto/MapWindow/XMapWindow "VSW5TESTSUITE CASE NoOperation 4" /tset/Xproto/NoOperation/NoOperation "VSW5TESTSUITE CASE OpenDisplay 2" - /tset/Xproto/XOpenDisplay/XOpenDisplay + /tset/Xproto/OpenDisplay/XOpenDisplay "VSW5TESTSUITE CASE OpenFont 5" /tset/Xproto/OpenFont/OpenFont "VSW5TESTSUITE CASE PolyArc 3" @@ -230,72 +230,72 @@ "VSW5TESTSUITE CASE PolyText8 3" /tset/Xproto/PolyText8/PolyText8 "VSW5TESTSUITE CASE PutImage 3" - /tset/Xproto/XPutImage/XPutImage + /tset/Xproto/PutImage/XPutImage "VSW5TESTSUITE CASE QueryBestSize 3" - /tset/Xproto/XQueryBestSize/XQueryBestSize + /tset/Xproto/QueryBestSize/XQueryBestSize "VSW5TESTSUITE CASE QueryColors 3" - /tset/Xproto/XQueryColors/XQueryColors + /tset/Xproto/QueryColors/XQueryColors "VSW5TESTSUITE CASE QueryExtension 3" /tset/Xproto/QueryExtension/QueryExtension "VSW5TESTSUITE CASE QueryFont 3" - /tset/Xproto/XQueryFont/XQueryFont + /tset/Xproto/QueryFont/XQueryFont "VSW5TESTSUITE CASE QueryKeymap 3" - /tset/Xproto/XQueryKeymap/XQueryKeymap + /tset/Xproto/QueryKeymap/XQueryKeymap "VSW5TESTSUITE CASE QueryPointer 3" - /tset/Xproto/XQueryPointer/XQueryPointer + /tset/Xproto/QueryPointer/XQueryPointer "VSW5TESTSUITE CASE QueryTree 3" - /tset/Xproto/XQueryTree/XQueryTree + /tset/Xproto/QueryTree/XQueryTree "VSW5TESTSUITE CASE QueryTextExtents 3" - /tset/Xproto/XQueryTextExtents/XQueryTextExtents + /tset/Xproto/QueryTextExtents/XQueryTextExtents "VSW5TESTSUITE CASE RecolorCursor 3" - /tset/Xproto/XRecolorCursor/XRecolorCursor + /tset/Xproto/RecolorCursor/XRecolorCursor "VSW5TESTSUITE CASE ReparentWindow 3" - /tset/Xproto/XReparentWindow/XReparentWindow + /tset/Xproto/ReparentWindow/XReparentWindow "VSW5TESTSUITE CASE RotateProperties 3" /tset/Xproto/RotateProperties/RotateProperties "VSW5TESTSUITE CASE SendEvent 3" - /tset/Xproto/XSendEvent/XSendEvent + /tset/Xproto/SendEvent/XSendEvent "VSW5TESTSUITE CASE SetAccessControl 3" - /tset/Xproto/XSetAccessControl/XSetAccessControl + /tset/Xproto/SetAccessControl/XSetAccessControl "VSW5TESTSUITE CASE SetClipRectangles 3" - /tset/Xproto/XSetClipRectangles/XSetClipRectangles + /tset/Xproto/SetClipRectangles/XSetClipRectangles "VSW5TESTSUITE CASE SetCloseDownMode 3" - /tset/Xproto/XSetCloseDownMode/XSetCloseDownMode + /tset/Xproto/SetCloseDownMode/XSetCloseDownMode "VSW5TESTSUITE CASE SetDashes 3" - /tset/Xproto/XSetDashes/XSetDashes + /tset/Xproto/SetDashes/XSetDashes "VSW5TESTSUITE CASE SetFontPath 3" - /tset/Xproto/XSetFontPath/XSetFontPath + /tset/Xproto/SetFontPath/XSetFontPath "VSW5TESTSUITE CASE SetInputFocus 3" - /tset/Xproto/XSetInputFocus/XSetInputFocus + /tset/Xproto/SetInputFocus/XSetInputFocus "VSW5TESTSUITE CASE SetModifierMapping 3" - /tset/Xproto/XSetModifierMapping/XSetModifierMapping + /tset/Xproto/SetModifierMapping/XSetModifierMapping "VSW5TESTSUITE CASE SetPointerMapping 3" - /tset/Xproto/XSetPointerMapping/XSetPointerMapping + /tset/Xproto/SetPointerMapping/XSetPointerMapping "VSW5TESTSUITE CASE StoreColors 4" - /tset/Xproto/XStoreColors/XStoreColors + /tset/Xproto/StoreColors/XStoreColors "VSW5TESTSUITE CASE StoreNamedColor 4" - /tset/Xproto/XStoreNamedColor/XStoreNamedColor + /tset/Xproto/StoreNamedColor/XStoreNamedColor "VSW5TESTSUITE CASE SetScreenSaver 3" - /tset/Xproto/XSetScreenSaver/XSetScreenSaver + /tset/Xproto/SetScreenSaver/XSetScreenSaver "VSW5TESTSUITE CASE SetSelectionOwner 3" - /tset/Xproto/XSetSelectionOwner/XSetSelectionOwner + /tset/Xproto/SetSelectionOwner/XSetSelectionOwner "VSW5TESTSUITE CASE TranslateCoords 3" /tset/Xproto/TranslateCoords/TranslateCoords "VSW5TESTSUITE CASE UngrabButton 3" - /tset/Xproto/XUngrabButton/XUngrabButton + /tset/Xproto/UngrabButton/XUngrabButton "VSW5TESTSUITE CASE UngrabKey 3" - /tset/Xproto/XUngrabKey/XUngrabKey + /tset/Xproto/UngrabKey/XUngrabKey "VSW5TESTSUITE CASE UngrabKeyboard 3" - /tset/Xproto/XUngrabKeyboard/XUngrabKeyboard + /tset/Xproto/UngrabKeyboard/XUngrabKeyboard "VSW5TESTSUITE CASE UngrabPointer 3" - /tset/Xproto/XUngrabPointer/XUngrabPointer + /tset/Xproto/UngrabPointer/XUngrabPointer "VSW5TESTSUITE CASE UngrabServer 3" - /tset/Xproto/XUngrabServer/XUngrabServer + /tset/Xproto/UngrabServer/XUngrabServer "VSW5TESTSUITE CASE UnmapSubwindows 3" - /tset/Xproto/XUnmapSubwindows/XUnmapSubwindows + /tset/Xproto/UnmapSubwindows/XUnmapSubwindows "VSW5TESTSUITE CASE UnmapWindow 3" - /tset/Xproto/XUnmapWindow/XUnmapWindow + /tset/Xproto/UnmapWindow/XUnmapWindow "VSW5TESTSUITE CASE UninstallColormap 3" - /tset/Xproto/XUninstallColormap/XUninstallColormap + /tset/Xproto/UninstallColormap/XUninstallColormap "VSW5TESTSUITE CASE WarpPointer 3" - /tset/Xproto/XWarpPointer/XWarpPointer + /tset/Xproto/WarpPointer/XWarpPointer diff --git a/xts5/tet_scen b/xts5/tet_scen index 74871e52..72b0a126 100644 --- a/xts5/tet_scen +++ b/xts5/tet_scen @@ -3106,23 +3106,23 @@ xXStringToKeysym pAllocColor "VSW5TESTSUITE CASE AllocColor 3" - /tset/Xproto/XAllocColor/XAllocColor + /tset/Xproto/AllocColor/AllocColor pAllocColorCells "VSW5TESTSUITE CASE AllocColorCells 3" - /tset/Xproto/XAllocColorCells/XAllocColorCells + /tset/Xproto/AllocColorCells/AllocColorCells pAllocColorPlanes "VSW5TESTSUITE CASE AllocColorPlanes 3" - /tset/Xproto/XAllocColorPlanes/XAllocColorPlanes + /tset/Xproto/AllocColorPlanes/AllocColorPlanes pAllocNamedColor "VSW5TESTSUITE CASE AllocNamedColor 3" - /tset/Xproto/XAllocNamedColor/XAllocNamedColor + /tset/Xproto/AllocNamedColor/AllocNamedColor pAllowEvents "VSW5TESTSUITE CASE AllowEvents 3" - /tset/Xproto/XAllowEvents/XAllowEvents + /tset/Xproto/AllowEvents/AllowEvents pBadRequest "VSW5TESTSUITE CASE BadRequest 1" @@ -3130,15 +3130,15 @@ pBadRequest pBell "VSW5TESTSUITE CASE Bell 3" - /tset/Xproto/XBell/XBell + /tset/Xproto/Bell/Bell pChangeActivePointerGrab "VSW5TESTSUITE CASE ChangeActivePointerGrab 3" - /tset/Xproto/XChangeActivePointerGrab/XChangeActivePointerGrab + /tset/Xproto/ChangeActivePointerGrab/ChangeActivePointerGrab pChangeGC "VSW5TESTSUITE CASE ChangeGC 4" - /tset/Xproto/XChangeGC/XChangeGC + /tset/Xproto/ChangeGC/ChangeGC pChangeHosts "VSW5TESTSUITE CASE ChangeHosts 3" @@ -3146,31 +3146,31 @@ pChangeHosts pChangeKeyboardControl "VSW5TESTSUITE CASE ChangeKeyboardControl 4" - /tset/Xproto/XChangeKeyboardControl/XChangeKeyboardControl + /tset/Xproto/ChangeKeyboardControl/ChangeKeyboardControl pChangeKeyboardMapping "VSW5TESTSUITE CASE ChangeKeyboardMapping 3" - /tset/Xproto/XChangeKeyboardMapping/XChangeKeyboardMapping + /tset/Xproto/ChangeKeyboardMapping/ChangeKeyboardMapping pChangePointerControl "VSW5TESTSUITE CASE ChangePointerControl 3" - /tset/Xproto/XChangePointerControl/XChangePointerControl + /tset/Xproto/ChangePointerControl/ChangePointerControl pChangeProperty "VSW5TESTSUITE CASE ChangeProperty 3" - /tset/Xproto/XChangeProperty/XChangeProperty + /tset/Xproto/ChangeProperty/ChangeProperty pChangeSaveSet "VSW5TESTSUITE CASE ChangeSaveSet 3" - /tset/Xproto/XChangeSaveSet/XChangeSaveSet + /tset/Xproto/ChangeSaveSet/ChangeSaveSet pChangeWindowAttributes "VSW5TESTSUITE CASE ChangeWindowAttributes 4" - /tset/Xproto/XChangeWindowAttributes/XChangeWindowAttributes + /tset/Xproto/ChangeWindowAttributes/ChangeWindowAttributes pClearArea "VSW5TESTSUITE CASE ClearArea 3" - /tset/Xproto/XClearArea/XClearArea + /tset/Xproto/ClearArea/ClearArea pCloseFont "VSW5TESTSUITE CASE CloseFont 3" @@ -3178,27 +3178,27 @@ pCloseFont pConfigureWindow "VSW5TESTSUITE CASE ConfigureWindow 4" - /tset/Xproto/XConfigureWindow/XConfigureWindow + /tset/Xproto/ConfigureWindow/ConfigureWindow pConvertSelection "VSW5TESTSUITE CASE ConvertSelection 3" - /tset/Xproto/XConvertSelection/XConvertSelection + /tset/Xproto/ConvertSelection/ConvertSelection pCopyArea "VSW5TESTSUITE CASE CopyArea 3" - /tset/Xproto/XCopyArea/XCopyArea + /tset/Xproto/CopyArea/CopyArea pCopyColormapAndFree "VSW5TESTSUITE CASE CopyColormapAndFree 5" - /tset/Xproto/XCopyColormapAndFree/XCopyColormapAndFree + /tset/Xproto/CopyColormapAndFree/CopyColormapAndFree pCopyGC "VSW5TESTSUITE CASE CopyGC 4" - /tset/Xproto/XCopyGC/XCopyGC + /tset/Xproto/CopyGC/CopyGC pCopyPlane "VSW5TESTSUITE CASE CopyPlane 3" - /tset/Xproto/XCopyPlane/XCopyPlane + /tset/Xproto/CopyPlane/CopyPlane pCirculateWindow "VSW5TESTSUITE CASE CirculateWindow 3" @@ -3206,7 +3206,7 @@ pCirculateWindow pCreateColormap "VSW5TESTSUITE CASE CreateColormap 5" - /tset/Xproto/XCreateColormap/XCreateColormap + /tset/Xproto/CreateColormap/CreateColormap pCreateCursor "VSW5TESTSUITE CASE CreateCursor 5" @@ -3214,31 +3214,31 @@ pCreateCursor pCreateGC "VSW5TESTSUITE CASE CreateGC 6" - /tset/Xproto/XCreateGC/XCreateGC + /tset/Xproto/CreateGC/CreateGC pCreateGlyphCursor "VSW5TESTSUITE CASE CreateGlyphCursor 5" - /tset/Xproto/XCreateGlyphCursor/XCreateGlyphCursor + /tset/Xproto/CreateGlyphCursor/CreateGlyphCursor pCreatePixmap "VSW5TESTSUITE CASE CreatePixmap 5" - /tset/Xproto/XCreatePixmap/XCreatePixmap + /tset/Xproto/CreatePixmap/CreatePixmap pCreateWindow "VSW5TESTSUITE CASE CreateWindow 6" - /tset/Xproto/XCreateWindow/XCreateWindow + /tset/Xproto/CreateWindow/CreateWindow pDeleteProperty "VSW5TESTSUITE CASE DeleteProperty 3" - /tset/Xproto/XDeleteProperty/XDeleteProperty + /tset/Xproto/DeleteProperty/DeleteProperty pDestroySubwindows "VSW5TESTSUITE CASE DestroySubwindows 3" - /tset/Xproto/XDestroySubwindows/XDestroySubwindows + /tset/Xproto/DestroySubwindows/DestroySubwindows pDestroyWindow "VSW5TESTSUITE CASE DestroyWindow 3" - /tset/Xproto/XDestroyWindow/XDestroyWindow + /tset/Xproto/DestroyWindow/DestroyWindow pFillPoly "VSW5TESTSUITE CASE FillPoly 3" @@ -3246,91 +3246,91 @@ pFillPoly pFreeColormap "VSW5TESTSUITE CASE FreeColormap 3" - /tset/Xproto/XFreeColormap/XFreeColormap + /tset/Xproto/FreeColormap/FreeColormap pFreeColors "VSW5TESTSUITE CASE FreeColors 3" - /tset/Xproto/XFreeColors/XFreeColors + /tset/Xproto/FreeColors/FreeColors pFreeCursor "VSW5TESTSUITE CASE FreeCursor 3" - /tset/Xproto/XFreeCursor/XFreeCursor + /tset/Xproto/FreeCursor/FreeCursor pForceScreenSaver "VSW5TESTSUITE CASE ForceScreenSaver 3" - /tset/Xproto/XForceScreenSaver/XForceScreenSaver + /tset/Xproto/ForceScreenSaver/ForceScreenSaver pFreeGC "VSW5TESTSUITE CASE FreeGC 3" - /tset/Xproto/XFreeGC/XFreeGC + /tset/Xproto/FreeGC/FreeGC pFreePixmap "VSW5TESTSUITE CASE FreePixmap 3" - /tset/Xproto/XFreePixmap/XFreePixmap + /tset/Xproto/FreePixmap/FreePixmap pGrabButton "VSW5TESTSUITE CASE GrabButton 3" - /tset/Xproto/XGrabButton/XGrabButton + /tset/Xproto/GrabButton/GrabButton pGrabKey "VSW5TESTSUITE CASE GrabKey 3" - /tset/Xproto/XGrabKey/XGrabKey + /tset/Xproto/GrabKey/GrabKey pGrabKeyboard "VSW5TESTSUITE CASE GrabKeyboard 3" - /tset/Xproto/XGrabKeyboard/XGrabKeyboard + /tset/Xproto/GrabKeyboard/GrabKeyboard pGrabPointer "VSW5TESTSUITE CASE GrabPointer 3" - /tset/Xproto/XGrabPointer/XGrabPointer + /tset/Xproto/GrabPointer/GrabPointer pGrabServer "VSW5TESTSUITE CASE GrabServer 3" - /tset/Xproto/XGrabServer/XGrabServer + /tset/Xproto/GrabServer/GrabServer pGetAtomName "VSW5TESTSUITE CASE GetAtomName 3" - /tset/Xproto/XGetAtomName/XGetAtomName + /tset/Xproto/GetAtomName/GetAtomName pGetFontPath "VSW5TESTSUITE CASE GetFontPath 3" - /tset/Xproto/XGetFontPath/XGetFontPath + /tset/Xproto/GetFontPath/GetFontPath pGetGeometry "VSW5TESTSUITE CASE GetGeometry 3" - /tset/Xproto/XGetGeometry/XGetGeometry + /tset/Xproto/GetGeometry/GetGeometry pGetImage "VSW5TESTSUITE CASE GetImage 3" - /tset/Xproto/XGetImage/XGetImage + /tset/Xproto/GetImage/GetImage pGetInputFocus "VSW5TESTSUITE CASE GetInputFocus 3" - /tset/Xproto/XGetInputFocus/XGetInputFocus + /tset/Xproto/GetInputFocus/GetInputFocus pGetKeyboardControl "VSW5TESTSUITE CASE GetKeyboardControl 3" - /tset/Xproto/XGetKeyboardControl/XGetKeyboardControl + /tset/Xproto/GetKeyboardControl/GetKeyboardControl pGetKeyboardMapping "VSW5TESTSUITE CASE GetKeyboardMapping 3" - /tset/Xproto/XGetKeyboardMapping/XGetKeyboardMapping + /tset/Xproto/GetKeyboardMapping/GetKeyboardMapping pGetModifierMapping "VSW5TESTSUITE CASE GetModifierMapping 3" - /tset/Xproto/XGetModifierMapping/XGetModifierMapping + /tset/Xproto/GetModifierMapping/GetModifierMapping pGetMotionEvents "VSW5TESTSUITE CASE GetMotionEvents 3" - /tset/Xproto/XGetMotionEvents/XGetMotionEvents + /tset/Xproto/GetMotionEvents/GetMotionEvents pGetPointerControl "VSW5TESTSUITE CASE GetPointerControl 3" - /tset/Xproto/XGetPointerControl/XGetPointerControl + /tset/Xproto/GetPointerControl/GetPointerControl pGetPointerMapping "VSW5TESTSUITE CASE GetPointerMapping 3" - /tset/Xproto/XGetPointerMapping/XGetPointerMapping + /tset/Xproto/GetPointerMapping/GetPointerMapping pGetProperty "VSW5TESTSUITE CASE GetProperty 3" @@ -3338,15 +3338,15 @@ pGetProperty pGetScreenSaver "VSW5TESTSUITE CASE GetScreenSaver 3" - /tset/Xproto/XGetScreenSaver/XGetScreenSaver + /tset/Xproto/GetScreenSaver/GetScreenSaver pGetSelectionOwner "VSW5TESTSUITE CASE GetSelectionOwner 3" - /tset/Xproto/XGetSelectionOwner/XGetSelectionOwner + /tset/Xproto/GetSelectionOwner/GetSelectionOwner pGetWindowAttributes "VSW5TESTSUITE CASE GetWindowAttributes 3" - /tset/Xproto/XGetWindowAttributes/XGetWindowAttributes + /tset/Xproto/GetWindowAttributes/GetWindowAttributes pImageText16 "VSW5TESTSUITE CASE ImageText16 3" @@ -3358,19 +3358,19 @@ pImageText8 pInstallColormap "VSW5TESTSUITE CASE InstallColormap 3" - /tset/Xproto/XInstallColormap/XInstallColormap + /tset/Xproto/InstallColormap/InstallColormap pInternAtom "VSW5TESTSUITE CASE InternAtom 3" - /tset/Xproto/XInternAtom/XInternAtom + /tset/Xproto/InternAtom/InternAtom pKillClient "VSW5TESTSUITE CASE KillClient 3" - /tset/Xproto/XKillClient/XKillClient + /tset/Xproto/KillClient/KillClient pLookupColor "VSW5TESTSUITE CASE LookupColor 3" - /tset/Xproto/XLookupColor/XLookupColor + /tset/Xproto/LookupColor/LookupColor pListExtensions "VSW5TESTSUITE CASE ListExtensions 3" @@ -3378,31 +3378,31 @@ pListExtensions pListFonts "VSW5TESTSUITE CASE ListFonts 3" - /tset/Xproto/XListFonts/XListFonts + /tset/Xproto/ListFonts/ListFonts pListFontsWithInfo "VSW5TESTSUITE CASE ListFontsWithInfo 3" - /tset/Xproto/XListFontsWithInfo/XListFontsWithInfo + /tset/Xproto/ListFontsWithInfo/ListFontsWithInfo pListHosts "VSW5TESTSUITE CASE ListHosts 3" - /tset/Xproto/XListHosts/XListHosts + /tset/Xproto/ListHosts/ListHosts pListInstalledColormaps "VSW5TESTSUITE CASE ListInstalledColormaps 3" - /tset/Xproto/XListInstalledColormaps/XListInstalledColormaps + /tset/Xproto/ListInstalledColormaps/ListInstalledColormaps pListProperties "VSW5TESTSUITE CASE ListProperties 3" - /tset/Xproto/XListProperties/XListProperties + /tset/Xproto/ListProperties/ListProperties pMapSubwindows "VSW5TESTSUITE CASE MapSubwindows 3" - /tset/Xproto/XMapSubwindows/XMapSubwindows + /tset/Xproto/MapSubwindows/MapSubwindows pMapWindow "VSW5TESTSUITE CASE MapWindow 3" - /tset/Xproto/XMapWindow/XMapWindow + /tset/Xproto/MapWindow/MapWindow pNoOperation "VSW5TESTSUITE CASE NoOperation 4" @@ -3410,7 +3410,7 @@ pNoOperation pOpenDisplay "VSW5TESTSUITE CASE OpenDisplay 2" - /tset/Xproto/XOpenDisplay/XOpenDisplay + /tset/Xproto/OpenDisplay/OpenDisplay pOpenFont "VSW5TESTSUITE CASE OpenFont 5" @@ -3454,15 +3454,15 @@ pPolyText8 pPutImage "VSW5TESTSUITE CASE PutImage 3" - /tset/Xproto/XPutImage/XPutImage + /tset/Xproto/PutImage/PutImage pQueryBestSize "VSW5TESTSUITE CASE QueryBestSize 3" - /tset/Xproto/XQueryBestSize/XQueryBestSize + /tset/Xproto/QueryBestSize/QueryBestSize pQueryColors "VSW5TESTSUITE CASE QueryColors 3" - /tset/Xproto/XQueryColors/XQueryColors + /tset/Xproto/QueryColors/QueryColors pQueryExtension "VSW5TESTSUITE CASE QueryExtension 3" @@ -3470,31 +3470,31 @@ pQueryExtension pQueryFont "VSW5TESTSUITE CASE QueryFont 3" - /tset/Xproto/XQueryFont/XQueryFont + /tset/Xproto/QueryFont/QueryFont pQueryKeymap "VSW5TESTSUITE CASE QueryKeymap 3" - /tset/Xproto/XQueryKeymap/XQueryKeymap + /tset/Xproto/QueryKeymap/QueryKeymap pQueryPointer "VSW5TESTSUITE CASE QueryPointer 3" - /tset/Xproto/XQueryPointer/XQueryPointer + /tset/Xproto/QueryPointer/QueryPointer pQueryTree "VSW5TESTSUITE CASE QueryTree 3" - /tset/Xproto/XQueryTree/XQueryTree + /tset/Xproto/QueryTree/QueryTree pQueryTextExtents "VSW5TESTSUITE CASE QueryTextExtents 3" - /tset/Xproto/XQueryTextExtents/XQueryTextExtents + /tset/Xproto/QueryTextExtents/QueryTextExtents pRecolorCursor "VSW5TESTSUITE CASE RecolorCursor 3" - /tset/Xproto/XRecolorCursor/XRecolorCursor + /tset/Xproto/RecolorCursor/RecolorCursor pReparentWindow "VSW5TESTSUITE CASE ReparentWindow 3" - /tset/Xproto/XReparentWindow/XReparentWindow + /tset/Xproto/ReparentWindow/ReparentWindow pRotateProperties "VSW5TESTSUITE CASE RotateProperties 3" @@ -3502,55 +3502,55 @@ pRotateProperties pSendEvent "VSW5TESTSUITE CASE SendEvent 3" - /tset/Xproto/XSendEvent/XSendEvent + /tset/Xproto/SendEvent/SendEvent pSetAccessControl "VSW5TESTSUITE CASE SetAccessControl 3" - /tset/Xproto/XSetAccessControl/XSetAccessControl + /tset/Xproto/SetAccessControl/SetAccessControl pSetClipRectangles "VSW5TESTSUITE CASE SetClipRectangles 3" - /tset/Xproto/XSetClipRectangles/XSetClipRectangles + /tset/Xproto/SetClipRectangles/SetClipRectangles pSetCloseDownMode "VSW5TESTSUITE CASE SetCloseDownMode 3" - /tset/Xproto/XSetCloseDownMode/XSetCloseDownMode + /tset/Xproto/SetCloseDownMode/SetCloseDownMode pSetDashes "VSW5TESTSUITE CASE SetDashes 3" - /tset/Xproto/XSetDashes/XSetDashes + /tset/Xproto/SetDashes/SetDashes pSetFontPath "VSW5TESTSUITE CASE SetFontPath 3" - /tset/Xproto/XSetFontPath/XSetFontPath + /tset/Xproto/SetFontPath/SetFontPath pSetInputFocus "VSW5TESTSUITE CASE SetInputFocus 3" - /tset/Xproto/XSetInputFocus/XSetInputFocus + /tset/Xproto/SetInputFocus/SetInputFocus pSetModifierMapping "VSW5TESTSUITE CASE SetModifierMapping 3" - /tset/Xproto/XSetModifierMapping/XSetModifierMapping + /tset/Xproto/SetModifierMapping/SetModifierMapping pSetPointerMapping "VSW5TESTSUITE CASE SetPointerMapping 3" - /tset/Xproto/XSetPointerMapping/XSetPointerMapping + /tset/Xproto/SetPointerMapping/SetPointerMapping pStoreColors "VSW5TESTSUITE CASE StoreColors 4" - /tset/Xproto/XStoreColors/XStoreColors + /tset/Xproto/StoreColors/StoreColors pStoreNamedColor "VSW5TESTSUITE CASE StoreNamedColor 4" - /tset/Xproto/XStoreNamedColor/XStoreNamedColor + /tset/Xproto/StoreNamedColor/StoreNamedColor pSetScreenSaver "VSW5TESTSUITE CASE SetScreenSaver 3" - /tset/Xproto/XSetScreenSaver/XSetScreenSaver + /tset/Xproto/SetScreenSaver/SetScreenSaver pSetSelectionOwner "VSW5TESTSUITE CASE SetSelectionOwner 3" - /tset/Xproto/XSetSelectionOwner/XSetSelectionOwner + /tset/Xproto/SetSelectionOwner/SetSelectionOwner pTranslateCoords "VSW5TESTSUITE CASE TranslateCoords 3" @@ -3558,39 +3558,39 @@ pTranslateCoords pUngrabButton "VSW5TESTSUITE CASE UngrabButton 3" - /tset/Xproto/XUngrabButton/XUngrabButton + /tset/Xproto/UngrabButton/UngrabButton pUngrabKey "VSW5TESTSUITE CASE UngrabKey 3" - /tset/Xproto/XUngrabKey/XUngrabKey + /tset/Xproto/UngrabKey/UngrabKey pUngrabKeyboard "VSW5TESTSUITE CASE UngrabKeyboard 3" - /tset/Xproto/XUngrabKeyboard/XUngrabKeyboard + /tset/Xproto/UngrabKeyboard/UngrabKeyboard pUngrabPointer "VSW5TESTSUITE CASE UngrabPointer 3" - /tset/Xproto/XUngrabPointer/XUngrabPointer + /tset/Xproto/UngrabPointer/UngrabPointer pUngrabServer "VSW5TESTSUITE CASE UngrabServer 3" - /tset/Xproto/XUngrabServer/XUngrabServer + /tset/Xproto/UngrabServer/UngrabServer pUnmapSubwindows "VSW5TESTSUITE CASE UnmapSubwindows 3" - /tset/Xproto/XUnmapSubwindows/XUnmapSubwindows + /tset/Xproto/UnmapSubwindows/UnmapSubwindows pUnmapWindow "VSW5TESTSUITE CASE UnmapWindow 3" - /tset/Xproto/XUnmapWindow/XUnmapWindow + /tset/Xproto/UnmapWindow/UnmapWindow pUninstallColormap "VSW5TESTSUITE CASE UninstallColormap 3" - /tset/Xproto/XUninstallColormap/XUninstallColormap + /tset/Xproto/UninstallColormap/UninstallColormap pWarpPointer "VSW5TESTSUITE CASE WarpPointer 3" - /tset/Xproto/XWarpPointer/XWarpPointer + /tset/Xproto/WarpPointer/WarpPointer #Discrete tests for Xt Chapter 3 diff --git a/xts5/tset/Xproto/.gitignore b/xts5/tset/Xproto/.gitignore index 31454b89..3e6ab5d8 100644 --- a/xts5/tset/Xproto/.gitignore +++ b/xts5/tset/Xproto/.gitignore @@ -1,80 +1,80 @@ -XAllocColor/XAllocColor -XAllocColorCells/XAllocColorCells -XAllocColorPlanes/XAllocColorPlanes -XAllocNamedColor/XAllocNamedColor -XAllowEvents/XAllowEvents +AllocColor/AllocColor +AllocColorCells/AllocColorCells +AllocColorPlanes/AllocColorPlanes +AllocNamedColor/AllocNamedColor +AllowEvents/AllowEvents BadRequest/BadRequest -XBell/XBell -XChangeActivePointerGrab/XChangeActivePointerGrab -XChangeGC/XChangeGC +Bell/XBell +ChangeActivePointerGrab/XChangeActivePointerGrab +ChangeGC/XChangeGC ChangeHosts/ChangeHosts -XChangeKeyboardControl/XChangeKeyboardControl -XChangeKeyboardMapping/XChangeKeyboardMapping -XChangePointerControl/XChangePointerControl -XChangeProperty/XChangeProperty -XChangeSaveSet/XChangeSaveSet -XChangeWindowAttributes/XChangeWindowAttributes -XClearArea/XClearArea +ChangeKeyboardControl/XChangeKeyboardControl +ChangeKeyboardMapping/XChangeKeyboardMapping +ChangePointerControl/XChangePointerControl +ChangeProperty/XChangeProperty +ChangeSaveSet/XChangeSaveSet +ChangeWindowAttributes/XChangeWindowAttributes +ClearArea/XClearArea CloseFont/CloseFont -XConfigureWindow/XConfigureWindow -XConvertSelection/XConvertSelection -XCopyArea/XCopyArea -XCopyColormapAndFree/XCopyColormapAndFree -XCopyGC/XCopyGC -XCopyPlane/XCopyPlane +ConfigureWindow/XConfigureWindow +ConvertSelection/XConvertSelection +CopyArea/XCopyArea +CopyColormapAndFree/XCopyColormapAndFree +CopyGC/XCopyGC +CopyPlane/XCopyPlane CirculateWindow/CirculateWindow -XCreateColormap/XCreateColormap +CreateColormap/XCreateColormap CreateCursor/CreateCursor -XCreateGC/XCreateGC -XCreateGlyphCursor/XCreateGlyphCursor -XCreatePixmap/XCreatePixmap -XCreateWindow/XCreateWindow -XDeleteProperty/XDeleteProperty -XDestroySubwindows/XDestroySubwindows -XDestroyWindow/XDestroyWindow +CreateGC/XCreateGC +CreateGlyphCursor/XCreateGlyphCursor +CreatePixmap/XCreatePixmap +CreateWindow/XCreateWindow +DeleteProperty/XDeleteProperty +DestroySubwindows/XDestroySubwindows +DestroyWindow/XDestroyWindow FillPoly/FillPoly -XFreeColormap/XFreeColormap -XFreeColors/XFreeColors -XFreeCursor/XFreeCursor -XForceScreenSaver/XForceScreenSaver -XFreeGC/XFreeGC -XFreePixmap/XFreePixmap -XGrabButton/XGrabButton -XGrabKey/XGrabKey -XGrabKeyboard/XGrabKeyboard -XGrabPointer/XGrabPointer -XGrabServer/XGrabServer -XGetAtomName/XGetAtomName -XGetFontPath/XGetFontPath -XGetGeometry/XGetGeometry -XGetImage/XGetImage -XGetInputFocus/XGetInputFocus -XGetKeyboardControl/XGetKeyboardControl -XGetKeyboardMapping/XGetKeyboardMapping -XGetModifierMapping/XGetModifierMapping -XGetMotionEvents/XGetMotionEvents -XGetPointerControl/XGetPointerControl -XGetPointerMapping/XGetPointerMapping +FreeColormap/XFreeColormap +FreeColors/XFreeColors +FreeCursor/XFreeCursor +ForceScreenSaver/XForceScreenSaver +FreeGC/XFreeGC +FreePixmap/XFreePixmap +GrabButton/XGrabButton +GrabKey/XGrabKey +GrabKeyboard/XGrabKeyboard +GrabPointer/XGrabPointer +GrabServer/XGrabServer +GetAtomName/XGetAtomName +GetFontPath/XGetFontPath +GetGeometry/XGetGeometry +GetImage/XGetImage +GetInputFocus/XGetInputFocus +GetKeyboardControl/XGetKeyboardControl +GetKeyboardMapping/XGetKeyboardMapping +GetModifierMapping/XGetModifierMapping +GetMotionEvents/XGetMotionEvents +GetPointerControl/XGetPointerControl +GetPointerMapping/XGetPointerMapping GetProperty/GetProperty -XGetScreenSaver/XGetScreenSaver -XGetSelectionOwner/XGetSelectionOwner -XGetWindowAttributes/XGetWindowAttributes +GetScreenSaver/XGetScreenSaver +GetSelectionOwner/XGetSelectionOwner +GetWindowAttributes/XGetWindowAttributes ImageText16/ImageText16 ImageText8/ImageText8 -XInstallColormap/XInstallColormap -XInternAtom/XInternAtom -XKillClient/XKillClient -XLookupColor/XLookupColor +InstallColormap/XInstallColormap +InternAtom/XInternAtom +KillClient/XKillClient +LookupColor/XLookupColor ListExtensions/ListExtensions -XListFonts/XListFonts -XListFontsWithInfo/XListFontsWithInfo -XListHosts/XListHosts -XListInstalledColormaps/XListInstalledColormaps -XListProperties/XListProperties -XMapSubwindows/XMapSubwindows -XMapWindow/XMapWindow +ListFonts/XListFonts +ListFontsWithInfo/XListFontsWithInfo +ListHosts/XListHosts +ListInstalledColormaps/XListInstalledColormaps +ListProperties/XListProperties +MapSubwindows/XMapSubwindows +MapWindow/XMapWindow NoOperation/NoOperation -XOpenDisplay/XOpenDisplay +OpenDisplay/XOpenDisplay OpenFont/OpenFont PolyArc/PolyArc PolyFillArc/PolyFillArc @@ -85,38 +85,38 @@ PolyRectangle/PolyRectangle PolySegment/PolySegment PolyText16/PolyText16 PolyText8/PolyText8 -XPutImage/XPutImage -XQueryBestSize/XQueryBestSize -XQueryColors/XQueryColors +PutImage/XPutImage +QueryBestSize/XQueryBestSize +QueryColors/XQueryColors QueryExtension/QueryExtension -XQueryFont/XQueryFont -XQueryKeymap/XQueryKeymap -XQueryPointer/XQueryPointer -XQueryTree/XQueryTree -XQueryTextExtents/XQueryTextExtents -XRecolorCursor/XRecolorCursor -XReparentWindow/XReparentWindow +QueryFont/XQueryFont +QueryKeymap/XQueryKeymap +QueryPointer/XQueryPointer +QueryTree/XQueryTree +QueryTextExtents/XQueryTextExtents +RecolorCursor/XRecolorCursor +ReparentWindow/XReparentWindow RotateProperties/RotateProperties -XSendEvent/XSendEvent -XSetAccessControl/XSetAccessControl -XSetClipRectangles/XSetClipRectangles -XSetCloseDownMode/XSetCloseDownMode -XSetDashes/XSetDashes -XSetFontPath/XSetFontPath -XSetInputFocus/XSetInputFocus -XSetModifierMapping/XSetModifierMapping -XSetPointerMapping/XSetPointerMapping -XStoreColors/XStoreColors -XStoreNamedColor/XStoreNamedColor -XSetScreenSaver/XSetScreenSaver -XSetSelectionOwner/XSetSelectionOwner +SendEvent/XSendEvent +SetAccessControl/XSetAccessControl +SetClipRectangles/XSetClipRectangles +SetCloseDownMode/XSetCloseDownMode +SetDashes/XSetDashes +SetFontPath/XSetFontPath +SetInputFocus/XSetInputFocus +SetModifierMapping/XSetModifierMapping +SetPointerMapping/XSetPointerMapping +StoreColors/XStoreColors +StoreNamedColor/XStoreNamedColor +SetScreenSaver/XSetScreenSaver +SetSelectionOwner/XSetSelectionOwner TranslateCoords/TranslateCoords -XUngrabButton/XUngrabButton -XUngrabKey/XUngrabKey -XUngrabKeyboard/XUngrabKeyboard -XUngrabPointer/XUngrabPointer -XUngrabServer/XUngrabServer -XUnmapSubwindows/XUnmapSubwindows -XUnmapWindow/XUnmapWindow -XUninstallColormap/XUninstallColormap -XWarpPointer/XWarpPointer +UngrabButton/XUngrabButton +UngrabKey/XUngrabKey +UngrabKeyboard/XUngrabKeyboard +UngrabPointer/XUngrabPointer +UngrabServer/XUngrabServer +UnmapSubwindows/XUnmapSubwindows +UnmapWindow/XUnmapWindow +UninstallColormap/XUninstallColormap +WarpPointer/XWarpPointer diff --git a/xts5/tset/Xproto/AllocColor/AllocColor.m b/xts5/tset/Xproto/AllocColor/AllocColor.m index 41e28e6c..9cb746a2 100644 --- a/xts5/tset/Xproto/AllocColor/AllocColor.m +++ b/xts5/tset/Xproto/AllocColor/AllocColor.m @@ -17,14 +17,14 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XAllocColor/XAllocColor.m,v 1.2 2005-11-03 08:44:01 jmichael Exp $ +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/AllocColor/AllocColor.m,v 1.2 2005-11-03 08:44:01 jmichael Exp $ Copyright (c) Applied Testing and Technology, Inc. 1995 All Rights Reserved. >># Project: VSW5 >># ->># File: xts5/tset/Xproto/XAllocColor/XAllocColor.m +>># File: xts5/tset/Xproto/AllocColor/AllocColor.m >># >># Description: >># Tests for AllocColor diff --git a/xts5/tset/Xproto/AllocColorCells/AllocColorCells.m b/xts5/tset/Xproto/AllocColorCells/AllocColorCells.m new file mode 100644 index 00000000..ca76f1fd --- /dev/null +++ b/xts5/tset/Xproto/AllocColorCells/AllocColorCells.m @@ -0,0 +1,300 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/AllocColorCells/AllocColorCells.m,v 1.2 2005-11-03 08:44:01 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/AllocColorCells/AllocColorCells.m +>># +>># Description: +>># Tests for AllocColorCells +>># +>># Modifications: +>># $Log: allcclrcll.m,v $ +>># Revision 1.2 2005-11-03 08:44:01 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:41 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:13 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:52:33 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:23:45 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:17 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:04:26 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:02:56 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE AllocColorCells Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for AllocColorCells request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xResourceReq *req; +xAllocColorCellsReply *reply; +xError *err; + +/* + intent: send an AllocColorCells request to the server and check + that the server sent an AllocColorCells reply back if + colormap is supposed to allocate color cells, otherwise + check that an error was sent back. + input: + output: none + global input: + side effects: creates a window resource + methods: +*/ + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + (void) Create_Default_Colormap(CLIENT); + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_AllocColorCells); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default AllocColorCells request\n", CLIENT); + if (Allocatable (CLIENT)) + if ((reply = (xAllocColorCellsReply *) Expect_Reply(CLIENT, X_AllocColorCells)) == NULL) { + Log_Err("client %d failed to receive AllocColorCells reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received AllocColorCells reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(reply); + } + else + if ((err = Expect_Error(CLIENT, BadAlloc)) == NULL) { + Log_Err("client %d failed to receive Alloc error\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received Alloc error\n", CLIENT); + Free_Error(err); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent AllocColorCells request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong AllocColorCells request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good C +If the default visual class for screen zero is +.S DirectColor , +.S PseudoColor , +or +.S GrayScale : +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +Otherwise: +When a client sends a valid xname protocol request to the X server, +then the X server sends back a BadAlloc error to the client. +>>STRATEGY +Call library function testfunc() to do the following: + +If the default visual class for screen zero is +DirectColor, PseudoColor, or GrayScale : +Open a connection to the X server using native byte sex. +Create colourmap with alloc set to AllocNone. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Create colourmap with alloc set to AllocNone. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. + +Otherwise: +Open a connection to the X server using native byte sex. +Create colourmap with alloc set to AllocNone. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a BadAlloc error. +Open a connection to the X server using reversed byte sex. +Create colourmap with alloc set to AllocNone. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a BadAlloc error. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Create colourmap with alloc set to AllocNone. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Create colourmap with alloc set to AllocNone. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Create colourmap with alloc set to AllocNone. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Create colourmap with alloc set to AllocNone. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Create colourmap with alloc set to AllocNone. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Create colourmap with alloc set to AllocNone. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/AllocColorCells/XAllocColorCells.m b/xts5/tset/Xproto/AllocColorCells/XAllocColorCells.m deleted file mode 100644 index 248a6c59..00000000 --- a/xts5/tset/Xproto/AllocColorCells/XAllocColorCells.m +++ /dev/null @@ -1,300 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XAllocColorCells/XAllocColorCells.m,v 1.2 2005-11-03 08:44:01 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XAllocColorCells/XAllocColorCells.m ->># ->># Description: ->># Tests for AllocColorCells ->># ->># Modifications: ->># $Log: allcclrcll.m,v $ ->># Revision 1.2 2005-11-03 08:44:01 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:41 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:13 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:52:33 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:23:45 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:17 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:04:26 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:02:56 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE AllocColorCells Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for AllocColorCells request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xResourceReq *req; -xAllocColorCellsReply *reply; -xError *err; - -/* - intent: send an AllocColorCells request to the server and check - that the server sent an AllocColorCells reply back if - colormap is supposed to allocate color cells, otherwise - check that an error was sent back. - input: - output: none - global input: - side effects: creates a window resource - methods: -*/ - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - (void) Create_Default_Colormap(CLIENT); - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_AllocColorCells); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default AllocColorCells request\n", CLIENT); - if (Allocatable (CLIENT)) - if ((reply = (xAllocColorCellsReply *) Expect_Reply(CLIENT, X_AllocColorCells)) == NULL) { - Log_Err("client %d failed to receive AllocColorCells reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received AllocColorCells reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(reply); - } - else - if ((err = Expect_Error(CLIENT, BadAlloc)) == NULL) { - Log_Err("client %d failed to receive Alloc error\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received Alloc error\n", CLIENT); - Free_Error(err); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent AllocColorCells request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong AllocColorCells request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good C -If the default visual class for screen zero is -.S DirectColor , -.S PseudoColor , -or -.S GrayScale : -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. -Otherwise: -When a client sends a valid xname protocol request to the X server, -then the X server sends back a BadAlloc error to the client. ->>STRATEGY -Call library function testfunc() to do the following: - -If the default visual class for screen zero is -DirectColor, PseudoColor, or GrayScale : -Open a connection to the X server using native byte sex. -Create colourmap with alloc set to AllocNone. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Create colourmap with alloc set to AllocNone. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. - -Otherwise: -Open a connection to the X server using native byte sex. -Create colourmap with alloc set to AllocNone. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a BadAlloc error. -Open a connection to the X server using reversed byte sex. -Create colourmap with alloc set to AllocNone. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a BadAlloc error. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Create colourmap with alloc set to AllocNone. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Create colourmap with alloc set to AllocNone. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Create colourmap with alloc set to AllocNone. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Create colourmap with alloc set to AllocNone. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Create colourmap with alloc set to AllocNone. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Create colourmap with alloc set to AllocNone. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/AllocColorPlanes/AllocColorPlanes.m b/xts5/tset/Xproto/AllocColorPlanes/AllocColorPlanes.m new file mode 100644 index 00000000..e4802278 --- /dev/null +++ b/xts5/tset/Xproto/AllocColorPlanes/AllocColorPlanes.m @@ -0,0 +1,300 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/AllocColorPlanes/AllocColorPlanes.m,v 1.2 2005-11-03 08:44:01 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/AllocColorPlanes/AllocColorPlanes.m +>># +>># Description: +>># Tests for AllocColorPlanes +>># +>># Modifications: +>># $Log: allcclrpln.m,v $ +>># Revision 1.2 2005-11-03 08:44:01 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:41 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:13 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:52:34 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:23:45 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:17 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:04:27 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:02:59 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE AllocColorPlanes Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for AllocColorPlanes request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xResourceReq *req; +xAllocColorPlanesReply *reply; +xError *err; + +/* + intent: send an AllocColorPlanes request to the server and check + that the server sent an AllocColorPlanes reply back if + colormap is supposed to allocate color planes, otherwise + check that an error was sent back. + input: + output: none + global input: + side effects: creates a window resource + methods: +*/ + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + (void) Create_Default_Colormap(CLIENT); + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_AllocColorPlanes); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default AllocColorPlanes request\n", CLIENT); + if (Allocatable (CLIENT)) + if ((reply = (xAllocColorPlanesReply *) Expect_Reply(CLIENT, X_AllocColorPlanes)) == NULL) { + Log_Err("client %d failed to receive AllocColorPlanes reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received AllocColorPlanes reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(reply); + } + else + if ((err = Expect_Error(CLIENT, BadAlloc)) == NULL) { + Log_Err("client %d failed to receive Alloc error\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received Alloc error\n", CLIENT); + Free_Error(err); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent AllocColorPlanes request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong AllocColorPlanes request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good C +If the default visual class for screen zero is +.S DirectColor , +.S PseudoColor , +or +.S GrayScale : +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +Otherwise: +When a client sends a valid xname protocol request to the X server, +then the X server sends back a BadAlloc error to the client. +>>STRATEGY +Call library function testfunc() to do the following: + +If the default visual class for screen zero is +DirectColor, PseudoColor, or GrayScale : +Open a connection to the X server using native byte sex. +Create colourmap with alloc set to AllocNone. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Create colourmap with alloc set to AllocNone. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. + +Otherwise: +Open a connection to the X server using native byte sex. +Create colourmap with alloc set to AllocNone. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a BadAlloc error. +Open a connection to the X server using reversed byte sex. +Create colourmap with alloc set to AllocNone. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a BadAlloc error. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Create colourmap with alloc set to AllocNone. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Create colourmap with alloc set to AllocNone. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Create colourmap with alloc set to AllocNone. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Create colourmap with alloc set to AllocNone. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Create colourmap with alloc set to AllocNone. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Create colourmap with alloc set to AllocNone. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/AllocColorPlanes/XAllocColorPlanes.m b/xts5/tset/Xproto/AllocColorPlanes/XAllocColorPlanes.m deleted file mode 100644 index 21aa9fd1..00000000 --- a/xts5/tset/Xproto/AllocColorPlanes/XAllocColorPlanes.m +++ /dev/null @@ -1,300 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XAllocColorPlanes/XAllocColorPlanes.m,v 1.2 2005-11-03 08:44:01 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XAllocColorPlanes/XAllocColorPlanes.m ->># ->># Description: ->># Tests for AllocColorPlanes ->># ->># Modifications: ->># $Log: allcclrpln.m,v $ ->># Revision 1.2 2005-11-03 08:44:01 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:41 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:13 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:52:34 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:23:45 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:17 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:04:27 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:02:59 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE AllocColorPlanes Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for AllocColorPlanes request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xResourceReq *req; -xAllocColorPlanesReply *reply; -xError *err; - -/* - intent: send an AllocColorPlanes request to the server and check - that the server sent an AllocColorPlanes reply back if - colormap is supposed to allocate color planes, otherwise - check that an error was sent back. - input: - output: none - global input: - side effects: creates a window resource - methods: -*/ - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - (void) Create_Default_Colormap(CLIENT); - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_AllocColorPlanes); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default AllocColorPlanes request\n", CLIENT); - if (Allocatable (CLIENT)) - if ((reply = (xAllocColorPlanesReply *) Expect_Reply(CLIENT, X_AllocColorPlanes)) == NULL) { - Log_Err("client %d failed to receive AllocColorPlanes reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received AllocColorPlanes reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(reply); - } - else - if ((err = Expect_Error(CLIENT, BadAlloc)) == NULL) { - Log_Err("client %d failed to receive Alloc error\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received Alloc error\n", CLIENT); - Free_Error(err); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent AllocColorPlanes request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong AllocColorPlanes request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good C -If the default visual class for screen zero is -.S DirectColor , -.S PseudoColor , -or -.S GrayScale : -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. -Otherwise: -When a client sends a valid xname protocol request to the X server, -then the X server sends back a BadAlloc error to the client. ->>STRATEGY -Call library function testfunc() to do the following: - -If the default visual class for screen zero is -DirectColor, PseudoColor, or GrayScale : -Open a connection to the X server using native byte sex. -Create colourmap with alloc set to AllocNone. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Create colourmap with alloc set to AllocNone. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. - -Otherwise: -Open a connection to the X server using native byte sex. -Create colourmap with alloc set to AllocNone. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a BadAlloc error. -Open a connection to the X server using reversed byte sex. -Create colourmap with alloc set to AllocNone. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a BadAlloc error. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Create colourmap with alloc set to AllocNone. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Create colourmap with alloc set to AllocNone. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Create colourmap with alloc set to AllocNone. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Create colourmap with alloc set to AllocNone. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Create colourmap with alloc set to AllocNone. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Create colourmap with alloc set to AllocNone. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/AllocNamedColor/AllocNamedColor.m b/xts5/tset/Xproto/AllocNamedColor/AllocNamedColor.m new file mode 100644 index 00000000..1ffa89c6 --- /dev/null +++ b/xts5/tset/Xproto/AllocNamedColor/AllocNamedColor.m @@ -0,0 +1,265 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/AllocNamedColor/AllocNamedColor.m,v 1.2 2005-11-03 08:44:01 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/AllocNamedColor/AllocNamedColor.m +>># +>># Description: +>># Tests for AllocNamedColor +>># +>># Modifications: +>># $Log: allcnmdclr.m,v $ +>># Revision 1.2 2005-11-03 08:44:01 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:41 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:14 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:52:35 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:23:46 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:18 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:04:29 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:03:01 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE AllocNamedColor Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for AllocNamedColor request */ +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xResourceReq *req; +xAllocNamedColorReply *reply; + +/* + intent: send a AllocNamedColor request to the server and check + that the server sent an AllocNamedColor reply back + input: + output: none + global input: + side effects: creates a window resource + methods: +*/ + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + (void) Create_Default_Colormap(CLIENT); + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_AllocNamedColor); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default AllocNamedColor request\n", CLIENT); + if ((reply = (xAllocNamedColorReply *) Expect_Reply(CLIENT, X_AllocNamedColor)) == NULL) { + Log_Err("client %d failed to receive AllocNamedColor reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received AllocNamedColor reply\n", CLIENT); + /* do any reply checking here */ + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent AllocNamedColor request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong AllocNamedColor request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Create colourmap with alloc set to AllocNone. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Create colourmap with alloc set to AllocNone. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Create colourmap with alloc set to AllocNone. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Create colourmap with alloc set to AllocNone. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Create colourmap with alloc set to AllocNone. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Create colourmap with alloc set to AllocNone. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Create colourmap with alloc set to AllocNone. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Create colourmap with alloc set to AllocNone. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/AllocNamedColor/XAllocNamedColor.m b/xts5/tset/Xproto/AllocNamedColor/XAllocNamedColor.m deleted file mode 100644 index 9c756d23..00000000 --- a/xts5/tset/Xproto/AllocNamedColor/XAllocNamedColor.m +++ /dev/null @@ -1,265 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XAllocNamedColor/XAllocNamedColor.m,v 1.2 2005-11-03 08:44:01 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XAllocNamedColor/XAllocNamedColor.m ->># ->># Description: ->># Tests for AllocNamedColor ->># ->># Modifications: ->># $Log: allcnmdclr.m,v $ ->># Revision 1.2 2005-11-03 08:44:01 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:41 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:14 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:52:35 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:23:46 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:18 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:04:29 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:03:01 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE AllocNamedColor Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for AllocNamedColor request */ -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xResourceReq *req; -xAllocNamedColorReply *reply; - -/* - intent: send a AllocNamedColor request to the server and check - that the server sent an AllocNamedColor reply back - input: - output: none - global input: - side effects: creates a window resource - methods: -*/ - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - (void) Create_Default_Colormap(CLIENT); - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_AllocNamedColor); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default AllocNamedColor request\n", CLIENT); - if ((reply = (xAllocNamedColorReply *) Expect_Reply(CLIENT, X_AllocNamedColor)) == NULL) { - Log_Err("client %d failed to receive AllocNamedColor reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received AllocNamedColor reply\n", CLIENT); - /* do any reply checking here */ - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent AllocNamedColor request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong AllocNamedColor request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Create colourmap with alloc set to AllocNone. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Create colourmap with alloc set to AllocNone. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Create colourmap with alloc set to AllocNone. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Create colourmap with alloc set to AllocNone. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Create colourmap with alloc set to AllocNone. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Create colourmap with alloc set to AllocNone. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Create colourmap with alloc set to AllocNone. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Create colourmap with alloc set to AllocNone. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/AllowEvents/AllowEvents.m b/xts5/tset/Xproto/AllowEvents/AllowEvents.m new file mode 100644 index 00000000..7fbd2bb8 --- /dev/null +++ b/xts5/tset/Xproto/AllowEvents/AllowEvents.m @@ -0,0 +1,260 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/AllowEvents/AllowEvents.m,v 1.2 2005-11-03 08:44:01 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/AllowEvents/AllowEvents.m +>># +>># Description: +>># Tests for AllowEvents +>># +>># Modifications: +>># $Log: allwevnts.m,v $ +>># Revision 1.2 2005-11-03 08:44:01 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:41 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:14 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:52:36 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:23:46 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:18 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:04:30 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:03:03 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE AllowEvents Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for AllowEvents request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xGrabPointerReq *gpr; +xGrabPointerReply *gprep; +xAllowEventsReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + + gpr = (xGrabPointerReq *) Make_Req(CLIENT, X_GrabPointer); + gpr->pointerMode = GrabModeSync; + Send_Req(CLIENT, (xReq *) gpr); + Log_Trace("client %d sent (pointerMode = GrabModeSync) GrabPointer request\n", CLIENT); + + if ((gprep = (xGrabPointerReply *) Expect_Reply(CLIENT, X_GrabPointer)) == NULL) { + Log_Err("client %d failed to receive GrabPointer reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received GrabPointer reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(gprep); + } + (void) Expect_Nothing(CLIENT); + Free_Req(gpr); + + Set_Test_Type(CLIENT, test_type); + req = (xAllowEventsReq *) Make_Req(CLIENT, X_AllowEvents); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default AllowEvents request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent AllowEvents request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong AllowEvents request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +and the client has no event selected in the +.M event_mask +for any window, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/AllowEvents/XAllowEvents.m b/xts5/tset/Xproto/AllowEvents/XAllowEvents.m deleted file mode 100644 index df969fe0..00000000 --- a/xts5/tset/Xproto/AllowEvents/XAllowEvents.m +++ /dev/null @@ -1,260 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XAllowEvents/XAllowEvents.m,v 1.2 2005-11-03 08:44:01 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XAllowEvents/XAllowEvents.m ->># ->># Description: ->># Tests for AllowEvents ->># ->># Modifications: ->># $Log: allwevnts.m,v $ ->># Revision 1.2 2005-11-03 08:44:01 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:41 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:14 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:52:36 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:23:46 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:18 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:04:30 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:03:03 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE AllowEvents Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for AllowEvents request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xGrabPointerReq *gpr; -xGrabPointerReply *gprep; -xAllowEventsReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - - gpr = (xGrabPointerReq *) Make_Req(CLIENT, X_GrabPointer); - gpr->pointerMode = GrabModeSync; - Send_Req(CLIENT, (xReq *) gpr); - Log_Trace("client %d sent (pointerMode = GrabModeSync) GrabPointer request\n", CLIENT); - - if ((gprep = (xGrabPointerReply *) Expect_Reply(CLIENT, X_GrabPointer)) == NULL) { - Log_Err("client %d failed to receive GrabPointer reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received GrabPointer reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(gprep); - } - (void) Expect_Nothing(CLIENT); - Free_Req(gpr); - - Set_Test_Type(CLIENT, test_type); - req = (xAllowEventsReq *) Make_Req(CLIENT, X_AllowEvents); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default AllowEvents request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent AllowEvents request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong AllowEvents request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -and the client has no event selected in the -.M event_mask -for any window, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/Bell/Bell.m b/xts5/tset/Xproto/Bell/Bell.m new file mode 100644 index 00000000..96edad3d --- /dev/null +++ b/xts5/tset/Xproto/Bell/Bell.m @@ -0,0 +1,237 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/Bell/Bell.m,v 1.2 2005-11-03 08:44:02 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/Bell/Bell.m +>># +>># Description: +>># Tests for Bell +>># +>># Modifications: +>># $Log: bll.m,v $ +>># Revision 1.2 2005-11-03 08:44:02 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:41 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:15 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:52:37 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:23:47 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:19 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:04:33 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:03:07 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE Bell Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for Bell request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xBellReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xBellReq *) Make_Req(CLIENT, X_Bell); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default Bell request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent Bell request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong Bell request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/Bell/XBell.m b/xts5/tset/Xproto/Bell/XBell.m deleted file mode 100644 index 4d380b0e..00000000 --- a/xts5/tset/Xproto/Bell/XBell.m +++ /dev/null @@ -1,237 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XBell/XBell.m,v 1.2 2005-11-03 08:44:02 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XBell/XBell.m ->># ->># Description: ->># Tests for Bell ->># ->># Modifications: ->># $Log: bll.m,v $ ->># Revision 1.2 2005-11-03 08:44:02 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:41 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:15 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:52:37 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:23:47 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:19 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:04:33 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:03:07 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE Bell Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for Bell request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xBellReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xBellReq *) Make_Req(CLIENT, X_Bell); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default Bell request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent Bell request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong Bell request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/ChangeActivePointerGrab/ChangeActivePointerGrab.m b/xts5/tset/Xproto/ChangeActivePointerGrab/ChangeActivePointerGrab.m new file mode 100644 index 00000000..4e5876dc --- /dev/null +++ b/xts5/tset/Xproto/ChangeActivePointerGrab/ChangeActivePointerGrab.m @@ -0,0 +1,256 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/ChangeActivePointerGrab/ChangeActivePointerGrab.m,v 1.2 2005-11-03 08:44:02 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/ChangeActivePointerGrab/ChangeActivePointerGrab.m +>># +>># Description: +>># Tests for ChangeActivePointerGrab +>># +>># Modifications: +>># $Log: chngactvpn.m,v $ +>># Revision 1.2 2005-11-03 08:44:02 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:41 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:16 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:52:38 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:23:48 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:20 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:04:34 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:03:09 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE ChangeActivePointerGrab Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for ChangeActivePointerGrab request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xGrabPointerReq *gpr; +xGrabPointerReply *gprep; +xChangeActivePointerGrabReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + + gpr = (xGrabPointerReq *) Make_Req(CLIENT, X_GrabPointer); + Send_Req(CLIENT, (xReq *) gpr); + Log_Trace("client %d sent default GrabPointer request\n", CLIENT); + + if ((gprep = (xGrabPointerReply *) Expect_Reply(CLIENT, X_GrabPointer)) == NULL) { + Log_Err("client %d failed to receive GrabPointer reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received GrabPointer reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(gprep); + } + (void) Expect_Nothing(CLIENT); + Free_Req(gpr); + + Set_Test_Type(CLIENT, test_type); + req = (xChangeActivePointerGrabReq *) Make_Req(CLIENT, X_ChangeActivePointerGrab); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default ChangeActivePointerGrab request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent ChangeActivePointerGrab request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong ChangeActivePointerGrab request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/ChangeActivePointerGrab/XChangeActivePointerGrab.m b/xts5/tset/Xproto/ChangeActivePointerGrab/XChangeActivePointerGrab.m deleted file mode 100644 index 8ed34509..00000000 --- a/xts5/tset/Xproto/ChangeActivePointerGrab/XChangeActivePointerGrab.m +++ /dev/null @@ -1,256 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XChangeActivePointerGrab/XChangeActivePointerGrab.m,v 1.2 2005-11-03 08:44:02 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XChangeActivePointerGrab/XChangeActivePointerGrab.m ->># ->># Description: ->># Tests for ChangeActivePointerGrab ->># ->># Modifications: ->># $Log: chngactvpn.m,v $ ->># Revision 1.2 2005-11-03 08:44:02 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:41 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:16 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:52:38 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:23:48 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:20 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:04:34 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:03:09 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE ChangeActivePointerGrab Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for ChangeActivePointerGrab request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xGrabPointerReq *gpr; -xGrabPointerReply *gprep; -xChangeActivePointerGrabReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - - gpr = (xGrabPointerReq *) Make_Req(CLIENT, X_GrabPointer); - Send_Req(CLIENT, (xReq *) gpr); - Log_Trace("client %d sent default GrabPointer request\n", CLIENT); - - if ((gprep = (xGrabPointerReply *) Expect_Reply(CLIENT, X_GrabPointer)) == NULL) { - Log_Err("client %d failed to receive GrabPointer reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received GrabPointer reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(gprep); - } - (void) Expect_Nothing(CLIENT); - Free_Req(gpr); - - Set_Test_Type(CLIENT, test_type); - req = (xChangeActivePointerGrabReq *) Make_Req(CLIENT, X_ChangeActivePointerGrab); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default ChangeActivePointerGrab request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent ChangeActivePointerGrab request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong ChangeActivePointerGrab request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/ChangeGC/ChangeGC.m b/xts5/tset/Xproto/ChangeGC/ChangeGC.m new file mode 100644 index 00000000..4b939f2e --- /dev/null +++ b/xts5/tset/Xproto/ChangeGC/ChangeGC.m @@ -0,0 +1,271 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/ChangeGC/ChangeGC.m,v 1.2 2005-11-03 08:44:02 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/ChangeGC/ChangeGC.m +>># +>># Description: +>># Tests for ChangeGC() +>># +>># Modifications: +>># $Log: chnggc.m,v $ +>># Revision 1.2 2005-11-03 08:44:02 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:41 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:16 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:52:39 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:23:48 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:20 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:04:35 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:03:11 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE ChangeGC Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for ChangeGC request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xChangeGCReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + (void) Create_Default_GContext(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xChangeGCReq *) Make_Req(CLIENT, X_ChangeGC); + if(test_type == BAD_VALUE) { + req->mask |= 1<<28; /* an unused mask bit */ + req->length += 1; + req = (xChangeGCReq *) Xstrealloc((char *) req, req->length<<2); + } + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default ChangeGC request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_VALUE: + Log_Trace("client %d sent ChangeGC request with illegal mask\n", CLIENT); + (void) Expect_BadValue(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent ChangeGC request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong ChangeGC request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the mask value contains an unused bit, +then the X server sends back a BadValue error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with a mask value + containing an unused bit. +Verify that the X server sends back a BadValue error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with a mask value + containing an unused bit. +Verify that the X server sends back a BadValue error. +>>CODE + + test_type = BAD_VALUE; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/ChangeGC/XChangeGC.m b/xts5/tset/Xproto/ChangeGC/XChangeGC.m deleted file mode 100644 index 77017f92..00000000 --- a/xts5/tset/Xproto/ChangeGC/XChangeGC.m +++ /dev/null @@ -1,271 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XChangeGC/XChangeGC.m,v 1.2 2005-11-03 08:44:02 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XChangeGC/XChangeGC.m ->># ->># Description: ->># Tests for ChangeGC() ->># ->># Modifications: ->># $Log: chnggc.m,v $ ->># Revision 1.2 2005-11-03 08:44:02 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:41 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:16 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:52:39 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:23:48 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:20 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:04:35 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:03:11 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE ChangeGC Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for ChangeGC request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xChangeGCReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - (void) Create_Default_GContext(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xChangeGCReq *) Make_Req(CLIENT, X_ChangeGC); - if(test_type == BAD_VALUE) { - req->mask |= 1<<28; /* an unused mask bit */ - req->length += 1; - req = (xChangeGCReq *) Xstrealloc((char *) req, req->length<<2); - } - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default ChangeGC request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_VALUE: - Log_Trace("client %d sent ChangeGC request with illegal mask\n", CLIENT); - (void) Expect_BadValue(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent ChangeGC request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong ChangeGC request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the mask value contains an unused bit, -then the X server sends back a BadValue error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with a mask value - containing an unused bit. -Verify that the X server sends back a BadValue error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with a mask value - containing an unused bit. -Verify that the X server sends back a BadValue error. ->>CODE - - test_type = BAD_VALUE; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/ChangeKeyboardControl/ChangeKeyboardControl.m b/xts5/tset/Xproto/ChangeKeyboardControl/ChangeKeyboardControl.m new file mode 100644 index 00000000..c4fa0fba --- /dev/null +++ b/xts5/tset/Xproto/ChangeKeyboardControl/ChangeKeyboardControl.m @@ -0,0 +1,284 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/ChangeKeyboardControl/ChangeKeyboardControl.m,v 1.2 2005-11-03 08:44:02 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/ChangeKeyboardControl/ChangeKeyboardControl.m +>># +>># Description: +>># Tests for ChangeKeyboardControl +>># +>># Modifications: +>># $Log: chngkybrdc.m,v $ +>># Revision 1.2 2005-11-03 08:44:02 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:44 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:17 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:52:41 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:23:49 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:21 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:04:39 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:03:15 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE ChangeKeyboardControl Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for ChangeKeyboardControl request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xReq *gkcr; +xGetKeyboardControlReply *gkcrep; +xChangeKeyboardControlReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + gkcr = (xReq *) Make_Req(CLIENT, X_GetKeyboardControl); + Send_Req(CLIENT, (xReq *) gkcr); + Log_Trace("client %d sent default GetKeyboardControl request\n", CLIENT); + + if ((gkcrep = (xGetKeyboardControlReply *) Expect_Reply(CLIENT, X_GetKeyboardControl)) == NULL) { + Log_Err("client %d failed to receive GetKeyboardControl reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received GetKeyboardControl reply\n", CLIENT); + /* do any reply checking here */ + } + (void) Expect_Nothing(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xChangeKeyboardControlReq *) Make_Req(CLIENT, X_ChangeKeyboardControl); + req = (xChangeKeyboardControlReq *) Add_Masked_Value(req, KBKeyClickPercent, gkcrep->keyClickPercent); + if(test_type == BAD_VALUE) { + req->mask |= 1<<28; /* an unused mask bit */ + req->length += 1; + req = (xChangeKeyboardControlReq *) Xstrealloc((char *) req, req->length<<2); + } + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default ChangeKeyboardControl request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_VALUE: + Log_Trace("client %d sent ChangeKeyboardControl request with illegal mask\n", CLIENT); + (void) Expect_BadValue(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent ChangeKeyboardControl request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong ChangeKeyboardControl request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the mask value contains an unused bit, +then the X server sends back a BadValue error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with a mask value + containing an unused bit. +Verify that the X server sends back a BadValue error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with a mask value + containing an unused bit. +Verify that the X server sends back a BadValue error. +>>CODE + + test_type = BAD_VALUE; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/ChangeKeyboardControl/XChangeKeyboardControl.m b/xts5/tset/Xproto/ChangeKeyboardControl/XChangeKeyboardControl.m deleted file mode 100644 index 8b851391..00000000 --- a/xts5/tset/Xproto/ChangeKeyboardControl/XChangeKeyboardControl.m +++ /dev/null @@ -1,284 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XChangeKeyboardControl/XChangeKeyboardControl.m,v 1.2 2005-11-03 08:44:02 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XChangeKeyboardControl/XChangeKeyboardControl.m ->># ->># Description: ->># Tests for ChangeKeyboardControl ->># ->># Modifications: ->># $Log: chngkybrdc.m,v $ ->># Revision 1.2 2005-11-03 08:44:02 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:44 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:17 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:52:41 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:23:49 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:21 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:04:39 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:03:15 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE ChangeKeyboardControl Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for ChangeKeyboardControl request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xReq *gkcr; -xGetKeyboardControlReply *gkcrep; -xChangeKeyboardControlReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - gkcr = (xReq *) Make_Req(CLIENT, X_GetKeyboardControl); - Send_Req(CLIENT, (xReq *) gkcr); - Log_Trace("client %d sent default GetKeyboardControl request\n", CLIENT); - - if ((gkcrep = (xGetKeyboardControlReply *) Expect_Reply(CLIENT, X_GetKeyboardControl)) == NULL) { - Log_Err("client %d failed to receive GetKeyboardControl reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received GetKeyboardControl reply\n", CLIENT); - /* do any reply checking here */ - } - (void) Expect_Nothing(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xChangeKeyboardControlReq *) Make_Req(CLIENT, X_ChangeKeyboardControl); - req = (xChangeKeyboardControlReq *) Add_Masked_Value(req, KBKeyClickPercent, gkcrep->keyClickPercent); - if(test_type == BAD_VALUE) { - req->mask |= 1<<28; /* an unused mask bit */ - req->length += 1; - req = (xChangeKeyboardControlReq *) Xstrealloc((char *) req, req->length<<2); - } - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default ChangeKeyboardControl request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_VALUE: - Log_Trace("client %d sent ChangeKeyboardControl request with illegal mask\n", CLIENT); - (void) Expect_BadValue(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent ChangeKeyboardControl request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong ChangeKeyboardControl request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the mask value contains an unused bit, -then the X server sends back a BadValue error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with a mask value - containing an unused bit. -Verify that the X server sends back a BadValue error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with a mask value - containing an unused bit. -Verify that the X server sends back a BadValue error. ->>CODE - - test_type = BAD_VALUE; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/ChangeKeyboardMapping/ChangeKeyboardMapping.m b/xts5/tset/Xproto/ChangeKeyboardMapping/ChangeKeyboardMapping.m new file mode 100644 index 00000000..6f0d04aa --- /dev/null +++ b/xts5/tset/Xproto/ChangeKeyboardMapping/ChangeKeyboardMapping.m @@ -0,0 +1,282 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/ChangeKeyboardMapping/ChangeKeyboardMapping.m,v 1.2 2005-11-03 08:44:02 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/ChangeKeyboardMapping/ChangeKeyboardMapping.m +>># +>># Description: +>># Tests for ChangeKeyboardMapping +>># +>># Modifications: +>># $Log: chngkybrdm.m,v $ +>># Revision 1.2 2005-11-03 08:44:02 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:45 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:18 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:52:42 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:23:50 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:21 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:04:40 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:03:18 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE ChangeKeyboardMapping Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for ChangeKeyboardMapping request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xGetKeyboardMappingReq *gkmr; +xGetKeyboardMappingReply *gkmrep; +xChangeKeyboardMappingReq *req; +xEvent *ev; + +static +void +tester() +{ + Create_Client(CLIENT); + + /* Get the existing mapping... */ + + gkmr = (xGetKeyboardMappingReq *) Make_Req(CLIENT, X_GetKeyboardMapping); + Send_Req(CLIENT, (xReq *) gkmr); + Log_Trace("client %d sent default GetKeyboardMapping request\n", CLIENT); + + if ((gkmrep = (xGetKeyboardMappingReply *) Expect_Reply(CLIENT, X_GetKeyboardMapping)) == NULL) { + Log_Err("client %d failed to receive GetKeyboardMapping reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received GetKeyboardMapping reply\n", CLIENT); + /* do any reply checking here */ + } + (void) Expect_Nothing(CLIENT); + + /* ... then make a request to duplicate that mapping. */ + + Set_Test_Type(CLIENT, test_type); + req = (xChangeKeyboardMappingReq *) Make_Req(CLIENT, X_ChangeKeyboardMapping); + req->keyCodes = gkmr->count; + req->firstKeyCode = gkmr->firstKeyCode; + req->keySymsPerKeyCode = gkmrep->keySymsPerKeyCode; + req->length += req->keyCodes * req->keySymsPerKeyCode; + req = (xChangeKeyboardMappingReq *) Xstrealloc((char *) req, req->length<<2); + { + unsigned char *p, *q, *r; + + p = (unsigned char *) (gkmrep + 1); + q = (unsigned char *) (req + 1); + r = ((unsigned char *) req) + (int)(req->length<<2); /* endptr */ + while (q < r) + *q++ = *p++; + } + + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default ChangeKeyboardMapping request\n", CLIENT); + if ((ev = (xEvent *) Expect_Event(CLIENT, MappingNotify)) == NULL) { + Log_Err("client %d failed to receive MappingNotify\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received MappingNotify\n", CLIENT); + /* do any event checking here */ + Free_Event(ev); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent ChangeKeyboardMapping request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong ChangeKeyboardMapping request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a +.S MappingNotify +event to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a MappingNotify event. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a MappingNotify event. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/ChangeKeyboardMapping/XChangeKeyboardMapping.m b/xts5/tset/Xproto/ChangeKeyboardMapping/XChangeKeyboardMapping.m deleted file mode 100644 index f357fa03..00000000 --- a/xts5/tset/Xproto/ChangeKeyboardMapping/XChangeKeyboardMapping.m +++ /dev/null @@ -1,282 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XChangeKeyboardMapping/XChangeKeyboardMapping.m,v 1.2 2005-11-03 08:44:02 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XChangeKeyboardMapping/XChangeKeyboardMapping.m ->># ->># Description: ->># Tests for ChangeKeyboardMapping ->># ->># Modifications: ->># $Log: chngkybrdm.m,v $ ->># Revision 1.2 2005-11-03 08:44:02 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:45 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:18 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:52:42 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:23:50 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:21 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:04:40 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:03:18 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE ChangeKeyboardMapping Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for ChangeKeyboardMapping request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xGetKeyboardMappingReq *gkmr; -xGetKeyboardMappingReply *gkmrep; -xChangeKeyboardMappingReq *req; -xEvent *ev; - -static -void -tester() -{ - Create_Client(CLIENT); - - /* Get the existing mapping... */ - - gkmr = (xGetKeyboardMappingReq *) Make_Req(CLIENT, X_GetKeyboardMapping); - Send_Req(CLIENT, (xReq *) gkmr); - Log_Trace("client %d sent default GetKeyboardMapping request\n", CLIENT); - - if ((gkmrep = (xGetKeyboardMappingReply *) Expect_Reply(CLIENT, X_GetKeyboardMapping)) == NULL) { - Log_Err("client %d failed to receive GetKeyboardMapping reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received GetKeyboardMapping reply\n", CLIENT); - /* do any reply checking here */ - } - (void) Expect_Nothing(CLIENT); - - /* ... then make a request to duplicate that mapping. */ - - Set_Test_Type(CLIENT, test_type); - req = (xChangeKeyboardMappingReq *) Make_Req(CLIENT, X_ChangeKeyboardMapping); - req->keyCodes = gkmr->count; - req->firstKeyCode = gkmr->firstKeyCode; - req->keySymsPerKeyCode = gkmrep->keySymsPerKeyCode; - req->length += req->keyCodes * req->keySymsPerKeyCode; - req = (xChangeKeyboardMappingReq *) Xstrealloc((char *) req, req->length<<2); - { - unsigned char *p, *q, *r; - - p = (unsigned char *) (gkmrep + 1); - q = (unsigned char *) (req + 1); - r = ((unsigned char *) req) + (int)(req->length<<2); /* endptr */ - while (q < r) - *q++ = *p++; - } - - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default ChangeKeyboardMapping request\n", CLIENT); - if ((ev = (xEvent *) Expect_Event(CLIENT, MappingNotify)) == NULL) { - Log_Err("client %d failed to receive MappingNotify\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received MappingNotify\n", CLIENT); - /* do any event checking here */ - Free_Event(ev); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent ChangeKeyboardMapping request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong ChangeKeyboardMapping request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a -.S MappingNotify -event to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a MappingNotify event. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a MappingNotify event. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/ChangePointerControl/ChangePointerControl.m b/xts5/tset/Xproto/ChangePointerControl/ChangePointerControl.m new file mode 100644 index 00000000..5b383e45 --- /dev/null +++ b/xts5/tset/Xproto/ChangePointerControl/ChangePointerControl.m @@ -0,0 +1,255 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/ChangePointerControl/ChangePointerControl.m,v 1.2 2005-11-03 08:44:03 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/ChangePointerControl/ChangePointerControl.m +>># +>># Description: +>># Tests for ChangePointerControl +>># +>># Modifications: +>># $Log: chngpntrcn.m,v $ +>># Revision 1.2 2005-11-03 08:44:03 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:45 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:18 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:52:43 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:23:50 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:22 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:04:42 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:03:20 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE ChangePointerControl Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for ChangePointerControl request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xReq *gpcr; +xGetPointerControlReply *gpcrep; +xChangePointerControlReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + gpcr = (xReq *) Make_Req(CLIENT, X_GetPointerControl); + Send_Req(CLIENT, (xReq *) gpcr); + Log_Trace("client %d sent default GetPointerControl request\n", CLIENT); + + if ((gpcrep = (xGetPointerControlReply *) Expect_Reply(CLIENT, X_GetPointerControl)) == NULL) { + Log_Err("client %d failed to receive GetPointerControl reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received GetPointerControl reply\n", CLIENT); + /* do any reply checking here */ + } + (void) Expect_Nothing(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xChangePointerControlReq *) Make_Req(CLIENT, X_ChangePointerControl); + req->accelNum = gpcrep->accelNumerator; + req->accelDenum = gpcrep->accelDenominator; + req->threshold = gpcrep->threshold; + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default ChangePointerControl request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent ChangePointerControl request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong ChangePointerControl request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/ChangePointerControl/XChangePointerControl.m b/xts5/tset/Xproto/ChangePointerControl/XChangePointerControl.m deleted file mode 100644 index f973f529..00000000 --- a/xts5/tset/Xproto/ChangePointerControl/XChangePointerControl.m +++ /dev/null @@ -1,255 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XChangePointerControl/XChangePointerControl.m,v 1.2 2005-11-03 08:44:03 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XChangePointerControl/XChangePointerControl.m ->># ->># Description: ->># Tests for ChangePointerControl ->># ->># Modifications: ->># $Log: chngpntrcn.m,v $ ->># Revision 1.2 2005-11-03 08:44:03 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:45 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:18 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:52:43 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:23:50 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:22 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:04:42 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:03:20 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE ChangePointerControl Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for ChangePointerControl request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xReq *gpcr; -xGetPointerControlReply *gpcrep; -xChangePointerControlReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - gpcr = (xReq *) Make_Req(CLIENT, X_GetPointerControl); - Send_Req(CLIENT, (xReq *) gpcr); - Log_Trace("client %d sent default GetPointerControl request\n", CLIENT); - - if ((gpcrep = (xGetPointerControlReply *) Expect_Reply(CLIENT, X_GetPointerControl)) == NULL) { - Log_Err("client %d failed to receive GetPointerControl reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received GetPointerControl reply\n", CLIENT); - /* do any reply checking here */ - } - (void) Expect_Nothing(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xChangePointerControlReq *) Make_Req(CLIENT, X_ChangePointerControl); - req->accelNum = gpcrep->accelNumerator; - req->accelDenum = gpcrep->accelDenominator; - req->threshold = gpcrep->threshold; - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default ChangePointerControl request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent ChangePointerControl request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong ChangePointerControl request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/ChangeProperty/ChangeProperty.m b/xts5/tset/Xproto/ChangeProperty/ChangeProperty.m new file mode 100644 index 00000000..8646629e --- /dev/null +++ b/xts5/tset/Xproto/ChangeProperty/ChangeProperty.m @@ -0,0 +1,245 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/ChangeProperty/ChangeProperty.m,v 1.2 2005-11-03 08:44:03 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/ChangeProperty/ChangeProperty.m +>># +>># Description: +>># Tests for ChangeProperty +>># +>># Modifications: +>># $Log: chngprprty.m,v $ +>># Revision 1.2 2005-11-03 08:44:03 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:46 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:19 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:52:44 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:23:51 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:22 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:04:43 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:03:22 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE ChangeProperty Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for ChangeProperty request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +Atom Test_Property; +xChangePropertyReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + Test_Property = Create_Default_Atom(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xChangePropertyReq *) Make_Req(CLIENT, X_ChangeProperty); + req->property = Test_Property; + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default ChangeProperty request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent ChangeProperty request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong ChangeProperty request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +and the client has no event selected in the +.M event_mask +for any window, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/ChangeProperty/XChangeProperty.m b/xts5/tset/Xproto/ChangeProperty/XChangeProperty.m deleted file mode 100644 index 5a5ebc06..00000000 --- a/xts5/tset/Xproto/ChangeProperty/XChangeProperty.m +++ /dev/null @@ -1,245 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XChangeProperty/XChangeProperty.m,v 1.2 2005-11-03 08:44:03 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XChangeProperty/XChangeProperty.m ->># ->># Description: ->># Tests for ChangeProperty ->># ->># Modifications: ->># $Log: chngprprty.m,v $ ->># Revision 1.2 2005-11-03 08:44:03 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:46 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:19 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:52:44 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:23:51 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:22 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:04:43 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:03:22 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE ChangeProperty Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for ChangeProperty request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -Atom Test_Property; -xChangePropertyReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - Test_Property = Create_Default_Atom(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xChangePropertyReq *) Make_Req(CLIENT, X_ChangeProperty); - req->property = Test_Property; - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default ChangeProperty request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent ChangeProperty request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong ChangeProperty request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -and the client has no event selected in the -.M event_mask -for any window, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/ChangeSaveSet/ChangeSaveSet.m b/xts5/tset/Xproto/ChangeSaveSet/ChangeSaveSet.m new file mode 100644 index 00000000..03920c5f --- /dev/null +++ b/xts5/tset/Xproto/ChangeSaveSet/ChangeSaveSet.m @@ -0,0 +1,245 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/ChangeSaveSet/ChangeSaveSet.m,v 1.2 2005-11-03 08:44:03 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/ChangeSaveSet/ChangeSaveSet.m +>># +>># Description: +>># Tests for ChangeSaveSet +>># +>># Modifications: +>># $Log: chngsvst.m,v $ +>># Revision 1.2 2005-11-03 08:44:03 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:46 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:19 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:52:45 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:23:51 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:23 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:04:44 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:03:24 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE ChangeSaveSet Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for ChangeSaveSet request */ + +#include "Xstlib.h" + +#define CLIENT 0 +#define CLIENT1 1 +static TestType test_type = SETUP; +Window win; +xChangeSaveSetReq *req; +xEvent *ev; +xError *err; + +static +void +tester() +{ + Create_Client(CLIENT); + Create_Client(CLIENT1); + + win = Create_Default_Window(CLIENT1); + + Set_Test_Type(CLIENT, test_type); + req = (xChangeSaveSetReq *) Make_Req(CLIENT, X_ChangeSaveSet); + req->window = win; + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default ChangeSaveSet request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent ChangeSaveSet request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong ChangeSaveSet request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/ChangeSaveSet/XChangeSaveSet.m b/xts5/tset/Xproto/ChangeSaveSet/XChangeSaveSet.m deleted file mode 100644 index 67f0d25c..00000000 --- a/xts5/tset/Xproto/ChangeSaveSet/XChangeSaveSet.m +++ /dev/null @@ -1,245 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XChangeSaveSet/XChangeSaveSet.m,v 1.2 2005-11-03 08:44:03 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XChangeSaveSet/XChangeSaveSet.m ->># ->># Description: ->># Tests for ChangeSaveSet ->># ->># Modifications: ->># $Log: chngsvst.m,v $ ->># Revision 1.2 2005-11-03 08:44:03 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:46 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:19 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:52:45 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:23:51 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:23 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:04:44 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:03:24 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE ChangeSaveSet Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for ChangeSaveSet request */ - -#include "Xstlib.h" - -#define CLIENT 0 -#define CLIENT1 1 -static TestType test_type = SETUP; -Window win; -xChangeSaveSetReq *req; -xEvent *ev; -xError *err; - -static -void -tester() -{ - Create_Client(CLIENT); - Create_Client(CLIENT1); - - win = Create_Default_Window(CLIENT1); - - Set_Test_Type(CLIENT, test_type); - req = (xChangeSaveSetReq *) Make_Req(CLIENT, X_ChangeSaveSet); - req->window = win; - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default ChangeSaveSet request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent ChangeSaveSet request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong ChangeSaveSet request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/ChangeWindowAttributes/ChangeWindowAttributes.m b/xts5/tset/Xproto/ChangeWindowAttributes/ChangeWindowAttributes.m new file mode 100644 index 00000000..e4e7f77e --- /dev/null +++ b/xts5/tset/Xproto/ChangeWindowAttributes/ChangeWindowAttributes.m @@ -0,0 +1,273 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/ChangeWindowAttributes/ChangeWindowAttributes.m,v 1.2 2005-11-03 08:44:03 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/ChangeWindowAttributes/ChangeWindowAttributes.m +>># +>># Description: +>># Tests for ChangeWindowAttributes +>># +>># Modifications: +>># $Log: chngwdwatt.m,v $ +>># Revision 1.2 2005-11-03 08:44:03 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:46 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:20 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:52:46 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:23:51 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:23 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:04:46 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:03:26 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE ChangeWindowAttributes Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for ChangeWindowAttributes request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xChangeWindowAttributesReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xChangeWindowAttributesReq *) Make_Req(CLIENT, X_ChangeWindowAttributes); + if(test_type == BAD_VALUE) { + req->valueMask |= 1<<28; /* an unused mask bit */ + req->length += 1; + req = (xChangeWindowAttributesReq *) Xstrealloc((char *) req, req->length<<2); + } + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default ChangeWindowAttributes request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_VALUE: + Log_Trace("client %d sent ChangeWindowAttributes request with illegal mask\n", CLIENT); + (void) Expect_BadValue(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent ChangeWindowAttributes request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong ChangeWindowAttributes request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +and the client has no event selected in the +.M event_mask +for any window, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the mask value contains an unused bit, +then the X server sends back a BadValue error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with a mask value + containing an unused bit. +Verify that the X server sends back a BadValue error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with a mask value + containing an unused bit. +Verify that the X server sends back a BadValue error. +>>CODE + + test_type = BAD_VALUE; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/ChangeWindowAttributes/XChangeWindowAttributes.m b/xts5/tset/Xproto/ChangeWindowAttributes/XChangeWindowAttributes.m deleted file mode 100644 index 357f6822..00000000 --- a/xts5/tset/Xproto/ChangeWindowAttributes/XChangeWindowAttributes.m +++ /dev/null @@ -1,273 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XChangeWindowAttributes/XChangeWindowAttributes.m,v 1.2 2005-11-03 08:44:03 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XChangeWindowAttributes/XChangeWindowAttributes.m ->># ->># Description: ->># Tests for ChangeWindowAttributes ->># ->># Modifications: ->># $Log: chngwdwatt.m,v $ ->># Revision 1.2 2005-11-03 08:44:03 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:46 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:20 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:52:46 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:23:51 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:23 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:04:46 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:03:26 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE ChangeWindowAttributes Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for ChangeWindowAttributes request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xChangeWindowAttributesReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xChangeWindowAttributesReq *) Make_Req(CLIENT, X_ChangeWindowAttributes); - if(test_type == BAD_VALUE) { - req->valueMask |= 1<<28; /* an unused mask bit */ - req->length += 1; - req = (xChangeWindowAttributesReq *) Xstrealloc((char *) req, req->length<<2); - } - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default ChangeWindowAttributes request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_VALUE: - Log_Trace("client %d sent ChangeWindowAttributes request with illegal mask\n", CLIENT); - (void) Expect_BadValue(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent ChangeWindowAttributes request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong ChangeWindowAttributes request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -and the client has no event selected in the -.M event_mask -for any window, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the mask value contains an unused bit, -then the X server sends back a BadValue error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with a mask value - containing an unused bit. -Verify that the X server sends back a BadValue error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with a mask value - containing an unused bit. -Verify that the X server sends back a BadValue error. ->>CODE - - test_type = BAD_VALUE; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/ClearArea/ClearArea.m b/xts5/tset/Xproto/ClearArea/ClearArea.m new file mode 100644 index 00000000..8259919b --- /dev/null +++ b/xts5/tset/Xproto/ClearArea/ClearArea.m @@ -0,0 +1,258 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/ClearArea/ClearArea.m,v 1.2 2005-11-03 08:44:03 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/ClearArea/ClearArea.m +>># +>># Description: +>># Tests for ClearArea +>># +>># Modifications: +>># $Log: clrar.m,v $ +>># Revision 1.2 2005-11-03 08:44:03 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:48 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:20 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:52:47 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:23:52 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:23 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:04:47 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:03:28 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE ClearArea Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for ClearArea request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +Window Default_Window; +xClearAreaReq *req; +xEvent *ev; + +static +void +tester() +{ + Create_Client(CLIENT); + + Default_Window = Create_Default_Window(CLIENT); + Map_Window(CLIENT, Default_Window); + + Set_Test_Type(CLIENT, test_type); + req = (xClearAreaReq *) Make_Req(CLIENT, X_ClearArea); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default ClearArea request\n", CLIENT); + if ((ev = (xEvent *) Expect_Event(CLIENT, Expose)) == NULL) { + Log_Err("client %d failed to receive Expose\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received Expose\n", CLIENT); + /* do any event checking here */ + Free_Event(ev); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent ClearArea request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong ClearArea request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +and +.M exposures +is +.S True , +then the X server sends back an +.S Expose +event to the client +for regions of the rectangle that are either visible or are being retained in +backing store. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back an Expose event. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back an Expose event. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/ClearArea/XClearArea.m b/xts5/tset/Xproto/ClearArea/XClearArea.m deleted file mode 100644 index 06029183..00000000 --- a/xts5/tset/Xproto/ClearArea/XClearArea.m +++ /dev/null @@ -1,258 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XClearArea/XClearArea.m,v 1.2 2005-11-03 08:44:03 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XClearArea/XClearArea.m ->># ->># Description: ->># Tests for ClearArea ->># ->># Modifications: ->># $Log: clrar.m,v $ ->># Revision 1.2 2005-11-03 08:44:03 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:48 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:20 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:52:47 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:23:52 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:23 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:04:47 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:03:28 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE ClearArea Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for ClearArea request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -Window Default_Window; -xClearAreaReq *req; -xEvent *ev; - -static -void -tester() -{ - Create_Client(CLIENT); - - Default_Window = Create_Default_Window(CLIENT); - Map_Window(CLIENT, Default_Window); - - Set_Test_Type(CLIENT, test_type); - req = (xClearAreaReq *) Make_Req(CLIENT, X_ClearArea); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default ClearArea request\n", CLIENT); - if ((ev = (xEvent *) Expect_Event(CLIENT, Expose)) == NULL) { - Log_Err("client %d failed to receive Expose\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received Expose\n", CLIENT); - /* do any event checking here */ - Free_Event(ev); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent ClearArea request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong ClearArea request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -and -.M exposures -is -.S True , -then the X server sends back an -.S Expose -event to the client -for regions of the rectangle that are either visible or are being retained in -backing store. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back an Expose event. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back an Expose event. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/ConfigureWindow/ConfigureWindow.m b/xts5/tset/Xproto/ConfigureWindow/ConfigureWindow.m new file mode 100644 index 00000000..9e57f43c --- /dev/null +++ b/xts5/tset/Xproto/ConfigureWindow/ConfigureWindow.m @@ -0,0 +1,273 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/ConfigureWindow/ConfigureWindow.m,v 1.2 2005-11-03 08:44:04 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/ConfigureWindow/ConfigureWindow.m +>># +>># Description: +>># Tests for ConfigureWindow +>># +>># Modifications: +>># $Log: cnfgrwdw.m,v $ +>># Revision 1.2 2005-11-03 08:44:04 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:48 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:21 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:52:49 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:23:53 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:24 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:04:50 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:03:32 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE ConfigureWindow Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for ConfigureWindow request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xConfigureWindowReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xConfigureWindowReq *) Make_Req(CLIENT, X_ConfigureWindow); + if(test_type == BAD_VALUE) { + req->mask |= 1<<12; /* an unused mask bit */ + req->length += 1; + req = (xConfigureWindowReq *) Xstrealloc((char *) req, req->length<<2); + } + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default ConfigureWindow request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_VALUE: + Log_Trace("client %d sent ConfigureWindow request with illegal mask\n", CLIENT); + (void) Expect_BadValue(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent ConfigureWindow request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong ConfigureWindow request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +and the client has no event selected in the +.M event_mask +for any window, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the mask value contains an unused bit, +then the X server sends back a BadValue error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with a mask value + containing an unused bit. +Verify that the X server sends back a BadValue error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with a mask value + containing an unused bit. +Verify that the X server sends back a BadValue error. +>>CODE + + test_type = BAD_VALUE; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/ConfigureWindow/XConfigureWindow.m b/xts5/tset/Xproto/ConfigureWindow/XConfigureWindow.m deleted file mode 100644 index 3d93bc74..00000000 --- a/xts5/tset/Xproto/ConfigureWindow/XConfigureWindow.m +++ /dev/null @@ -1,273 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XConfigureWindow/XConfigureWindow.m,v 1.2 2005-11-03 08:44:04 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XConfigureWindow/XConfigureWindow.m ->># ->># Description: ->># Tests for ConfigureWindow ->># ->># Modifications: ->># $Log: cnfgrwdw.m,v $ ->># Revision 1.2 2005-11-03 08:44:04 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:48 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:21 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:52:49 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:23:53 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:24 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:04:50 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:03:32 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE ConfigureWindow Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for ConfigureWindow request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xConfigureWindowReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xConfigureWindowReq *) Make_Req(CLIENT, X_ConfigureWindow); - if(test_type == BAD_VALUE) { - req->mask |= 1<<12; /* an unused mask bit */ - req->length += 1; - req = (xConfigureWindowReq *) Xstrealloc((char *) req, req->length<<2); - } - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default ConfigureWindow request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_VALUE: - Log_Trace("client %d sent ConfigureWindow request with illegal mask\n", CLIENT); - (void) Expect_BadValue(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent ConfigureWindow request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong ConfigureWindow request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -and the client has no event selected in the -.M event_mask -for any window, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the mask value contains an unused bit, -then the X server sends back a BadValue error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with a mask value - containing an unused bit. -Verify that the X server sends back a BadValue error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with a mask value - containing an unused bit. -Verify that the X server sends back a BadValue error. ->>CODE - - test_type = BAD_VALUE; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/ConvertSelection/ConvertSelection.m b/xts5/tset/Xproto/ConvertSelection/ConvertSelection.m new file mode 100644 index 00000000..568683ec --- /dev/null +++ b/xts5/tset/Xproto/ConvertSelection/ConvertSelection.m @@ -0,0 +1,255 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/ConvertSelection/ConvertSelection.m,v 1.2 2005-11-03 08:44:04 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/ConvertSelection/ConvertSelection.m +>># +>># Description: +>># Tests for ConvertSelection +>># +>># Modifications: +>># $Log: cnvrtslctn.m,v $ +>># Revision 1.2 2005-11-03 08:44:04 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:49 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:22 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:52:51 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:23:53 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:25 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:04:52 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:03:34 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE ConvertSelection Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for ConvertSelection request */ + +/* Expect to get a SelectionNotify event with property None, since a + selection that is not set is being requested. */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +Atom Test_Property; +xConvertSelectionReq *req; +xEvent *ev; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + Test_Property = Create_Default_Atom(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xConvertSelectionReq *) Make_Req(CLIENT, X_ConvertSelection); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default ConvertSelection request\n", CLIENT); + if ((ev = (xEvent *) Expect_Event(CLIENT, SelectionNotify)) == NULL) { + Log_Err("client %d failed to receive SelectionNotify\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received SelectionNotify\n", CLIENT); + Free_Event(ev); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent ConvertSelection request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong ConvertSelection request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +and no client currently owns the selection, +then the X server sends back a +.S SelectionNotify +event to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a SelectionNotify event. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a SelectionNotify event. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/ConvertSelection/XConvertSelection.m b/xts5/tset/Xproto/ConvertSelection/XConvertSelection.m deleted file mode 100644 index 61ae1efd..00000000 --- a/xts5/tset/Xproto/ConvertSelection/XConvertSelection.m +++ /dev/null @@ -1,255 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XConvertSelection/XConvertSelection.m,v 1.2 2005-11-03 08:44:04 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XConvertSelection/XConvertSelection.m ->># ->># Description: ->># Tests for ConvertSelection ->># ->># Modifications: ->># $Log: cnvrtslctn.m,v $ ->># Revision 1.2 2005-11-03 08:44:04 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:49 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:22 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:52:51 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:23:53 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:25 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:04:52 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:03:34 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE ConvertSelection Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for ConvertSelection request */ - -/* Expect to get a SelectionNotify event with property None, since a - selection that is not set is being requested. */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -Atom Test_Property; -xConvertSelectionReq *req; -xEvent *ev; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - Test_Property = Create_Default_Atom(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xConvertSelectionReq *) Make_Req(CLIENT, X_ConvertSelection); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default ConvertSelection request\n", CLIENT); - if ((ev = (xEvent *) Expect_Event(CLIENT, SelectionNotify)) == NULL) { - Log_Err("client %d failed to receive SelectionNotify\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received SelectionNotify\n", CLIENT); - Free_Event(ev); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent ConvertSelection request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong ConvertSelection request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -and no client currently owns the selection, -then the X server sends back a -.S SelectionNotify -event to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a SelectionNotify event. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a SelectionNotify event. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/CopyArea/CopyArea.m b/xts5/tset/Xproto/CopyArea/CopyArea.m new file mode 100644 index 00000000..38d4a649 --- /dev/null +++ b/xts5/tset/Xproto/CopyArea/CopyArea.m @@ -0,0 +1,258 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/CopyArea/CopyArea.m,v 1.2 2005-11-03 08:44:04 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/CopyArea/CopyArea.m +>># +>># Description: +>># Tests for CopyArea +>># +>># Modifications: +>># $Log: cpyar.m,v $ +>># Revision 1.2 2005-11-03 08:44:04 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:49 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:22 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:52:52 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:23:54 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:25 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:04:53 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:03:36 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE CopyArea Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for CopyArea request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +Window win; +xCreateWindowReq *cwr; +xCopyAreaReq *req; +xEvent *ev; + +static +void +tester() +{ + Create_Client(CLIENT); + + win = Create_Default_Window(CLIENT); + (void) Create_Default_GContext(CLIENT); + Map_Window(CLIENT, win); + + Set_Test_Type(CLIENT, test_type); + req = (xCopyAreaReq *) Make_Req(CLIENT, X_CopyArea); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default CopyArea request\n", CLIENT); + if ((ev = (xEvent *) Expect_Event(CLIENT, GraphicsExpose)) == NULL) { + Log_Err("client %d failed to receive GraphicsExpose\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received GraphicsExpose\n", CLIENT); + /* do any event checking here */ + Free_Event(ev); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent CopyArea request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong CopyArea request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +and +.M graphics-exposures +in the graphics context is +.S True , +then the X server sends back a +.S GraphicsExpose +event to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a GraphicsExpose event. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a GraphicsExpose event. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/CopyArea/XCopyArea.m b/xts5/tset/Xproto/CopyArea/XCopyArea.m deleted file mode 100644 index ac22bc0a..00000000 --- a/xts5/tset/Xproto/CopyArea/XCopyArea.m +++ /dev/null @@ -1,258 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XCopyArea/XCopyArea.m,v 1.2 2005-11-03 08:44:04 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XCopyArea/XCopyArea.m ->># ->># Description: ->># Tests for CopyArea ->># ->># Modifications: ->># $Log: cpyar.m,v $ ->># Revision 1.2 2005-11-03 08:44:04 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:49 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:22 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:52:52 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:23:54 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:25 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:04:53 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:03:36 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE CopyArea Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for CopyArea request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -Window win; -xCreateWindowReq *cwr; -xCopyAreaReq *req; -xEvent *ev; - -static -void -tester() -{ - Create_Client(CLIENT); - - win = Create_Default_Window(CLIENT); - (void) Create_Default_GContext(CLIENT); - Map_Window(CLIENT, win); - - Set_Test_Type(CLIENT, test_type); - req = (xCopyAreaReq *) Make_Req(CLIENT, X_CopyArea); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default CopyArea request\n", CLIENT); - if ((ev = (xEvent *) Expect_Event(CLIENT, GraphicsExpose)) == NULL) { - Log_Err("client %d failed to receive GraphicsExpose\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received GraphicsExpose\n", CLIENT); - /* do any event checking here */ - Free_Event(ev); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent CopyArea request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong CopyArea request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -and -.M graphics-exposures -in the graphics context is -.S True , -then the X server sends back a -.S GraphicsExpose -event to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a GraphicsExpose event. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a GraphicsExpose event. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/CopyColormapAndFree/CopyColormapAndFree.m b/xts5/tset/Xproto/CopyColormapAndFree/CopyColormapAndFree.m new file mode 100644 index 00000000..4a319f15 --- /dev/null +++ b/xts5/tset/Xproto/CopyColormapAndFree/CopyColormapAndFree.m @@ -0,0 +1,333 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/CopyColormapAndFree/CopyColormapAndFree.m,v 1.2 2005-11-03 08:44:04 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/CopyColormapAndFree/CopyColormapAndFree.m +>># +>># Description: +>># Tests for CopyColormapAndFree +>># +>># Modifications: +>># $Log: cpyclrmpan.m,v $ +>># Revision 1.2 2005-11-03 08:44:04 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:49 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:23 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:52:53 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:23:54 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:25 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:04:55 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:03:38 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE CopyColormapAndFree Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for CopyColormapAndFree request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xResourceReq *req; +xAllocColorCellsReply *reply; + +/* + intent: send a CopyColormapAndFree request to the server and check + that nothing was sent back. + input: + output: none + global input: + side effects: creates a window resource + methods: +*/ + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + (void) Create_Default_Colormap(CLIENT); + + /* Allocate color cells if client hasn't got any */ + + if (Allocatable (CLIENT)) { + req = (xResourceReq *) Make_Req(CLIENT, X_AllocColorCells); + Send_Req(CLIENT, (xReq *) req); + if ((reply = (xAllocColorCellsReply *) Expect_Reply(CLIENT, X_AllocColorCells)) == NULL) { + Log_Err("client %d failed to receive AllocColorCells reply\n", CLIENT); + Exit(); + } + else { + Log_Trace("client %d received AllocColorCells reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(reply); + } + Free_Req(req); + } + (void) Expect_Nothing(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_CopyColormapAndFree); + if(test_type == BAD_IDCHOICE1) { + Send_Req(CLIENT, (xReq *) req); + Log_Trace("client %d sent CopyColormapAndFree request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + } + if(test_type == BAD_IDCHOICE2) { + req->id = 0xffffffff; /* top 2 bits set ==> invalid */ + } + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default CopyColormapAndFree request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_IDCHOICE1: + Log_Trace("client %d sent CopyColormapAndFree request with same resource ID\n", CLIENT); + (void) Expect_BadIDChoice(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_IDCHOICE2: + Log_Trace("client %d sent CopyColormapAndFree request with out-of-range resource ID\n", CLIENT); + (void) Expect_BadIDChoice(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent CopyColormapAndFree request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong CopyColormapAndFree request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the resource ID is already in use, +then the X server sends back a BadIDChoice error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Send an invalid xname protocol request with identical resource ID + to the X server. +Verify that the X server sends back a BadIDChoice error. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Send an invalid xname protocol request with identical resource ID + to the X server. +Verify that the X server sends back a BadIDChoice error. +>>CODE + + test_type = BAD_IDCHOICE1; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the resource ID is outside the range assigned to the client, +then the X server sends back a BadIDChoice error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Send an invalid xname protocol request to the X server with a resource ID + outside the range assigned to the client. +Verify that the X server sends back a BadIDChoice error. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Send an invalid xname protocol request to the X server with a resource ID + outside the range assigned to the client. +Verify that the X server sends back a BadIDChoice error. +>>CODE + + test_type = BAD_IDCHOICE2; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/CopyColormapAndFree/XCopyColormapAndFree.m b/xts5/tset/Xproto/CopyColormapAndFree/XCopyColormapAndFree.m deleted file mode 100644 index fb19fb43..00000000 --- a/xts5/tset/Xproto/CopyColormapAndFree/XCopyColormapAndFree.m +++ /dev/null @@ -1,333 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XCopyColormapAndFree/XCopyColormapAndFree.m,v 1.2 2005-11-03 08:44:04 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XCopyColormapAndFree/XCopyColormapAndFree.m ->># ->># Description: ->># Tests for CopyColormapAndFree ->># ->># Modifications: ->># $Log: cpyclrmpan.m,v $ ->># Revision 1.2 2005-11-03 08:44:04 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:49 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:23 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:52:53 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:23:54 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:25 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:04:55 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:03:38 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE CopyColormapAndFree Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for CopyColormapAndFree request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xResourceReq *req; -xAllocColorCellsReply *reply; - -/* - intent: send a CopyColormapAndFree request to the server and check - that nothing was sent back. - input: - output: none - global input: - side effects: creates a window resource - methods: -*/ - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - (void) Create_Default_Colormap(CLIENT); - - /* Allocate color cells if client hasn't got any */ - - if (Allocatable (CLIENT)) { - req = (xResourceReq *) Make_Req(CLIENT, X_AllocColorCells); - Send_Req(CLIENT, (xReq *) req); - if ((reply = (xAllocColorCellsReply *) Expect_Reply(CLIENT, X_AllocColorCells)) == NULL) { - Log_Err("client %d failed to receive AllocColorCells reply\n", CLIENT); - Exit(); - } - else { - Log_Trace("client %d received AllocColorCells reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(reply); - } - Free_Req(req); - } - (void) Expect_Nothing(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_CopyColormapAndFree); - if(test_type == BAD_IDCHOICE1) { - Send_Req(CLIENT, (xReq *) req); - Log_Trace("client %d sent CopyColormapAndFree request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - } - if(test_type == BAD_IDCHOICE2) { - req->id = 0xffffffff; /* top 2 bits set ==> invalid */ - } - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default CopyColormapAndFree request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_IDCHOICE1: - Log_Trace("client %d sent CopyColormapAndFree request with same resource ID\n", CLIENT); - (void) Expect_BadIDChoice(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_IDCHOICE2: - Log_Trace("client %d sent CopyColormapAndFree request with out-of-range resource ID\n", CLIENT); - (void) Expect_BadIDChoice(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent CopyColormapAndFree request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong CopyColormapAndFree request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the resource ID is already in use, -then the X server sends back a BadIDChoice error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Send an invalid xname protocol request with identical resource ID - to the X server. -Verify that the X server sends back a BadIDChoice error. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Send an invalid xname protocol request with identical resource ID - to the X server. -Verify that the X server sends back a BadIDChoice error. ->>CODE - - test_type = BAD_IDCHOICE1; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the resource ID is outside the range assigned to the client, -then the X server sends back a BadIDChoice error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Send an invalid xname protocol request to the X server with a resource ID - outside the range assigned to the client. -Verify that the X server sends back a BadIDChoice error. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Send an invalid xname protocol request to the X server with a resource ID - outside the range assigned to the client. -Verify that the X server sends back a BadIDChoice error. ->>CODE - - test_type = BAD_IDCHOICE2; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/CopyGC/CopyGC.m b/xts5/tset/Xproto/CopyGC/CopyGC.m new file mode 100644 index 00000000..961f2016 --- /dev/null +++ b/xts5/tset/Xproto/CopyGC/CopyGC.m @@ -0,0 +1,280 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/CopyGC/CopyGC.m,v 1.2 2005-11-03 08:44:04 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/CopyGC/CopyGC.m +>># +>># Description: +>># Tests for CopyGC +>># +>># Modifications: +>># $Log: cpygc.m,v $ +>># Revision 1.2 2005-11-03 08:44:04 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:49 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:23 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:52:54 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:23:55 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:26 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:04:57 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:03:40 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE CopyGC Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for CopyGC request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +GContext gc1, gc2; +xChangeGCReq *cgcr; +xCopyGCReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + gc1 = Create_Default_GContext(CLIENT); + gc2 = Create_GContext(CLIENT); + + cgcr = (xChangeGCReq *) Make_Req(CLIENT, X_ChangeGC); + Send_Req(CLIENT, (xReq *) cgcr); + Log_Trace("client %d sent default ChangeGC request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + Free_Req(cgcr); + + Set_Test_Type(CLIENT, test_type); + req = (xCopyGCReq *) Make_Req(CLIENT, X_CopyGC); + req->dstGC = gc2; + if(test_type == BAD_VALUE) { + req->mask |= 1<<28; /* an unused mask bit */ + req = (xCopyGCReq *) Xstrealloc((char *) req, req->length<<2); + } + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default CopyGC request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_VALUE: + Log_Trace("client %d sent CopyGC request with illegal mask\n", CLIENT); + (void) Expect_BadValue(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent CopyGC request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong CopyGC request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the mask value contains an unused bit, +then the X server sends back a BadValue error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with a mask value + containing an unused bit. +Verify that the X server sends back a BadValue error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with a mask value + containing an unused bit. +Verify that the X server sends back a BadValue error. +>>CODE + + test_type = BAD_VALUE; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/CopyGC/XCopyGC.m b/xts5/tset/Xproto/CopyGC/XCopyGC.m deleted file mode 100644 index ff18fb11..00000000 --- a/xts5/tset/Xproto/CopyGC/XCopyGC.m +++ /dev/null @@ -1,280 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XCopyGC/XCopyGC.m,v 1.2 2005-11-03 08:44:04 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XCopyGC/XCopyGC.m ->># ->># Description: ->># Tests for CopyGC ->># ->># Modifications: ->># $Log: cpygc.m,v $ ->># Revision 1.2 2005-11-03 08:44:04 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:49 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:23 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:52:54 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:23:55 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:26 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:04:57 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:03:40 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE CopyGC Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for CopyGC request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -GContext gc1, gc2; -xChangeGCReq *cgcr; -xCopyGCReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - gc1 = Create_Default_GContext(CLIENT); - gc2 = Create_GContext(CLIENT); - - cgcr = (xChangeGCReq *) Make_Req(CLIENT, X_ChangeGC); - Send_Req(CLIENT, (xReq *) cgcr); - Log_Trace("client %d sent default ChangeGC request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - Free_Req(cgcr); - - Set_Test_Type(CLIENT, test_type); - req = (xCopyGCReq *) Make_Req(CLIENT, X_CopyGC); - req->dstGC = gc2; - if(test_type == BAD_VALUE) { - req->mask |= 1<<28; /* an unused mask bit */ - req = (xCopyGCReq *) Xstrealloc((char *) req, req->length<<2); - } - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default CopyGC request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_VALUE: - Log_Trace("client %d sent CopyGC request with illegal mask\n", CLIENT); - (void) Expect_BadValue(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent CopyGC request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong CopyGC request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the mask value contains an unused bit, -then the X server sends back a BadValue error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with a mask value - containing an unused bit. -Verify that the X server sends back a BadValue error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with a mask value - containing an unused bit. -Verify that the X server sends back a BadValue error. ->>CODE - - test_type = BAD_VALUE; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/CopyPlane/CopyPlane.m b/xts5/tset/Xproto/CopyPlane/CopyPlane.m new file mode 100644 index 00000000..8f20dd3b --- /dev/null +++ b/xts5/tset/Xproto/CopyPlane/CopyPlane.m @@ -0,0 +1,257 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/CopyPlane/CopyPlane.m,v 1.2 2005-11-03 08:44:04 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/CopyPlane/CopyPlane.m +>># +>># Description: +>># Tests for CopyPlane +>># +>># Modifications: +>># $Log: cpypln.m,v $ +>># Revision 1.2 2005-11-03 08:44:04 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:50 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:24 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:52:55 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:23:55 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:26 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:04:58 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:03:43 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE CopyPlane Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for CopyPlane request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +Window win; +xCopyPlaneReq *req; +xEvent *ev; + +static +void +tester() +{ + Create_Client(CLIENT); + + win = Create_Default_Window(CLIENT); + (void) Create_Default_GContext(CLIENT); + Map_Window(CLIENT, win); + + Set_Test_Type(CLIENT, test_type); + req = (xCopyPlaneReq *) Make_Req(CLIENT, X_CopyPlane); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default CopyPlane request\n", CLIENT); + if ((ev = (xEvent *) Expect_Event(CLIENT, GraphicsExpose)) == NULL) { + Log_Err("client %d failed to receive GraphicsExpose\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received GraphicsExpose\n", CLIENT); + /* do any event checking here */ + Free_Event(ev); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent CopyPlane request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong CopyPlane request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +and +.M graphics-exposures +in the graphics context is +.S True , +then the X server sends back a +.S GraphicsExpose +event to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a GraphicsExpose event. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a GraphicsExpose event. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/CopyPlane/XCopyPlane.m b/xts5/tset/Xproto/CopyPlane/XCopyPlane.m deleted file mode 100644 index 05b49722..00000000 --- a/xts5/tset/Xproto/CopyPlane/XCopyPlane.m +++ /dev/null @@ -1,257 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XCopyPlane/XCopyPlane.m,v 1.2 2005-11-03 08:44:04 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XCopyPlane/XCopyPlane.m ->># ->># Description: ->># Tests for CopyPlane ->># ->># Modifications: ->># $Log: cpypln.m,v $ ->># Revision 1.2 2005-11-03 08:44:04 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:50 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:24 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:52:55 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:23:55 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:26 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:04:58 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:03:43 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE CopyPlane Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for CopyPlane request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -Window win; -xCopyPlaneReq *req; -xEvent *ev; - -static -void -tester() -{ - Create_Client(CLIENT); - - win = Create_Default_Window(CLIENT); - (void) Create_Default_GContext(CLIENT); - Map_Window(CLIENT, win); - - Set_Test_Type(CLIENT, test_type); - req = (xCopyPlaneReq *) Make_Req(CLIENT, X_CopyPlane); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default CopyPlane request\n", CLIENT); - if ((ev = (xEvent *) Expect_Event(CLIENT, GraphicsExpose)) == NULL) { - Log_Err("client %d failed to receive GraphicsExpose\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received GraphicsExpose\n", CLIENT); - /* do any event checking here */ - Free_Event(ev); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent CopyPlane request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong CopyPlane request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -and -.M graphics-exposures -in the graphics context is -.S True , -then the X server sends back a -.S GraphicsExpose -event to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a GraphicsExpose event. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a GraphicsExpose event. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/CreateColormap/CreateColormap.m b/xts5/tset/Xproto/CreateColormap/CreateColormap.m new file mode 100644 index 00000000..f8689544 --- /dev/null +++ b/xts5/tset/Xproto/CreateColormap/CreateColormap.m @@ -0,0 +1,313 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/CreateColormap/CreateColormap.m,v 1.2 2005-11-03 08:44:05 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/CreateColormap/CreateColormap.m +>># +>># Description: +>># Tests for CreateColormap +>># +>># Modifications: +>># $Log: crtclrmp.m,v $ +>># Revision 1.2 2005-11-03 08:44:05 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:50 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:25 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:52:58 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:23:56 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:27 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:01 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:03:47 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE CreateColormap Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for CreateColormap request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xCreateColormapReq *req; + +/* + intent: send a CreateColormap request to the server and check + for the correct response + input: + output: + global input: + side effects: creates a window resource and a colormap resource + methods: +*/ + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xCreateColormapReq *) Make_Req(CLIENT, X_CreateColormap); + if(test_type == BAD_IDCHOICE1) { + Send_Req(CLIENT, (xReq *) req); + Log_Trace("client %d sent CreateColormap request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + } + if(test_type == BAD_IDCHOICE2) { + req->mid = 0xffffffff; /* top 2 bits set ==> invalid */ + } + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default CreateColormap request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_IDCHOICE1: + Log_Trace("client %d sent CreateColormap request with same resource ID\n", CLIENT); + (void) Expect_BadIDChoice(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_IDCHOICE2: + Log_Trace("client %d sent CreateColormap request with out-of-range resource ID\n", CLIENT); + (void) Expect_BadIDChoice(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent CreateColormap request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong CreateColormap request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the resource ID is already in use, +then the X server sends back a BadIDChoice error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Send an invalid xname protocol request with identical resource ID + to the X server. +Verify that the X server sends back a BadIDChoice error. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Send an invalid xname protocol request with identical resource ID + to the X server. +Verify that the X server sends back a BadIDChoice error. +>>CODE + + test_type = BAD_IDCHOICE1; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the resource ID is outside the range assigned to the client, +then the X server sends back a BadIDChoice error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Send an invalid xname protocol request to the X server with a resource ID + outside the range assigned to the client. +Verify that the X server sends back a BadIDChoice error. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Send an invalid xname protocol request to the X server with a resource ID + outside the range assigned to the client. +Verify that the X server sends back a BadIDChoice error. +>>CODE + + test_type = BAD_IDCHOICE2; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/CreateColormap/XCreateColormap.m b/xts5/tset/Xproto/CreateColormap/XCreateColormap.m deleted file mode 100644 index a522af2c..00000000 --- a/xts5/tset/Xproto/CreateColormap/XCreateColormap.m +++ /dev/null @@ -1,313 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XCreateColormap/XCreateColormap.m,v 1.2 2005-11-03 08:44:05 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XCreateColormap/XCreateColormap.m ->># ->># Description: ->># Tests for CreateColormap ->># ->># Modifications: ->># $Log: crtclrmp.m,v $ ->># Revision 1.2 2005-11-03 08:44:05 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:50 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:25 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:52:58 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:23:56 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:27 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:01 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:03:47 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE CreateColormap Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for CreateColormap request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xCreateColormapReq *req; - -/* - intent: send a CreateColormap request to the server and check - for the correct response - input: - output: - global input: - side effects: creates a window resource and a colormap resource - methods: -*/ - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xCreateColormapReq *) Make_Req(CLIENT, X_CreateColormap); - if(test_type == BAD_IDCHOICE1) { - Send_Req(CLIENT, (xReq *) req); - Log_Trace("client %d sent CreateColormap request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - } - if(test_type == BAD_IDCHOICE2) { - req->mid = 0xffffffff; /* top 2 bits set ==> invalid */ - } - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default CreateColormap request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_IDCHOICE1: - Log_Trace("client %d sent CreateColormap request with same resource ID\n", CLIENT); - (void) Expect_BadIDChoice(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_IDCHOICE2: - Log_Trace("client %d sent CreateColormap request with out-of-range resource ID\n", CLIENT); - (void) Expect_BadIDChoice(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent CreateColormap request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong CreateColormap request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the resource ID is already in use, -then the X server sends back a BadIDChoice error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Send an invalid xname protocol request with identical resource ID - to the X server. -Verify that the X server sends back a BadIDChoice error. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Send an invalid xname protocol request with identical resource ID - to the X server. -Verify that the X server sends back a BadIDChoice error. ->>CODE - - test_type = BAD_IDCHOICE1; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the resource ID is outside the range assigned to the client, -then the X server sends back a BadIDChoice error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Send an invalid xname protocol request to the X server with a resource ID - outside the range assigned to the client. -Verify that the X server sends back a BadIDChoice error. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Send an invalid xname protocol request to the X server with a resource ID - outside the range assigned to the client. -Verify that the X server sends back a BadIDChoice error. ->>CODE - - test_type = BAD_IDCHOICE2; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/CreateGC/CreateGC.m b/xts5/tset/Xproto/CreateGC/CreateGC.m new file mode 100644 index 00000000..dccb7822 --- /dev/null +++ b/xts5/tset/Xproto/CreateGC/CreateGC.m @@ -0,0 +1,334 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/CreateGC/CreateGC.m,v 1.2 2005-11-03 08:44:05 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/CreateGC/CreateGC.m +>># +>># Description: +>># Tests for CreateGC +>># +>># Modifications: +>># $Log: crtgc.m,v $ +>># Revision 1.2 2005-11-03 08:44:05 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:51 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:26 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:00 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:23:57 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:28 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:04 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:03:52 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE CreateGC Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for CreateGC request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xCreateGCReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xCreateGCReq *) Make_Req(CLIENT, X_CreateGC); + if(test_type == BAD_IDCHOICE1) { + Send_Req(CLIENT, (xReq *) req); + Log_Trace("client %d sent CreateGC request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + } + if(test_type == BAD_IDCHOICE2) { + req->gc = 0xffffffff; /* top 2 bits set ==> invalid */ + } + if(test_type == BAD_VALUE) { + req->mask |= 1<<28; /* an unused mask bit */ + req->length += 1; + req = (xCreateGCReq *) Xstrealloc((char *) req, req->length<<2); + } + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default CreateGC request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_IDCHOICE1: + Log_Trace("client %d sent CreateGC request with same resource ID\n", CLIENT); + (void) Expect_BadIDChoice(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_IDCHOICE2: + Log_Trace("client %d sent CreateGC request with out-of-range resource ID\n", CLIENT); + (void) Expect_BadIDChoice(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_VALUE: + Log_Trace("client %d sent CreateGC request with illegal mask\n", CLIENT); + (void) Expect_BadValue(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent CreateGC request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong CreateGC request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the resource ID is already in use, +then the X server sends back a BadIDChoice error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Send an invalid xname protocol request with identical resource ID + to the X server. +Verify that the X server sends back a BadIDChoice error. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Send an invalid xname protocol request with identical resource ID + to the X server. +Verify that the X server sends back a BadIDChoice error. +>>CODE + + test_type = BAD_IDCHOICE1; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the resource ID is outside the range assigned to the client, +then the X server sends back a BadIDChoice error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Send an invalid xname protocol request to the X server with a resource ID + outside the range assigned to the client. +Verify that the X server sends back a BadIDChoice error. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Send an invalid xname protocol request to the X server with a resource ID + outside the range assigned to the client. +Verify that the X server sends back a BadIDChoice error. +>>CODE + + test_type = BAD_IDCHOICE2; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the mask value contains an unused bit, +then the X server sends back a BadValue error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with a mask value + containing an unused bit. +Verify that the X server sends back a BadValue error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with a mask value + containing an unused bit. +Verify that the X server sends back a BadValue error. +>>CODE + + test_type = BAD_VALUE; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/CreateGC/XCreateGC.m b/xts5/tset/Xproto/CreateGC/XCreateGC.m deleted file mode 100644 index 94327a42..00000000 --- a/xts5/tset/Xproto/CreateGC/XCreateGC.m +++ /dev/null @@ -1,334 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XCreateGC/XCreateGC.m,v 1.2 2005-11-03 08:44:05 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XCreateGC/XCreateGC.m ->># ->># Description: ->># Tests for CreateGC ->># ->># Modifications: ->># $Log: crtgc.m,v $ ->># Revision 1.2 2005-11-03 08:44:05 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:51 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:26 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:00 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:23:57 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:28 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:04 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:03:52 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE CreateGC Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for CreateGC request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xCreateGCReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xCreateGCReq *) Make_Req(CLIENT, X_CreateGC); - if(test_type == BAD_IDCHOICE1) { - Send_Req(CLIENT, (xReq *) req); - Log_Trace("client %d sent CreateGC request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - } - if(test_type == BAD_IDCHOICE2) { - req->gc = 0xffffffff; /* top 2 bits set ==> invalid */ - } - if(test_type == BAD_VALUE) { - req->mask |= 1<<28; /* an unused mask bit */ - req->length += 1; - req = (xCreateGCReq *) Xstrealloc((char *) req, req->length<<2); - } - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default CreateGC request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_IDCHOICE1: - Log_Trace("client %d sent CreateGC request with same resource ID\n", CLIENT); - (void) Expect_BadIDChoice(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_IDCHOICE2: - Log_Trace("client %d sent CreateGC request with out-of-range resource ID\n", CLIENT); - (void) Expect_BadIDChoice(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_VALUE: - Log_Trace("client %d sent CreateGC request with illegal mask\n", CLIENT); - (void) Expect_BadValue(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent CreateGC request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong CreateGC request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the resource ID is already in use, -then the X server sends back a BadIDChoice error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Send an invalid xname protocol request with identical resource ID - to the X server. -Verify that the X server sends back a BadIDChoice error. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Send an invalid xname protocol request with identical resource ID - to the X server. -Verify that the X server sends back a BadIDChoice error. ->>CODE - - test_type = BAD_IDCHOICE1; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the resource ID is outside the range assigned to the client, -then the X server sends back a BadIDChoice error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Send an invalid xname protocol request to the X server with a resource ID - outside the range assigned to the client. -Verify that the X server sends back a BadIDChoice error. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Send an invalid xname protocol request to the X server with a resource ID - outside the range assigned to the client. -Verify that the X server sends back a BadIDChoice error. ->>CODE - - test_type = BAD_IDCHOICE2; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the mask value contains an unused bit, -then the X server sends back a BadValue error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with a mask value - containing an unused bit. -Verify that the X server sends back a BadValue error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with a mask value - containing an unused bit. -Verify that the X server sends back a BadValue error. ->>CODE - - test_type = BAD_VALUE; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/CreateGlyphCursor/CreateGlyphCursor.m b/xts5/tset/Xproto/CreateGlyphCursor/CreateGlyphCursor.m new file mode 100644 index 00000000..b0ebbe29 --- /dev/null +++ b/xts5/tset/Xproto/CreateGlyphCursor/CreateGlyphCursor.m @@ -0,0 +1,308 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/CreateGlyphCursor/CreateGlyphCursor.m,v 1.2 2005-11-03 08:44:05 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/CreateGlyphCursor/CreateGlyphCursor.m +>># +>># Description: +>># Tests for CreateGlyphCursor +>># +>># Modifications: +>># $Log: crtglyphcr.m,v $ +>># Revision 1.2 2005-11-03 08:44:05 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:52 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:27 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:01 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:23:57 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:29 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:06 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:03:56 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE CreateGlyphCursor Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>SET tpstartup tpfontstartup +>>SET tpcleanup tpfontcleanup +>>EXTERN +/* Touch test for CreateGlyphCursor request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xCreateGlyphCursorReq *req; + +static +void +tester() +{ + Set_Init_Timer(); + + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + (void) Create_Default_Font(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xCreateGlyphCursorReq *) Make_Req(CLIENT, X_CreateGlyphCursor); + if(test_type == BAD_IDCHOICE1) { + Send_Req(CLIENT, (xReq *) req); + Log_Trace("client %d sent CreateGlyphCursor request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + } + if(test_type == BAD_IDCHOICE2) { + req->cid = 0xffffffff; /* top 2 bits set ==> invalid */ + } + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default CreateGlyphCursor request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_IDCHOICE1: + Log_Trace("client %d sent CreateGlyphCursor request with same resource ID\n", CLIENT); + (void) Expect_BadIDChoice(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_IDCHOICE2: + Log_Trace("client %d sent CreateGlyphCursor request with out-of-range resource ID\n", CLIENT); + (void) Expect_BadIDChoice(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent CreateGlyphCursor request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong CreateGlyphCursor request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the resource ID is already in use, +then the X server sends back a BadIDChoice error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Send an invalid xname protocol request with identical resource ID + to the X server. +Verify that the X server sends back a BadIDChoice error. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Send an invalid xname protocol request with identical resource ID + to the X server. +Verify that the X server sends back a BadIDChoice error. +>>CODE + + test_type = BAD_IDCHOICE1; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the resource ID is outside the range assigned to the client, +then the X server sends back a BadIDChoice error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Send an invalid xname protocol request to the X server with a resource ID + outside the range assigned to the client. +Verify that the X server sends back a BadIDChoice error. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Send an invalid xname protocol request to the X server with a resource ID + outside the range assigned to the client. +Verify that the X server sends back a BadIDChoice error. +>>CODE + + test_type = BAD_IDCHOICE2; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/CreateGlyphCursor/XCreateGlyphCursor.m b/xts5/tset/Xproto/CreateGlyphCursor/XCreateGlyphCursor.m deleted file mode 100644 index 97f0219c..00000000 --- a/xts5/tset/Xproto/CreateGlyphCursor/XCreateGlyphCursor.m +++ /dev/null @@ -1,308 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XCreateGlyphCursor/XCreateGlyphCursor.m,v 1.2 2005-11-03 08:44:05 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XCreateGlyphCursor/XCreateGlyphCursor.m ->># ->># Description: ->># Tests for CreateGlyphCursor ->># ->># Modifications: ->># $Log: crtglyphcr.m,v $ ->># Revision 1.2 2005-11-03 08:44:05 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:52 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:27 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:01 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:23:57 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:29 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:06 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:03:56 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE CreateGlyphCursor Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>SET tpstartup tpfontstartup ->>SET tpcleanup tpfontcleanup ->>EXTERN -/* Touch test for CreateGlyphCursor request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xCreateGlyphCursorReq *req; - -static -void -tester() -{ - Set_Init_Timer(); - - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - (void) Create_Default_Font(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xCreateGlyphCursorReq *) Make_Req(CLIENT, X_CreateGlyphCursor); - if(test_type == BAD_IDCHOICE1) { - Send_Req(CLIENT, (xReq *) req); - Log_Trace("client %d sent CreateGlyphCursor request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - } - if(test_type == BAD_IDCHOICE2) { - req->cid = 0xffffffff; /* top 2 bits set ==> invalid */ - } - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default CreateGlyphCursor request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_IDCHOICE1: - Log_Trace("client %d sent CreateGlyphCursor request with same resource ID\n", CLIENT); - (void) Expect_BadIDChoice(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_IDCHOICE2: - Log_Trace("client %d sent CreateGlyphCursor request with out-of-range resource ID\n", CLIENT); - (void) Expect_BadIDChoice(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent CreateGlyphCursor request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong CreateGlyphCursor request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the resource ID is already in use, -then the X server sends back a BadIDChoice error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Send an invalid xname protocol request with identical resource ID - to the X server. -Verify that the X server sends back a BadIDChoice error. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Send an invalid xname protocol request with identical resource ID - to the X server. -Verify that the X server sends back a BadIDChoice error. ->>CODE - - test_type = BAD_IDCHOICE1; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the resource ID is outside the range assigned to the client, -then the X server sends back a BadIDChoice error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Send an invalid xname protocol request to the X server with a resource ID - outside the range assigned to the client. -Verify that the X server sends back a BadIDChoice error. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Send an invalid xname protocol request to the X server with a resource ID - outside the range assigned to the client. -Verify that the X server sends back a BadIDChoice error. ->>CODE - - test_type = BAD_IDCHOICE2; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/CreatePixmap/CreatePixmap.m b/xts5/tset/Xproto/CreatePixmap/CreatePixmap.m new file mode 100644 index 00000000..f6535ad9 --- /dev/null +++ b/xts5/tset/Xproto/CreatePixmap/CreatePixmap.m @@ -0,0 +1,303 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/CreatePixmap/CreatePixmap.m,v 1.2 2005-11-03 08:44:06 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/CreatePixmap/CreatePixmap.m +>># +>># Description: +>># Tests for CreatePixmap +>># +>># Modifications: +>># $Log: crtpxmp.m,v $ +>># Revision 1.2 2005-11-03 08:44:06 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:53 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:27 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:02 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:23:58 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:29 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:08 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:03:58 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE CreatePixmap Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for CreatePixmap request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xCreatePixmapReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xCreatePixmapReq *) Make_Req(CLIENT, X_CreatePixmap); + if(test_type == BAD_IDCHOICE1) { + Send_Req(CLIENT, (xReq *) req); + Log_Trace("client %d sent CreatePixmap request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + } + if(test_type == BAD_IDCHOICE2) { + req->pid = 0xffffffff; /* top 2 bits set ==> invalid */ + } + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default CreatePixmap request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_IDCHOICE1: + Log_Trace("client %d sent CreatePixmap request with same resource ID\n", CLIENT); + (void) Expect_BadIDChoice(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_IDCHOICE2: + Log_Trace("client %d sent CreatePixmap request with out-of-range resource ID\n", CLIENT); + (void) Expect_BadIDChoice(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent CreatePixmap request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong CreatePixmap request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the resource ID is already in use, +then the X server sends back a BadIDChoice error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Send an invalid xname protocol request with identical resource ID + to the X server. +Verify that the X server sends back a BadIDChoice error. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Send an invalid xname protocol request with identical resource ID + to the X server. +Verify that the X server sends back a BadIDChoice error. +>>CODE + + test_type = BAD_IDCHOICE1; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the resource ID is outside the range assigned to the client, +then the X server sends back a BadIDChoice error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Send an invalid xname protocol request to the X server with a resource ID + outside the range assigned to the client. +Verify that the X server sends back a BadIDChoice error. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Send an invalid xname protocol request to the X server with a resource ID + outside the range assigned to the client. +Verify that the X server sends back a BadIDChoice error. +>>CODE + + test_type = BAD_IDCHOICE2; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/CreatePixmap/XCreatePixmap.m b/xts5/tset/Xproto/CreatePixmap/XCreatePixmap.m deleted file mode 100644 index 3f6ee6fd..00000000 --- a/xts5/tset/Xproto/CreatePixmap/XCreatePixmap.m +++ /dev/null @@ -1,303 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XCreatePixmap/XCreatePixmap.m,v 1.2 2005-11-03 08:44:06 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XCreatePixmap/XCreatePixmap.m ->># ->># Description: ->># Tests for CreatePixmap ->># ->># Modifications: ->># $Log: crtpxmp.m,v $ ->># Revision 1.2 2005-11-03 08:44:06 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:53 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:27 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:02 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:23:58 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:29 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:08 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:03:58 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE CreatePixmap Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for CreatePixmap request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xCreatePixmapReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xCreatePixmapReq *) Make_Req(CLIENT, X_CreatePixmap); - if(test_type == BAD_IDCHOICE1) { - Send_Req(CLIENT, (xReq *) req); - Log_Trace("client %d sent CreatePixmap request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - } - if(test_type == BAD_IDCHOICE2) { - req->pid = 0xffffffff; /* top 2 bits set ==> invalid */ - } - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default CreatePixmap request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_IDCHOICE1: - Log_Trace("client %d sent CreatePixmap request with same resource ID\n", CLIENT); - (void) Expect_BadIDChoice(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_IDCHOICE2: - Log_Trace("client %d sent CreatePixmap request with out-of-range resource ID\n", CLIENT); - (void) Expect_BadIDChoice(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent CreatePixmap request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong CreatePixmap request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the resource ID is already in use, -then the X server sends back a BadIDChoice error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Send an invalid xname protocol request with identical resource ID - to the X server. -Verify that the X server sends back a BadIDChoice error. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Send an invalid xname protocol request with identical resource ID - to the X server. -Verify that the X server sends back a BadIDChoice error. ->>CODE - - test_type = BAD_IDCHOICE1; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the resource ID is outside the range assigned to the client, -then the X server sends back a BadIDChoice error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Send an invalid xname protocol request to the X server with a resource ID - outside the range assigned to the client. -Verify that the X server sends back a BadIDChoice error. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Send an invalid xname protocol request to the X server with a resource ID - outside the range assigned to the client. -Verify that the X server sends back a BadIDChoice error. ->>CODE - - test_type = BAD_IDCHOICE2; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/CreateWindow/CreateWindow.m b/xts5/tset/Xproto/CreateWindow/CreateWindow.m new file mode 100644 index 00000000..f1f18c59 --- /dev/null +++ b/xts5/tset/Xproto/CreateWindow/CreateWindow.m @@ -0,0 +1,339 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/CreateWindow/CreateWindow.m,v 1.2 2005-11-03 08:44:06 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/CreateWindow/CreateWindow.m +>># +>># Description: +>># Tests for CreateWindow +>># +>># Modifications: +>># $Log: crtwdw.m,v $ +>># Revision 1.2 2005-11-03 08:44:06 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:53 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:28 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:03 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:23:58 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:30 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:10 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:04:00 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE CreateWindow Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for CreateWindow request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +Window Default_Window; +xCreateWindowReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + Default_Window = Create_Default_Window(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xCreateWindowReq *) Make_Req(CLIENT, X_CreateWindow); + req->parent = Default_Window; + if(test_type == BAD_IDCHOICE1) { + Send_Req(CLIENT, (xReq *) req); + Log_Trace("client %d sent CreateWindow request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + } + if(test_type == BAD_IDCHOICE2) { + req->wid = 0xffffffff; /* top 2 bits set ==> invalid */ + } + if(test_type == BAD_VALUE) { + req->mask |= 1<<28; /* an unused mask bit */ + req->length += 1; + req = (xCreateWindowReq *) Xstrealloc((char *) req, req->length<<2); + } + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default CreateWindow request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_IDCHOICE1: + Log_Trace("client %d sent CreateWindow request with same resource ID\n", CLIENT); + (void) Expect_BadIDChoice(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_IDCHOICE2: + Log_Trace("client %d sent CreateWindow request with out-of-range resource ID\n", CLIENT); + (void) Expect_BadIDChoice(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_VALUE: + Log_Trace("client %d sent CreateWindow request with illegal mask\n", CLIENT); + (void) Expect_BadValue(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent CreateWindow request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong CreateWindow request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +and the client has no event selected in the +.M event_mask +for any window, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the resource ID is already in use, +then the X server sends back a BadIDChoice error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Send an invalid xname protocol request with identical resource ID + to the X server. +Verify that the X server sends back a BadIDChoice error. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Send an invalid xname protocol request with identical resource ID + to the X server. +Verify that the X server sends back a BadIDChoice error. +>>CODE + + test_type = BAD_IDCHOICE1; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the resource ID is outside the range assigned to the client, +then the X server sends back a BadIDChoice error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Send an invalid xname protocol request to the X server with a resource ID + outside the range assigned to the client. +Verify that the X server sends back a BadIDChoice error. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Send an invalid xname protocol request to the X server with a resource ID + outside the range assigned to the client. +Verify that the X server sends back a BadIDChoice error. +>>CODE + + test_type = BAD_IDCHOICE2; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the mask value contains an unused bit, +then the X server sends back a BadValue error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with a mask value + containing an unused bit. +Verify that the X server sends back a BadValue error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with a mask value + containing an unused bit. +Verify that the X server sends back a BadValue error. +>>CODE + + test_type = BAD_VALUE; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/CreateWindow/XCreateWindow.m b/xts5/tset/Xproto/CreateWindow/XCreateWindow.m deleted file mode 100644 index 321fa8f3..00000000 --- a/xts5/tset/Xproto/CreateWindow/XCreateWindow.m +++ /dev/null @@ -1,339 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XCreateWindow/XCreateWindow.m,v 1.2 2005-11-03 08:44:06 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XCreateWindow/XCreateWindow.m ->># ->># Description: ->># Tests for CreateWindow ->># ->># Modifications: ->># $Log: crtwdw.m,v $ ->># Revision 1.2 2005-11-03 08:44:06 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:53 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:28 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:03 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:23:58 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:30 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:10 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:04:00 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE CreateWindow Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for CreateWindow request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -Window Default_Window; -xCreateWindowReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - Default_Window = Create_Default_Window(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xCreateWindowReq *) Make_Req(CLIENT, X_CreateWindow); - req->parent = Default_Window; - if(test_type == BAD_IDCHOICE1) { - Send_Req(CLIENT, (xReq *) req); - Log_Trace("client %d sent CreateWindow request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - } - if(test_type == BAD_IDCHOICE2) { - req->wid = 0xffffffff; /* top 2 bits set ==> invalid */ - } - if(test_type == BAD_VALUE) { - req->mask |= 1<<28; /* an unused mask bit */ - req->length += 1; - req = (xCreateWindowReq *) Xstrealloc((char *) req, req->length<<2); - } - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default CreateWindow request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_IDCHOICE1: - Log_Trace("client %d sent CreateWindow request with same resource ID\n", CLIENT); - (void) Expect_BadIDChoice(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_IDCHOICE2: - Log_Trace("client %d sent CreateWindow request with out-of-range resource ID\n", CLIENT); - (void) Expect_BadIDChoice(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_VALUE: - Log_Trace("client %d sent CreateWindow request with illegal mask\n", CLIENT); - (void) Expect_BadValue(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent CreateWindow request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong CreateWindow request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -and the client has no event selected in the -.M event_mask -for any window, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the resource ID is already in use, -then the X server sends back a BadIDChoice error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Send an invalid xname protocol request with identical resource ID - to the X server. -Verify that the X server sends back a BadIDChoice error. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Send an invalid xname protocol request with identical resource ID - to the X server. -Verify that the X server sends back a BadIDChoice error. ->>CODE - - test_type = BAD_IDCHOICE1; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the resource ID is outside the range assigned to the client, -then the X server sends back a BadIDChoice error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Send an invalid xname protocol request to the X server with a resource ID - outside the range assigned to the client. -Verify that the X server sends back a BadIDChoice error. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Send an invalid xname protocol request to the X server with a resource ID - outside the range assigned to the client. -Verify that the X server sends back a BadIDChoice error. ->>CODE - - test_type = BAD_IDCHOICE2; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the mask value contains an unused bit, -then the X server sends back a BadValue error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with a mask value - containing an unused bit. -Verify that the X server sends back a BadValue error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with a mask value - containing an unused bit. -Verify that the X server sends back a BadValue error. ->>CODE - - test_type = BAD_VALUE; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/DeleteProperty/DeleteProperty.m b/xts5/tset/Xproto/DeleteProperty/DeleteProperty.m new file mode 100644 index 00000000..45baf089 --- /dev/null +++ b/xts5/tset/Xproto/DeleteProperty/DeleteProperty.m @@ -0,0 +1,253 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/DeleteProperty/DeleteProperty.m,v 1.2 2005-11-03 08:44:06 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/DeleteProperty/DeleteProperty.m +>># +>># Description: +>># Tests for DeleteProperty +>># +>># Modifications: +>># $Log: dltprprty.m,v $ +>># Revision 1.2 2005-11-03 08:44:06 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:54 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:28 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:04 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:23:59 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:30 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:11 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:04:03 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE DeleteProperty Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for DeleteProperty request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +Atom Test_Property; +xChangePropertyReq *cpr; +xDeletePropertyReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + Test_Property = Create_Default_Atom(CLIENT); + + cpr = (xChangePropertyReq *) Make_Req(CLIENT, X_ChangeProperty); + cpr->property = Test_Property; + Send_Req(CLIENT, (xReq *) cpr); + Log_Trace("client %d sent default ChangeProperty request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + Free_Req(cpr); + + Set_Test_Type(CLIENT, test_type); + req = (xDeletePropertyReq *) Make_Req(CLIENT, X_DeleteProperty); + req->property = Test_Property; + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default DeleteProperty request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent DeleteProperty request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong DeleteProperty request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +and the client has no event selected in the +.M event_mask +for any window, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/DeleteProperty/XDeleteProperty.m b/xts5/tset/Xproto/DeleteProperty/XDeleteProperty.m deleted file mode 100644 index 7dacca33..00000000 --- a/xts5/tset/Xproto/DeleteProperty/XDeleteProperty.m +++ /dev/null @@ -1,253 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XDeleteProperty/XDeleteProperty.m,v 1.2 2005-11-03 08:44:06 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XDeleteProperty/XDeleteProperty.m ->># ->># Description: ->># Tests for DeleteProperty ->># ->># Modifications: ->># $Log: dltprprty.m,v $ ->># Revision 1.2 2005-11-03 08:44:06 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:54 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:28 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:04 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:23:59 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:30 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:11 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:04:03 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE DeleteProperty Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for DeleteProperty request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -Atom Test_Property; -xChangePropertyReq *cpr; -xDeletePropertyReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - Test_Property = Create_Default_Atom(CLIENT); - - cpr = (xChangePropertyReq *) Make_Req(CLIENT, X_ChangeProperty); - cpr->property = Test_Property; - Send_Req(CLIENT, (xReq *) cpr); - Log_Trace("client %d sent default ChangeProperty request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - Free_Req(cpr); - - Set_Test_Type(CLIENT, test_type); - req = (xDeletePropertyReq *) Make_Req(CLIENT, X_DeleteProperty); - req->property = Test_Property; - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default DeleteProperty request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent DeleteProperty request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong DeleteProperty request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -and the client has no event selected in the -.M event_mask -for any window, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/DestroySubwindows/DestroySubwindows.m b/xts5/tset/Xproto/DestroySubwindows/DestroySubwindows.m new file mode 100644 index 00000000..60cbf938 --- /dev/null +++ b/xts5/tset/Xproto/DestroySubwindows/DestroySubwindows.m @@ -0,0 +1,251 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/DestroySubwindows/DestroySubwindows.m,v 1.2 2005-11-03 08:44:06 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/DestroySubwindows/DestroySubwindows.m +>># +>># Description: +>># Tests for DestroySubwindows +>># +>># Modifications: +>># $Log: dstrysbws.m,v $ +>># Revision 1.2 2005-11-03 08:44:06 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:54 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:29 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:04 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:23:59 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:31 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:13 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:04:05 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE DestroySubwindows Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for DestroySubwindows request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +Window Default_Window; +xCreateWindowReq *cwr; +xResourceReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + Default_Window = Create_Default_Window(CLIENT); + + cwr = (xCreateWindowReq *) Make_Req(CLIENT, X_CreateWindow); + cwr->parent = Default_Window; + Send_Req(CLIENT, (xReq *) cwr); + Log_Trace("client %d sent additional CreateWindow request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + Free_Req(cwr); + + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_DestroySubwindows); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default DestroySubwindows request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent DestroySubwindows request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong DestroySubwindows request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +and the client has no event selected in the +.M event_mask +for any window, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/DestroySubwindows/XDestroySubwindows.m b/xts5/tset/Xproto/DestroySubwindows/XDestroySubwindows.m deleted file mode 100644 index 0b72c417..00000000 --- a/xts5/tset/Xproto/DestroySubwindows/XDestroySubwindows.m +++ /dev/null @@ -1,251 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XDestroySubwindows/XDestroySubwindows.m,v 1.2 2005-11-03 08:44:06 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XDestroySubwindows/XDestroySubwindows.m ->># ->># Description: ->># Tests for DestroySubwindows ->># ->># Modifications: ->># $Log: dstrysbws.m,v $ ->># Revision 1.2 2005-11-03 08:44:06 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:54 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:29 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:04 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:23:59 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:31 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:13 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:04:05 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE DestroySubwindows Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for DestroySubwindows request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -Window Default_Window; -xCreateWindowReq *cwr; -xResourceReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - Default_Window = Create_Default_Window(CLIENT); - - cwr = (xCreateWindowReq *) Make_Req(CLIENT, X_CreateWindow); - cwr->parent = Default_Window; - Send_Req(CLIENT, (xReq *) cwr); - Log_Trace("client %d sent additional CreateWindow request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - Free_Req(cwr); - - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_DestroySubwindows); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default DestroySubwindows request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent DestroySubwindows request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong DestroySubwindows request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -and the client has no event selected in the -.M event_mask -for any window, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/DestroyWindow/DestroyWindow.m b/xts5/tset/Xproto/DestroyWindow/DestroyWindow.m new file mode 100644 index 00000000..99bb2e96 --- /dev/null +++ b/xts5/tset/Xproto/DestroyWindow/DestroyWindow.m @@ -0,0 +1,242 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/DestroyWindow/DestroyWindow.m,v 1.2 2005-11-03 08:44:06 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/DestroyWindow/DestroyWindow.m +>># +>># Description: +>># Tests for DestroyWindow +>># +>># Modifications: +>># $Log: dstrywdw.m,v $ +>># Revision 1.2 2005-11-03 08:44:06 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:55 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:29 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:05 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:00 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:31 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:14 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:04:07 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE DestroyWindow Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for DestroyWindow request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xResourceReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_DestroyWindow); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default DestroyWindow request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent DestroyWindow request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong DestroyWindow request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +and the client has no event selected in the +.M event_mask +for any window, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/DestroyWindow/XDestroyWindow.m b/xts5/tset/Xproto/DestroyWindow/XDestroyWindow.m deleted file mode 100644 index 5ac74fbc..00000000 --- a/xts5/tset/Xproto/DestroyWindow/XDestroyWindow.m +++ /dev/null @@ -1,242 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XDestroyWindow/XDestroyWindow.m,v 1.2 2005-11-03 08:44:06 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XDestroyWindow/XDestroyWindow.m ->># ->># Description: ->># Tests for DestroyWindow ->># ->># Modifications: ->># $Log: dstrywdw.m,v $ ->># Revision 1.2 2005-11-03 08:44:06 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:55 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:29 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:05 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:00 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:31 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:14 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:04:07 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE DestroyWindow Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for DestroyWindow request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xResourceReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_DestroyWindow); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default DestroyWindow request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent DestroyWindow request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong DestroyWindow request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -and the client has no event selected in the -.M event_mask -for any window, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/ForceScreenSaver/ForceScreenSaver.m b/xts5/tset/Xproto/ForceScreenSaver/ForceScreenSaver.m new file mode 100644 index 00000000..a65e9a05 --- /dev/null +++ b/xts5/tset/Xproto/ForceScreenSaver/ForceScreenSaver.m @@ -0,0 +1,239 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/ForceScreenSaver/ForceScreenSaver.m,v 1.2 2005-11-03 08:44:07 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/ForceScreenSaver/ForceScreenSaver.m +>># +>># Description: +>># Tests for ForceScreenSaver +>># +>># Modifications: +>># $Log: frcscrnsvr.m,v $ +>># Revision 1.2 2005-11-03 08:44:07 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:57 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:32 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:10 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:02 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:34 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:21 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:04:16 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE ForceScreenSaver Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for ForceScreenSaver request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xForceScreenSaverReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + /* Activate screen saver */ + Set_Test_Type(CLIENT, test_type); + req = (xForceScreenSaverReq *) Make_Req(CLIENT, X_ForceScreenSaver); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default ForceScreenSaver request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + Visual_Check(); + break; + case BAD_LENGTH: + Log_Trace("client %d sent ForceScreenSaver request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong ForceScreenSaver request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/ForceScreenSaver/XForceScreenSaver.m b/xts5/tset/Xproto/ForceScreenSaver/XForceScreenSaver.m deleted file mode 100644 index 2cf8de33..00000000 --- a/xts5/tset/Xproto/ForceScreenSaver/XForceScreenSaver.m +++ /dev/null @@ -1,239 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XForceScreenSaver/XForceScreenSaver.m,v 1.2 2005-11-03 08:44:07 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XForceScreenSaver/XForceScreenSaver.m ->># ->># Description: ->># Tests for ForceScreenSaver ->># ->># Modifications: ->># $Log: frcscrnsvr.m,v $ ->># Revision 1.2 2005-11-03 08:44:07 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:57 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:32 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:10 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:02 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:34 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:21 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:04:16 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE ForceScreenSaver Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for ForceScreenSaver request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xForceScreenSaverReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - /* Activate screen saver */ - Set_Test_Type(CLIENT, test_type); - req = (xForceScreenSaverReq *) Make_Req(CLIENT, X_ForceScreenSaver); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default ForceScreenSaver request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - Visual_Check(); - break; - case BAD_LENGTH: - Log_Trace("client %d sent ForceScreenSaver request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong ForceScreenSaver request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/FreeColormap/FreeColormap.m b/xts5/tset/Xproto/FreeColormap/FreeColormap.m new file mode 100644 index 00000000..0eda4f2f --- /dev/null +++ b/xts5/tset/Xproto/FreeColormap/FreeColormap.m @@ -0,0 +1,252 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/FreeColormap/FreeColormap.m,v 1.2 2005-11-03 08:44:06 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/FreeColormap/FreeColormap.m +>># +>># Description: +>># Tests for FreeColormap +>># +>># Modifications: +>># $Log: frclrmp.m,v $ +>># Revision 1.2 2005-11-03 08:44:06 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:56 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:30 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:07 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:01 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:32 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:17 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:04:10 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE FreeColormap Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for FreeColormap request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xResourceReq *req; + +/* + intent: send a FreeColormap request to the server and check + that the server sent nothing back + input: + output: none + global input: + side effects: creates a window resource + methods: +*/ + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + (void) Create_Default_Colormap(CLIENT); + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_FreeColormap); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default FreeColormap request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent FreeColormap request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong FreeColormap request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +and the client has no event selected in the +.M event_mask +for any window, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/FreeColormap/XFreeColormap.m b/xts5/tset/Xproto/FreeColormap/XFreeColormap.m deleted file mode 100644 index 398e206f..00000000 --- a/xts5/tset/Xproto/FreeColormap/XFreeColormap.m +++ /dev/null @@ -1,252 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XFreeColormap/XFreeColormap.m,v 1.2 2005-11-03 08:44:06 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XFreeColormap/XFreeColormap.m ->># ->># Description: ->># Tests for FreeColormap ->># ->># Modifications: ->># $Log: frclrmp.m,v $ ->># Revision 1.2 2005-11-03 08:44:06 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:56 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:30 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:07 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:01 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:32 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:17 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:04:10 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE FreeColormap Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for FreeColormap request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xResourceReq *req; - -/* - intent: send a FreeColormap request to the server and check - that the server sent nothing back - input: - output: none - global input: - side effects: creates a window resource - methods: -*/ - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - (void) Create_Default_Colormap(CLIENT); - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_FreeColormap); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default FreeColormap request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent FreeColormap request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong FreeColormap request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -and the client has no event selected in the -.M event_mask -for any window, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/FreeColors/FreeColors.m b/xts5/tset/Xproto/FreeColors/FreeColors.m new file mode 100644 index 00000000..774d2df9 --- /dev/null +++ b/xts5/tset/Xproto/FreeColors/FreeColors.m @@ -0,0 +1,260 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/FreeColors/FreeColors.m,v 1.2 2005-11-03 08:44:07 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/FreeColors/FreeColors.m +>># +>># Description: +>># Tests for FreeColors +>># +>># Modifications: +>># $Log: frclrs.m,v $ +>># Revision 1.2 2005-11-03 08:44:07 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:56 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:31 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:08 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.1 1998/08/04 22:51:03 andy +>># Changed type of reply_pixel from unsigned long to CARD32 to match +>># declaration in libproto/MakeReq.c. +>># +>># Revision 6.0 1998/03/02 05:24:01 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:33 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:18 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:04:12 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE FreeColors Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for FreeColors request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xResourceReq *req; +xAllocNamedColorReply *alloc_reply; +extern CARD32 reply_pixel; + +/* + intent: send a FreeColors request to the server and check + that the server sent nothing back. + input: + output: none + global input: + side effects: creates a window resource + writes to global reply_pixel + methods: +*/ + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + (void) Create_Default_Colormap(CLIENT); + + /* allocate a color and store pixel from reply in global */ + + req = (xResourceReq *) Make_Req(CLIENT, X_AllocNamedColor); + Send_Req(CLIENT, (xReq *) req); + Log_Trace("client %d sent default AllocNamedColor request\n", CLIENT); + if ((alloc_reply = (xAllocNamedColorReply *) Expect_Reply(CLIENT, X_AllocNamedColor)) == NULL) { + Log_Err("client %d failed to receive AllocNamedColor reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received AllocNamedColor reply\n", CLIENT); + } + reply_pixel = alloc_reply->pixel; + (void) Expect_Nothing(CLIENT); + + /* free the allocated color cell */ + + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_FreeColors); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default FreeColors request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent FreeColors request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong FreeColors request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good C +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/FreeColors/XFreeColors.m b/xts5/tset/Xproto/FreeColors/XFreeColors.m deleted file mode 100644 index 178a962c..00000000 --- a/xts5/tset/Xproto/FreeColors/XFreeColors.m +++ /dev/null @@ -1,260 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XFreeColors/XFreeColors.m,v 1.2 2005-11-03 08:44:07 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XFreeColors/XFreeColors.m ->># ->># Description: ->># Tests for FreeColors ->># ->># Modifications: ->># $Log: frclrs.m,v $ ->># Revision 1.2 2005-11-03 08:44:07 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:56 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:31 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:08 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.1 1998/08/04 22:51:03 andy ->># Changed type of reply_pixel from unsigned long to CARD32 to match ->># declaration in libproto/MakeReq.c. ->># ->># Revision 6.0 1998/03/02 05:24:01 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:33 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:18 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:04:12 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE FreeColors Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for FreeColors request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xResourceReq *req; -xAllocNamedColorReply *alloc_reply; -extern CARD32 reply_pixel; - -/* - intent: send a FreeColors request to the server and check - that the server sent nothing back. - input: - output: none - global input: - side effects: creates a window resource - writes to global reply_pixel - methods: -*/ - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - (void) Create_Default_Colormap(CLIENT); - - /* allocate a color and store pixel from reply in global */ - - req = (xResourceReq *) Make_Req(CLIENT, X_AllocNamedColor); - Send_Req(CLIENT, (xReq *) req); - Log_Trace("client %d sent default AllocNamedColor request\n", CLIENT); - if ((alloc_reply = (xAllocNamedColorReply *) Expect_Reply(CLIENT, X_AllocNamedColor)) == NULL) { - Log_Err("client %d failed to receive AllocNamedColor reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received AllocNamedColor reply\n", CLIENT); - } - reply_pixel = alloc_reply->pixel; - (void) Expect_Nothing(CLIENT); - - /* free the allocated color cell */ - - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_FreeColors); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default FreeColors request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent FreeColors request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong FreeColors request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good C -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/FreeCursor/FreeCursor.m b/xts5/tset/Xproto/FreeCursor/FreeCursor.m new file mode 100644 index 00000000..9753f38d --- /dev/null +++ b/xts5/tset/Xproto/FreeCursor/FreeCursor.m @@ -0,0 +1,241 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/FreeCursor/FreeCursor.m,v 1.2 2005-11-03 08:44:07 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/FreeCursor/FreeCursor.m +>># +>># Description: +>># Tests for FreeCursor +>># +>># Modifications: +>># $Log: frcrsr.m,v $ +>># Revision 1.2 2005-11-03 08:44:07 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:56 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:31 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:09 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:02 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:33 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:20 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:04:14 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE FreeCursor Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for FreeCursor request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xResourceReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + (void) Create_Default_Cursor_Pixmap(CLIENT); + (void) Create_Default_Cursor(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_FreeCursor); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default FreeCursor request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent FreeCursor request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong FreeCursor request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/FreeCursor/XFreeCursor.m b/xts5/tset/Xproto/FreeCursor/XFreeCursor.m deleted file mode 100644 index e11c2dde..00000000 --- a/xts5/tset/Xproto/FreeCursor/XFreeCursor.m +++ /dev/null @@ -1,241 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XFreeCursor/XFreeCursor.m,v 1.2 2005-11-03 08:44:07 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XFreeCursor/XFreeCursor.m ->># ->># Description: ->># Tests for FreeCursor ->># ->># Modifications: ->># $Log: frcrsr.m,v $ ->># Revision 1.2 2005-11-03 08:44:07 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:56 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:31 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:09 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:02 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:33 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:20 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:04:14 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE FreeCursor Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for FreeCursor request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xResourceReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - (void) Create_Default_Cursor_Pixmap(CLIENT); - (void) Create_Default_Cursor(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_FreeCursor); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default FreeCursor request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent FreeCursor request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong FreeCursor request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/FreeGC/FreeGC.m b/xts5/tset/Xproto/FreeGC/FreeGC.m new file mode 100644 index 00000000..9951b37b --- /dev/null +++ b/xts5/tset/Xproto/FreeGC/FreeGC.m @@ -0,0 +1,240 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/FreeGC/FreeGC.m,v 1.2 2005-11-03 08:44:07 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/FreeGC/FreeGC.m +>># +>># Description: +>># Tests for FreeGC +>># +>># Modifications: +>># $Log: frgc.m,v $ +>># Revision 1.2 2005-11-03 08:44:07 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:57 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:32 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:11 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:03 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:34 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:22 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:04:18 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE FreeGC Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for FreeGC request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xResourceReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + (void) Create_Default_GContext(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_FreeGC); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default FreeGC request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent FreeGC request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong FreeGC request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/FreeGC/XFreeGC.m b/xts5/tset/Xproto/FreeGC/XFreeGC.m deleted file mode 100644 index ecbcea7d..00000000 --- a/xts5/tset/Xproto/FreeGC/XFreeGC.m +++ /dev/null @@ -1,240 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XFreeGC/XFreeGC.m,v 1.2 2005-11-03 08:44:07 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XFreeGC/XFreeGC.m ->># ->># Description: ->># Tests for FreeGC ->># ->># Modifications: ->># $Log: frgc.m,v $ ->># Revision 1.2 2005-11-03 08:44:07 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:57 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:32 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:11 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:03 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:34 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:22 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:04:18 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE FreeGC Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for FreeGC request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xResourceReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - (void) Create_Default_GContext(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_FreeGC); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default FreeGC request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent FreeGC request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong FreeGC request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/FreePixmap/FreePixmap.m b/xts5/tset/Xproto/FreePixmap/FreePixmap.m new file mode 100644 index 00000000..a1f32790 --- /dev/null +++ b/xts5/tset/Xproto/FreePixmap/FreePixmap.m @@ -0,0 +1,241 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/FreePixmap/FreePixmap.m,v 1.2 2005-11-03 08:44:07 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/FreePixmap/FreePixmap.m +>># +>># Description: +>># Tests for FreePixmap +>># +>># Modifications: +>># $Log: frpxmp.m,v $ +>># Revision 1.2 2005-11-03 08:44:07 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:57 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:33 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:12 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:03 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:35 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:24 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:04:20 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE FreePixmap Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for FreePixmap request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +Pixmap Default_Pixmap; +xResourceReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + Default_Pixmap = Create_Default_Pixmap(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_FreePixmap); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default FreePixmap request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent FreePixmap request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong FreePixmap request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/FreePixmap/XFreePixmap.m b/xts5/tset/Xproto/FreePixmap/XFreePixmap.m deleted file mode 100644 index 97c1adc9..00000000 --- a/xts5/tset/Xproto/FreePixmap/XFreePixmap.m +++ /dev/null @@ -1,241 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XFreePixmap/XFreePixmap.m,v 1.2 2005-11-03 08:44:07 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XFreePixmap/XFreePixmap.m ->># ->># Description: ->># Tests for FreePixmap ->># ->># Modifications: ->># $Log: frpxmp.m,v $ ->># Revision 1.2 2005-11-03 08:44:07 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:57 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:33 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:12 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:03 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:35 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:24 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:04:20 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE FreePixmap Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for FreePixmap request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -Pixmap Default_Pixmap; -xResourceReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - Default_Pixmap = Create_Default_Pixmap(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_FreePixmap); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default FreePixmap request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent FreePixmap request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong FreePixmap request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/GetAtomName/GetAtomName.m b/xts5/tset/Xproto/GetAtomName/GetAtomName.m new file mode 100644 index 00000000..cca6a3ee --- /dev/null +++ b/xts5/tset/Xproto/GetAtomName/GetAtomName.m @@ -0,0 +1,247 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/GetAtomName/GetAtomName.m,v 1.2 2005-11-03 08:44:08 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/GetAtomName/GetAtomName.m +>># +>># Description: +>># Tests for GetAtomName +>># +>># Modifications: +>># $Log: gtatmnm.m,v $ +>># Revision 1.2 2005-11-03 08:44:08 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:59 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:36 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:18 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:06 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:37 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:32 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:04:32 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE GetAtomName Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for GetAtomName request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xResourceReq *req; +xGetAtomNameReply *rep; + +static +void +tester() +{ + Create_Client(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_GetAtomName); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default GetAtomName request\n", CLIENT); + if ((rep = (xGetAtomNameReply *) Expect_Reply(CLIENT, X_GetAtomName)) == NULL) { + Log_Err("client %d failed to receive GetAtomName reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received GetAtomName reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(rep); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent GetAtomName request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong GetAtomName request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/GetAtomName/XGetAtomName.m b/xts5/tset/Xproto/GetAtomName/XGetAtomName.m deleted file mode 100644 index 24632b85..00000000 --- a/xts5/tset/Xproto/GetAtomName/XGetAtomName.m +++ /dev/null @@ -1,247 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XGetAtomName/XGetAtomName.m,v 1.2 2005-11-03 08:44:08 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XGetAtomName/XGetAtomName.m ->># ->># Description: ->># Tests for GetAtomName ->># ->># Modifications: ->># $Log: gtatmnm.m,v $ ->># Revision 1.2 2005-11-03 08:44:08 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:59 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:36 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:18 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:06 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:37 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:32 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:04:32 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE GetAtomName Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for GetAtomName request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xResourceReq *req; -xGetAtomNameReply *rep; - -static -void -tester() -{ - Create_Client(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_GetAtomName); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default GetAtomName request\n", CLIENT); - if ((rep = (xGetAtomNameReply *) Expect_Reply(CLIENT, X_GetAtomName)) == NULL) { - Log_Err("client %d failed to receive GetAtomName reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received GetAtomName reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(rep); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent GetAtomName request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong GetAtomName request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/GetFontPath/GetFontPath.m b/xts5/tset/Xproto/GetFontPath/GetFontPath.m new file mode 100644 index 00000000..3b9d7aca --- /dev/null +++ b/xts5/tset/Xproto/GetFontPath/GetFontPath.m @@ -0,0 +1,247 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/GetFontPath/GetFontPath.m,v 1.2 2005-11-03 08:44:08 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/GetFontPath/GetFontPath.m +>># +>># Description: +>># Tests for GetFontPath +>># +>># Modifications: +>># $Log: gtfntpth.m,v $ +>># Revision 1.2 2005-11-03 08:44:08 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:59 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:36 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:19 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:06 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:38 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:33 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:04:34 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE GetFontPath Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for GetFontPath request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xReq *req; +xGetFontPathReply *rep; + +static +void +tester() +{ + Create_Client(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xReq *) Make_Req(CLIENT, X_GetFontPath); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default GetFontPath request\n", CLIENT); + if ((rep = (xGetFontPathReply *) Expect_Reply(CLIENT, X_GetFontPath)) == NULL) { + Log_Err("client %d failed to receive GetFontPath reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received GetFontPath reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(rep); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent GetFontPath request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong GetFontPath request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/GetFontPath/XGetFontPath.m b/xts5/tset/Xproto/GetFontPath/XGetFontPath.m deleted file mode 100644 index d17c2072..00000000 --- a/xts5/tset/Xproto/GetFontPath/XGetFontPath.m +++ /dev/null @@ -1,247 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XGetFontPath/XGetFontPath.m,v 1.2 2005-11-03 08:44:08 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XGetFontPath/XGetFontPath.m ->># ->># Description: ->># Tests for GetFontPath ->># ->># Modifications: ->># $Log: gtfntpth.m,v $ ->># Revision 1.2 2005-11-03 08:44:08 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:59 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:36 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:19 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:06 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:38 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:33 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:04:34 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE GetFontPath Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for GetFontPath request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xReq *req; -xGetFontPathReply *rep; - -static -void -tester() -{ - Create_Client(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xReq *) Make_Req(CLIENT, X_GetFontPath); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default GetFontPath request\n", CLIENT); - if ((rep = (xGetFontPathReply *) Expect_Reply(CLIENT, X_GetFontPath)) == NULL) { - Log_Err("client %d failed to receive GetFontPath reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received GetFontPath reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(rep); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent GetFontPath request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong GetFontPath request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/GetGeometry/GetGeometry.m b/xts5/tset/Xproto/GetGeometry/GetGeometry.m new file mode 100644 index 00000000..3f089943 --- /dev/null +++ b/xts5/tset/Xproto/GetGeometry/GetGeometry.m @@ -0,0 +1,249 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/GetGeometry/GetGeometry.m,v 1.2 2005-11-03 08:44:08 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/GetGeometry/GetGeometry.m +>># +>># Description: +>># Tests for GetGeometry +>># +>># Modifications: +>># $Log: gtgmtry.m,v $ +>># Revision 1.2 2005-11-03 08:44:08 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:59 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:37 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:19 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:07 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:38 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:34 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:04:36 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE GetGeometry Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for GetGeometry request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xResourceReq *req; +xGetGeometryReply *rep; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_GetGeometry); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default GetGeometry request\n", CLIENT); + if ((rep = (xGetGeometryReply *) Expect_Reply(CLIENT, X_GetGeometry)) == NULL) { + Log_Err("client %d failed to receive GetGeometry reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received GetGeometry reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(rep); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent GetGeometry request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong GetGeometry request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/GetGeometry/XGetGeometry.m b/xts5/tset/Xproto/GetGeometry/XGetGeometry.m deleted file mode 100644 index b7384c1c..00000000 --- a/xts5/tset/Xproto/GetGeometry/XGetGeometry.m +++ /dev/null @@ -1,249 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XGetGeometry/XGetGeometry.m,v 1.2 2005-11-03 08:44:08 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XGetGeometry/XGetGeometry.m ->># ->># Description: ->># Tests for GetGeometry ->># ->># Modifications: ->># $Log: gtgmtry.m,v $ ->># Revision 1.2 2005-11-03 08:44:08 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:59 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:37 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:19 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:07 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:38 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:34 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:04:36 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE GetGeometry Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for GetGeometry request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xResourceReq *req; -xGetGeometryReply *rep; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_GetGeometry); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default GetGeometry request\n", CLIENT); - if ((rep = (xGetGeometryReply *) Expect_Reply(CLIENT, X_GetGeometry)) == NULL) { - Log_Err("client %d failed to receive GetGeometry reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received GetGeometry reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(rep); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent GetGeometry request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong GetGeometry request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/GetImage/GetImage.m b/xts5/tset/Xproto/GetImage/GetImage.m new file mode 100644 index 00000000..7850c15a --- /dev/null +++ b/xts5/tset/Xproto/GetImage/GetImage.m @@ -0,0 +1,257 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/GetImage/GetImage.m,v 1.2 2005-11-03 08:44:08 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/GetImage/GetImage.m +>># +>># Description: +>># Tests for GetImage +>># +>># Modifications: +>># $Log: gtimg.m,v $ +>># Revision 1.2 2005-11-03 08:44:08 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:59 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:37 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:20 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:07 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:39 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:35 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:04:38 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE GetImage Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for GetImage request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +Window win; +xPolyRectangleReq *prr; +xGetImageReq *req; +xGetImageReply *rep; + +static +void +tester() +{ + unsigned char *from; + unsigned char *to; + unsigned int len; + + Create_Client(CLIENT); + + win = Create_Default_Window(CLIENT); + (void) Create_Default_GContext(CLIENT); + Map_Window(CLIENT, win); + + prr = (xPolyRectangleReq *) Make_Req(CLIENT, X_PolyRectangle); + Send_Req(CLIENT, (xReq *) prr); + Log_Trace("client %d sent pixmap PolyRectangle request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + Free_Req(req); + + Set_Test_Type(CLIENT, test_type); + req = (xGetImageReq *) Make_Req(CLIENT, X_GetImage); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default GetImage request\n", CLIENT); + rep = (xGetImageReply *) Expect_Reply(CLIENT, X_GetImage); + (void) Expect_Nothing(CLIENT); + Free_Reply(rep); + break; + case BAD_LENGTH: + Log_Trace("client %d sent GetImage request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong GetImage request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/GetImage/XGetImage.m b/xts5/tset/Xproto/GetImage/XGetImage.m deleted file mode 100644 index 11ffd58c..00000000 --- a/xts5/tset/Xproto/GetImage/XGetImage.m +++ /dev/null @@ -1,257 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XGetImage/XGetImage.m,v 1.2 2005-11-03 08:44:08 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XGetImage/XGetImage.m ->># ->># Description: ->># Tests for GetImage ->># ->># Modifications: ->># $Log: gtimg.m,v $ ->># Revision 1.2 2005-11-03 08:44:08 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:59 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:37 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:20 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:07 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:39 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:35 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:04:38 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE GetImage Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for GetImage request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -Window win; -xPolyRectangleReq *prr; -xGetImageReq *req; -xGetImageReply *rep; - -static -void -tester() -{ - unsigned char *from; - unsigned char *to; - unsigned int len; - - Create_Client(CLIENT); - - win = Create_Default_Window(CLIENT); - (void) Create_Default_GContext(CLIENT); - Map_Window(CLIENT, win); - - prr = (xPolyRectangleReq *) Make_Req(CLIENT, X_PolyRectangle); - Send_Req(CLIENT, (xReq *) prr); - Log_Trace("client %d sent pixmap PolyRectangle request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - Free_Req(req); - - Set_Test_Type(CLIENT, test_type); - req = (xGetImageReq *) Make_Req(CLIENT, X_GetImage); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default GetImage request\n", CLIENT); - rep = (xGetImageReply *) Expect_Reply(CLIENT, X_GetImage); - (void) Expect_Nothing(CLIENT); - Free_Reply(rep); - break; - case BAD_LENGTH: - Log_Trace("client %d sent GetImage request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong GetImage request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/GetInputFocus/GetInputFocus.m b/xts5/tset/Xproto/GetInputFocus/GetInputFocus.m new file mode 100644 index 00000000..aeee7839 --- /dev/null +++ b/xts5/tset/Xproto/GetInputFocus/GetInputFocus.m @@ -0,0 +1,247 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/GetInputFocus/GetInputFocus.m,v 1.2 2005-11-03 08:44:09 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/GetInputFocus/GetInputFocus.m +>># +>># Description: +>># Tests for GetInputFocus +>># +>># Modifications: +>># $Log: gtinptfcs.m,v $ +>># Revision 1.2 2005-11-03 08:44:09 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:59 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:38 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:21 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:07 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:39 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:37 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:04:41 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE GetInputFocus Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for GetInputFocus request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xReq *req; +xGetInputFocusReply *rep; + +static +void +tester() +{ + Create_Client(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xReq *) Make_Req(CLIENT, X_GetInputFocus); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default GetInputFocus request\n", CLIENT); + if ((rep = (xGetInputFocusReply *) Expect_Reply(CLIENT, X_GetInputFocus)) == NULL) { + Log_Err("client %d failed to receive GetInputFocus reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received GetInputFocus reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(rep); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent GetInputFocus request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong GetInputFocus request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/GetInputFocus/XGetInputFocus.m b/xts5/tset/Xproto/GetInputFocus/XGetInputFocus.m deleted file mode 100644 index a6cdd699..00000000 --- a/xts5/tset/Xproto/GetInputFocus/XGetInputFocus.m +++ /dev/null @@ -1,247 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XGetInputFocus/XGetInputFocus.m,v 1.2 2005-11-03 08:44:09 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XGetInputFocus/XGetInputFocus.m ->># ->># Description: ->># Tests for GetInputFocus ->># ->># Modifications: ->># $Log: gtinptfcs.m,v $ ->># Revision 1.2 2005-11-03 08:44:09 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:59 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:38 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:21 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:07 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:39 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:37 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:04:41 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE GetInputFocus Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for GetInputFocus request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xReq *req; -xGetInputFocusReply *rep; - -static -void -tester() -{ - Create_Client(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xReq *) Make_Req(CLIENT, X_GetInputFocus); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default GetInputFocus request\n", CLIENT); - if ((rep = (xGetInputFocusReply *) Expect_Reply(CLIENT, X_GetInputFocus)) == NULL) { - Log_Err("client %d failed to receive GetInputFocus reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received GetInputFocus reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(rep); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent GetInputFocus request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong GetInputFocus request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/GetKeyboardControl/GetKeyboardControl.m b/xts5/tset/Xproto/GetKeyboardControl/GetKeyboardControl.m new file mode 100644 index 00000000..38790165 --- /dev/null +++ b/xts5/tset/Xproto/GetKeyboardControl/GetKeyboardControl.m @@ -0,0 +1,247 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/GetKeyboardControl/GetKeyboardControl.m,v 1.2 2005-11-03 08:44:09 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/GetKeyboardControl/GetKeyboardControl.m +>># +>># Description: +>># Tests for GetKeyboardControl +>># +>># Modifications: +>># $Log: gtkybrdcnt.m,v $ +>># Revision 1.2 2005-11-03 08:44:09 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:59 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:38 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:22 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:08 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:40 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:38 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:04:43 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE GetKeyboardControl Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for GetKeyboardControl request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xReq *req; +xGetKeyboardControlReply *rep; + +static +void +tester() +{ + Create_Client(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xReq *) Make_Req(CLIENT, X_GetKeyboardControl); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default GetKeyboardControl request\n", CLIENT); + if ((rep = (xGetKeyboardControlReply *) Expect_Reply(CLIENT, X_GetKeyboardControl)) == NULL) { + Log_Err("client %d failed to receive GetKeyboardControl reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received GetKeyboardControl reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(rep); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent GetKeyboardControl request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong GetKeyboardControl request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/GetKeyboardControl/XGetKeyboardControl.m b/xts5/tset/Xproto/GetKeyboardControl/XGetKeyboardControl.m deleted file mode 100644 index 83810676..00000000 --- a/xts5/tset/Xproto/GetKeyboardControl/XGetKeyboardControl.m +++ /dev/null @@ -1,247 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XGetKeyboardControl/XGetKeyboardControl.m,v 1.2 2005-11-03 08:44:09 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XGetKeyboardControl/XGetKeyboardControl.m ->># ->># Description: ->># Tests for GetKeyboardControl ->># ->># Modifications: ->># $Log: gtkybrdcnt.m,v $ ->># Revision 1.2 2005-11-03 08:44:09 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:59 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:38 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:22 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:08 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:40 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:38 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:04:43 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE GetKeyboardControl Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for GetKeyboardControl request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xReq *req; -xGetKeyboardControlReply *rep; - -static -void -tester() -{ - Create_Client(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xReq *) Make_Req(CLIENT, X_GetKeyboardControl); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default GetKeyboardControl request\n", CLIENT); - if ((rep = (xGetKeyboardControlReply *) Expect_Reply(CLIENT, X_GetKeyboardControl)) == NULL) { - Log_Err("client %d failed to receive GetKeyboardControl reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received GetKeyboardControl reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(rep); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent GetKeyboardControl request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong GetKeyboardControl request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/GetKeyboardMapping/GetKeyboardMapping.m b/xts5/tset/Xproto/GetKeyboardMapping/GetKeyboardMapping.m new file mode 100644 index 00000000..d4f5273c --- /dev/null +++ b/xts5/tset/Xproto/GetKeyboardMapping/GetKeyboardMapping.m @@ -0,0 +1,247 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/GetKeyboardMapping/GetKeyboardMapping.m,v 1.2 2005-11-03 08:44:09 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/GetKeyboardMapping/GetKeyboardMapping.m +>># +>># Description: +>># Tests for GetKeyboardMapping +>># +>># Modifications: +>># $Log: gtkybrdmpp.m,v $ +>># Revision 1.2 2005-11-03 08:44:09 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:59 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:39 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:23 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:08 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:40 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:39 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:04:45 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE GetKeyboardMapping Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for GetKeyboardMapping request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xGetKeyboardMappingReq *req; +xGetKeyboardMappingReply *rep; + +static +void +tester() +{ + Create_Client(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xGetKeyboardMappingReq *) Make_Req(CLIENT, X_GetKeyboardMapping); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default GetKeyboardMapping request\n", CLIENT); + if ((rep = (xGetKeyboardMappingReply *) Expect_Reply(CLIENT, X_GetKeyboardMapping)) == NULL) { + Log_Err("client %d failed to receive GetKeyboardMapping reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received GetKeyboardMapping reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(rep); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent GetKeyboardMapping request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong GetKeyboardMapping request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/GetKeyboardMapping/XGetKeyboardMapping.m b/xts5/tset/Xproto/GetKeyboardMapping/XGetKeyboardMapping.m deleted file mode 100644 index 910da08f..00000000 --- a/xts5/tset/Xproto/GetKeyboardMapping/XGetKeyboardMapping.m +++ /dev/null @@ -1,247 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XGetKeyboardMapping/XGetKeyboardMapping.m,v 1.2 2005-11-03 08:44:09 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XGetKeyboardMapping/XGetKeyboardMapping.m ->># ->># Description: ->># Tests for GetKeyboardMapping ->># ->># Modifications: ->># $Log: gtkybrdmpp.m,v $ ->># Revision 1.2 2005-11-03 08:44:09 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:59 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:39 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:23 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:08 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:40 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:39 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:04:45 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE GetKeyboardMapping Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for GetKeyboardMapping request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xGetKeyboardMappingReq *req; -xGetKeyboardMappingReply *rep; - -static -void -tester() -{ - Create_Client(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xGetKeyboardMappingReq *) Make_Req(CLIENT, X_GetKeyboardMapping); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default GetKeyboardMapping request\n", CLIENT); - if ((rep = (xGetKeyboardMappingReply *) Expect_Reply(CLIENT, X_GetKeyboardMapping)) == NULL) { - Log_Err("client %d failed to receive GetKeyboardMapping reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received GetKeyboardMapping reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(rep); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent GetKeyboardMapping request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong GetKeyboardMapping request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/GetModifierMapping/GetModifierMapping.m b/xts5/tset/Xproto/GetModifierMapping/GetModifierMapping.m new file mode 100644 index 00000000..d13d341d --- /dev/null +++ b/xts5/tset/Xproto/GetModifierMapping/GetModifierMapping.m @@ -0,0 +1,247 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/GetModifierMapping/GetModifierMapping.m,v 1.2 2005-11-03 08:44:09 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/GetModifierMapping/GetModifierMapping.m +>># +>># Description: +>># Tests for GetModifierMapping +>># +>># Modifications: +>># $Log: gtmdfrmppn.m,v $ +>># Revision 1.2 2005-11-03 08:44:09 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:59 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:39 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:24 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:09 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:41 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:41 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:04:47 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE GetModifierMapping Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for GetModifierMapping request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xReq *req; +xGetModifierMappingReply *rep; + +static +void +tester() +{ + Create_Client(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xReq *) Make_Req(CLIENT, X_GetModifierMapping); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default GetModifierMapping request\n", CLIENT); + if ((rep = (xGetModifierMappingReply *) Expect_Reply(CLIENT, X_GetModifierMapping)) == NULL) { + Log_Err("client %d failed to receive GetModifierMapping reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received GetModifierMapping reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(rep); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent GetModifierMapping request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong GetModifierMapping request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/GetModifierMapping/XGetModifierMapping.m b/xts5/tset/Xproto/GetModifierMapping/XGetModifierMapping.m deleted file mode 100644 index 51482691..00000000 --- a/xts5/tset/Xproto/GetModifierMapping/XGetModifierMapping.m +++ /dev/null @@ -1,247 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XGetModifierMapping/XGetModifierMapping.m,v 1.2 2005-11-03 08:44:09 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XGetModifierMapping/XGetModifierMapping.m ->># ->># Description: ->># Tests for GetModifierMapping ->># ->># Modifications: ->># $Log: gtmdfrmppn.m,v $ ->># Revision 1.2 2005-11-03 08:44:09 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:59 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:39 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:24 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:09 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:41 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:41 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:04:47 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE GetModifierMapping Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for GetModifierMapping request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xReq *req; -xGetModifierMappingReply *rep; - -static -void -tester() -{ - Create_Client(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xReq *) Make_Req(CLIENT, X_GetModifierMapping); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default GetModifierMapping request\n", CLIENT); - if ((rep = (xGetModifierMappingReply *) Expect_Reply(CLIENT, X_GetModifierMapping)) == NULL) { - Log_Err("client %d failed to receive GetModifierMapping reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received GetModifierMapping reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(rep); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent GetModifierMapping request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong GetModifierMapping request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/GetMotionEvents/GetMotionEvents.m b/xts5/tset/Xproto/GetMotionEvents/GetMotionEvents.m new file mode 100644 index 00000000..247ace88 --- /dev/null +++ b/xts5/tset/Xproto/GetMotionEvents/GetMotionEvents.m @@ -0,0 +1,249 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/GetMotionEvents/GetMotionEvents.m,v 1.2 2005-11-03 08:44:09 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/GetMotionEvents/GetMotionEvents.m +>># +>># Description: +>># Tests for GetMotionEvents +>># +>># Modifications: +>># $Log: gtmtnevnts.m,v $ +>># Revision 1.2 2005-11-03 08:44:09 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:59 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:40 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:26 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:09 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:41 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:42 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:04:49 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE GetMotionEvents Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for GetMotionEvents request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xGetMotionEventsReq *req; +xGetMotionEventsReply *rep; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xGetMotionEventsReq *) Make_Req(CLIENT, X_GetMotionEvents); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default GetMotionEvents request\n", CLIENT); + if ((rep = (xGetMotionEventsReply *) Expect_Reply(CLIENT, X_GetMotionEvents)) == NULL) { + Log_Err("client %d failed to receive GetMotionEvents reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received GetMotionEvents reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(rep); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent GetMotionEvents request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong GetMotionEvents request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/GetMotionEvents/XGetMotionEvents.m b/xts5/tset/Xproto/GetMotionEvents/XGetMotionEvents.m deleted file mode 100644 index 9bc01e3f..00000000 --- a/xts5/tset/Xproto/GetMotionEvents/XGetMotionEvents.m +++ /dev/null @@ -1,249 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XGetMotionEvents/XGetMotionEvents.m,v 1.2 2005-11-03 08:44:09 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XGetMotionEvents/XGetMotionEvents.m ->># ->># Description: ->># Tests for GetMotionEvents ->># ->># Modifications: ->># $Log: gtmtnevnts.m,v $ ->># Revision 1.2 2005-11-03 08:44:09 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:59 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:40 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:26 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:09 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:41 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:42 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:04:49 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE GetMotionEvents Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for GetMotionEvents request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xGetMotionEventsReq *req; -xGetMotionEventsReply *rep; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xGetMotionEventsReq *) Make_Req(CLIENT, X_GetMotionEvents); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default GetMotionEvents request\n", CLIENT); - if ((rep = (xGetMotionEventsReply *) Expect_Reply(CLIENT, X_GetMotionEvents)) == NULL) { - Log_Err("client %d failed to receive GetMotionEvents reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received GetMotionEvents reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(rep); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent GetMotionEvents request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong GetMotionEvents request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/GetPointerControl/GetPointerControl.m b/xts5/tset/Xproto/GetPointerControl/GetPointerControl.m new file mode 100644 index 00000000..95257fca --- /dev/null +++ b/xts5/tset/Xproto/GetPointerControl/GetPointerControl.m @@ -0,0 +1,247 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/GetPointerControl/GetPointerControl.m,v 1.2 2005-11-03 08:44:09 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/GetPointerControl/GetPointerControl.m +>># +>># Description: +>># Tests for GetPointerControl +>># +>># Modifications: +>># $Log: gtpntrcntr.m,v $ +>># Revision 1.2 2005-11-03 08:44:09 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:59 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:41 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:27 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:10 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:41 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:43 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:04:51 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE GetPointerControl Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for GetPointerControl request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xReq *req; +xGetPointerControlReply *rep; + +static +void +tester() +{ + Create_Client(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xReq *) Make_Req(CLIENT, X_GetPointerControl); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default GetPointerControl request\n", CLIENT); + if ((rep = (xGetPointerControlReply *) Expect_Reply(CLIENT, X_GetPointerControl)) == NULL) { + Log_Err("client %d failed to receive GetPointerControl reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received GetPointerControl reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(rep); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent GetPointerControl request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong GetPointerControl request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/GetPointerControl/XGetPointerControl.m b/xts5/tset/Xproto/GetPointerControl/XGetPointerControl.m deleted file mode 100644 index 0debcc48..00000000 --- a/xts5/tset/Xproto/GetPointerControl/XGetPointerControl.m +++ /dev/null @@ -1,247 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XGetPointerControl/XGetPointerControl.m,v 1.2 2005-11-03 08:44:09 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XGetPointerControl/XGetPointerControl.m ->># ->># Description: ->># Tests for GetPointerControl ->># ->># Modifications: ->># $Log: gtpntrcntr.m,v $ ->># Revision 1.2 2005-11-03 08:44:09 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:59 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:41 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:27 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:10 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:41 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:43 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:04:51 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE GetPointerControl Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for GetPointerControl request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xReq *req; -xGetPointerControlReply *rep; - -static -void -tester() -{ - Create_Client(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xReq *) Make_Req(CLIENT, X_GetPointerControl); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default GetPointerControl request\n", CLIENT); - if ((rep = (xGetPointerControlReply *) Expect_Reply(CLIENT, X_GetPointerControl)) == NULL) { - Log_Err("client %d failed to receive GetPointerControl reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received GetPointerControl reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(rep); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent GetPointerControl request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong GetPointerControl request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/GetPointerMapping/GetPointerMapping.m b/xts5/tset/Xproto/GetPointerMapping/GetPointerMapping.m new file mode 100644 index 00000000..b76e4ca3 --- /dev/null +++ b/xts5/tset/Xproto/GetPointerMapping/GetPointerMapping.m @@ -0,0 +1,247 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/GetPointerMapping/GetPointerMapping.m,v 1.2 2005-11-03 08:44:09 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/GetPointerMapping/GetPointerMapping.m +>># +>># Description: +>># Tests for GetPointerMapping +>># +>># Modifications: +>># $Log: gtpntrmppn.m,v $ +>># Revision 1.2 2005-11-03 08:44:09 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:59 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:41 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:28 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:10 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:42 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:45 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:04:54 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE GetPointerMapping Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for GetPointerMapping request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xReq *req; +xGetPointerMappingReply *rep; + +static +void +tester() +{ + Create_Client(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xReq *) Make_Req(CLIENT, X_GetPointerMapping); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default GetPointerMapping request\n", CLIENT); + if ((rep = (xGetPointerMappingReply *) Expect_Reply(CLIENT, X_GetPointerMapping)) == NULL) { + Log_Err("client %d failed to receive GetPointerMapping reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received GetPointerMapping reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(rep); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent GetPointerMapping request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong GetPointerMapping request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/GetPointerMapping/XGetPointerMapping.m b/xts5/tset/Xproto/GetPointerMapping/XGetPointerMapping.m deleted file mode 100644 index e1afaace..00000000 --- a/xts5/tset/Xproto/GetPointerMapping/XGetPointerMapping.m +++ /dev/null @@ -1,247 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XGetPointerMapping/XGetPointerMapping.m,v 1.2 2005-11-03 08:44:09 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XGetPointerMapping/XGetPointerMapping.m ->># ->># Description: ->># Tests for GetPointerMapping ->># ->># Modifications: ->># $Log: gtpntrmppn.m,v $ ->># Revision 1.2 2005-11-03 08:44:09 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:59 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:41 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:28 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:10 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:42 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:45 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:04:54 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE GetPointerMapping Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for GetPointerMapping request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xReq *req; -xGetPointerMappingReply *rep; - -static -void -tester() -{ - Create_Client(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xReq *) Make_Req(CLIENT, X_GetPointerMapping); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default GetPointerMapping request\n", CLIENT); - if ((rep = (xGetPointerMappingReply *) Expect_Reply(CLIENT, X_GetPointerMapping)) == NULL) { - Log_Err("client %d failed to receive GetPointerMapping reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received GetPointerMapping reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(rep); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent GetPointerMapping request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong GetPointerMapping request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/GetScreenSaver/GetScreenSaver.m b/xts5/tset/Xproto/GetScreenSaver/GetScreenSaver.m new file mode 100644 index 00000000..aa8fef79 --- /dev/null +++ b/xts5/tset/Xproto/GetScreenSaver/GetScreenSaver.m @@ -0,0 +1,247 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/GetScreenSaver/GetScreenSaver.m,v 1.2 2005-11-03 08:44:10 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/GetScreenSaver/GetScreenSaver.m +>># +>># Description: +>># Tests for GetScreenSaver +>># +>># Modifications: +>># $Log: gtscrnsvr.m,v $ +>># Revision 1.2 2005-11-03 08:44:10 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:59 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:42 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:30 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:11 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:43 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:47 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:04:58 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE GetScreenSaver Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for GetScreenSaver request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xReq *req; +xGetScreenSaverReply *rep; + +static +void +tester() +{ + Create_Client(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xReq *) Make_Req(CLIENT, X_GetScreenSaver); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default GetScreenSaver request\n", CLIENT); + if ((rep = (xGetScreenSaverReply *) Expect_Reply(CLIENT, X_GetScreenSaver)) == NULL) { + Log_Err("client %d failed to receive GetScreenSaver reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received GetScreenSaver reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(rep); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent GetScreenSaver request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong GetScreenSaver request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/GetScreenSaver/XGetScreenSaver.m b/xts5/tset/Xproto/GetScreenSaver/XGetScreenSaver.m deleted file mode 100644 index 8402aee4..00000000 --- a/xts5/tset/Xproto/GetScreenSaver/XGetScreenSaver.m +++ /dev/null @@ -1,247 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XGetScreenSaver/XGetScreenSaver.m,v 1.2 2005-11-03 08:44:10 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XGetScreenSaver/XGetScreenSaver.m ->># ->># Description: ->># Tests for GetScreenSaver ->># ->># Modifications: ->># $Log: gtscrnsvr.m,v $ ->># Revision 1.2 2005-11-03 08:44:10 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:59 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:42 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:30 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:11 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:43 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:47 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:04:58 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE GetScreenSaver Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for GetScreenSaver request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xReq *req; -xGetScreenSaverReply *rep; - -static -void -tester() -{ - Create_Client(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xReq *) Make_Req(CLIENT, X_GetScreenSaver); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default GetScreenSaver request\n", CLIENT); - if ((rep = (xGetScreenSaverReply *) Expect_Reply(CLIENT, X_GetScreenSaver)) == NULL) { - Log_Err("client %d failed to receive GetScreenSaver reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received GetScreenSaver reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(rep); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent GetScreenSaver request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong GetScreenSaver request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/GetSelectionOwner/GetSelectionOwner.m b/xts5/tset/Xproto/GetSelectionOwner/GetSelectionOwner.m new file mode 100644 index 00000000..736395a0 --- /dev/null +++ b/xts5/tset/Xproto/GetSelectionOwner/GetSelectionOwner.m @@ -0,0 +1,257 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/GetSelectionOwner/GetSelectionOwner.m,v 1.2 2005-11-03 08:44:10 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/GetSelectionOwner/GetSelectionOwner.m +>># +>># Description: +>># Tests for GetSelectionOwner +>># +>># Modifications: +>># $Log: gtslctnown.m,v $ +>># Revision 1.2 2005-11-03 08:44:10 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:59 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:43 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:31 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:12 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:44 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:49 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:05:00 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE GetSelectionOwner Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for GetSelectionOwner request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +Atom Test_Property; +xResourceReq *req; +xSetSelectionOwnerReq *ssor; +xGetSelectionOwnerReply *rep; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + Test_Property = Create_Default_Atom(CLIENT); + + ssor = (xSetSelectionOwnerReq *) Make_Req(CLIENT, X_SetSelectionOwner); + Send_Req(CLIENT, (xReq *) ssor); + Log_Trace("client %d sent default SetSelectionOwner request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + Free_Req(ssor); + + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_GetSelectionOwner); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default GetSelectionOwner request\n", CLIENT); + if ((rep = (xGetSelectionOwnerReply *) Expect_Reply(CLIENT, X_GetSelectionOwner)) == NULL) { + Log_Err("client %d failed to receive GetSelectionOwner reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received GetSelectionOwner reply\n", CLIENT); + Free_Reply(rep); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent GetSelectionOwner request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong GetSelectionOwner request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/GetSelectionOwner/XGetSelectionOwner.m b/xts5/tset/Xproto/GetSelectionOwner/XGetSelectionOwner.m deleted file mode 100644 index 38def9e1..00000000 --- a/xts5/tset/Xproto/GetSelectionOwner/XGetSelectionOwner.m +++ /dev/null @@ -1,257 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XGetSelectionOwner/XGetSelectionOwner.m,v 1.2 2005-11-03 08:44:10 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XGetSelectionOwner/XGetSelectionOwner.m ->># ->># Description: ->># Tests for GetSelectionOwner ->># ->># Modifications: ->># $Log: gtslctnown.m,v $ ->># Revision 1.2 2005-11-03 08:44:10 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:59 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:43 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:31 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:12 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:44 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:49 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:05:00 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE GetSelectionOwner Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for GetSelectionOwner request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -Atom Test_Property; -xResourceReq *req; -xSetSelectionOwnerReq *ssor; -xGetSelectionOwnerReply *rep; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - Test_Property = Create_Default_Atom(CLIENT); - - ssor = (xSetSelectionOwnerReq *) Make_Req(CLIENT, X_SetSelectionOwner); - Send_Req(CLIENT, (xReq *) ssor); - Log_Trace("client %d sent default SetSelectionOwner request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - Free_Req(ssor); - - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_GetSelectionOwner); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default GetSelectionOwner request\n", CLIENT); - if ((rep = (xGetSelectionOwnerReply *) Expect_Reply(CLIENT, X_GetSelectionOwner)) == NULL) { - Log_Err("client %d failed to receive GetSelectionOwner reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received GetSelectionOwner reply\n", CLIENT); - Free_Reply(rep); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent GetSelectionOwner request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong GetSelectionOwner request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/GetWindowAttributes/GetWindowAttributes.m b/xts5/tset/Xproto/GetWindowAttributes/GetWindowAttributes.m new file mode 100644 index 00000000..cdce04ad --- /dev/null +++ b/xts5/tset/Xproto/GetWindowAttributes/GetWindowAttributes.m @@ -0,0 +1,249 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/GetWindowAttributes/GetWindowAttributes.m,v 1.2 2005-11-03 08:44:10 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/GetWindowAttributes/GetWindowAttributes.m +>># +>># Description: +>># Tests for GetWindowAttributes +>># +>># Modifications: +>># $Log: gtwdwattrb.m,v $ +>># Revision 1.2 2005-11-03 08:44:10 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:59 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:43 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:32 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:12 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:44 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:50 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:05:02 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE GetWindowAttributes Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for GetWindowAttributes request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xResourceReq *req; +xGetWindowAttributesReply *rep; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_GetWindowAttributes); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default GetWindowAttributes request\n", CLIENT); + if ((rep = (xGetWindowAttributesReply *) Expect_Reply(CLIENT, X_GetWindowAttributes)) == NULL) { + Log_Err("client %d failed to receive GetWindowAttributes reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received GetWindowAttributes reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(rep); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent GetWindowAttributes request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong GetWindowAttributes request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/GetWindowAttributes/XGetWindowAttributes.m b/xts5/tset/Xproto/GetWindowAttributes/XGetWindowAttributes.m deleted file mode 100644 index d146de01..00000000 --- a/xts5/tset/Xproto/GetWindowAttributes/XGetWindowAttributes.m +++ /dev/null @@ -1,249 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XGetWindowAttributes/XGetWindowAttributes.m,v 1.2 2005-11-03 08:44:10 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XGetWindowAttributes/XGetWindowAttributes.m ->># ->># Description: ->># Tests for GetWindowAttributes ->># ->># Modifications: ->># $Log: gtwdwattrb.m,v $ ->># Revision 1.2 2005-11-03 08:44:10 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:59 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:43 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:32 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:12 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:44 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:50 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:05:02 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE GetWindowAttributes Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for GetWindowAttributes request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xResourceReq *req; -xGetWindowAttributesReply *rep; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_GetWindowAttributes); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default GetWindowAttributes request\n", CLIENT); - if ((rep = (xGetWindowAttributesReply *) Expect_Reply(CLIENT, X_GetWindowAttributes)) == NULL) { - Log_Err("client %d failed to receive GetWindowAttributes reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received GetWindowAttributes reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(rep); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent GetWindowAttributes request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong GetWindowAttributes request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/GrabButton/GrabButton.m b/xts5/tset/Xproto/GrabButton/GrabButton.m new file mode 100644 index 00000000..42faf913 --- /dev/null +++ b/xts5/tset/Xproto/GrabButton/GrabButton.m @@ -0,0 +1,239 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/GrabButton/GrabButton.m,v 1.2 2005-11-03 08:44:07 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/GrabButton/GrabButton.m +>># +>># Description: +>># Tests for GrabButton +>># +>># Modifications: +>># $Log: grbbttn.m,v $ +>># Revision 1.2 2005-11-03 08:44:07 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:58 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:33 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:13 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:04 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:35 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:25 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:04:22 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE GrabButton Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for GrabButton request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xGrabButtonReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xGrabButtonReq *) Make_Req(CLIENT, X_GrabButton); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default GrabButton request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent GrabButton request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong GrabButton request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/GrabButton/XGrabButton.m b/xts5/tset/Xproto/GrabButton/XGrabButton.m deleted file mode 100644 index 4e930e4a..00000000 --- a/xts5/tset/Xproto/GrabButton/XGrabButton.m +++ /dev/null @@ -1,239 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XGrabButton/XGrabButton.m,v 1.2 2005-11-03 08:44:07 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XGrabButton/XGrabButton.m ->># ->># Description: ->># Tests for GrabButton ->># ->># Modifications: ->># $Log: grbbttn.m,v $ ->># Revision 1.2 2005-11-03 08:44:07 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:58 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:33 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:13 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:04 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:35 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:25 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:04:22 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE GrabButton Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for GrabButton request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xGrabButtonReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xGrabButtonReq *) Make_Req(CLIENT, X_GrabButton); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default GrabButton request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent GrabButton request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong GrabButton request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/GrabKey/GrabKey.m b/xts5/tset/Xproto/GrabKey/GrabKey.m new file mode 100644 index 00000000..282879b5 --- /dev/null +++ b/xts5/tset/Xproto/GrabKey/GrabKey.m @@ -0,0 +1,239 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/GrabKey/GrabKey.m,v 1.2 2005-11-03 08:44:08 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/GrabKey/GrabKey.m +>># +>># Description: +>># Tests for GrabKey +>># +>># Modifications: +>># $Log: grbky.m,v $ +>># Revision 1.2 2005-11-03 08:44:08 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:58 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:34 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:14 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:04 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:35 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:26 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:04:24 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE GrabKey Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for GrabKey request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xGrabKeyReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xGrabKeyReq *) Make_Req(CLIENT, X_GrabKey); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default GrabKey request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent GrabKey request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong GrabKey request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/GrabKey/XGrabKey.m b/xts5/tset/Xproto/GrabKey/XGrabKey.m deleted file mode 100644 index 5a48abd7..00000000 --- a/xts5/tset/Xproto/GrabKey/XGrabKey.m +++ /dev/null @@ -1,239 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XGrabKey/XGrabKey.m,v 1.2 2005-11-03 08:44:08 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XGrabKey/XGrabKey.m ->># ->># Description: ->># Tests for GrabKey ->># ->># Modifications: ->># $Log: grbky.m,v $ ->># Revision 1.2 2005-11-03 08:44:08 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:58 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:34 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:14 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:04 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:35 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:26 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:04:24 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE GrabKey Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for GrabKey request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xGrabKeyReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xGrabKeyReq *) Make_Req(CLIENT, X_GrabKey); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default GrabKey request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent GrabKey request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong GrabKey request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/GrabKeyboard/GrabKeyboard.m b/xts5/tset/Xproto/GrabKeyboard/GrabKeyboard.m new file mode 100644 index 00000000..e702dc04 --- /dev/null +++ b/xts5/tset/Xproto/GrabKeyboard/GrabKeyboard.m @@ -0,0 +1,249 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/GrabKeyboard/GrabKeyboard.m,v 1.2 2005-11-03 08:44:08 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/GrabKeyboard/GrabKeyboard.m +>># +>># Description: +>># Tests for GrabKeyboard +>># +>># Modifications: +>># $Log: grbkybrd.m,v $ +>># Revision 1.2 2005-11-03 08:44:08 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:58 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:34 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:15 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:04 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:36 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:27 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:04:26 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE GrabKeyboard Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for GrabKeyboard request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xGrabKeyboardReq *req; +xGrabKeyboardReply *rep; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xGrabKeyboardReq *) Make_Req(CLIENT, X_GrabKeyboard); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default GrabKeyboard request\n", CLIENT); + if ((rep = (xGrabKeyboardReply *) Expect_Reply(CLIENT, X_GrabKeyboard)) == NULL) { + Log_Err("client %d failed to receive GrabKeyboard reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received GrabKeyboard reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(rep); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent GrabKeyboard request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong GrabKeyboard request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/GrabKeyboard/XGrabKeyboard.m b/xts5/tset/Xproto/GrabKeyboard/XGrabKeyboard.m deleted file mode 100644 index 01bc2c58..00000000 --- a/xts5/tset/Xproto/GrabKeyboard/XGrabKeyboard.m +++ /dev/null @@ -1,249 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XGrabKeyboard/XGrabKeyboard.m,v 1.2 2005-11-03 08:44:08 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XGrabKeyboard/XGrabKeyboard.m ->># ->># Description: ->># Tests for GrabKeyboard ->># ->># Modifications: ->># $Log: grbkybrd.m,v $ ->># Revision 1.2 2005-11-03 08:44:08 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:58 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:34 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:15 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:04 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:36 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:27 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:04:26 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE GrabKeyboard Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for GrabKeyboard request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xGrabKeyboardReq *req; -xGrabKeyboardReply *rep; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xGrabKeyboardReq *) Make_Req(CLIENT, X_GrabKeyboard); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default GrabKeyboard request\n", CLIENT); - if ((rep = (xGrabKeyboardReply *) Expect_Reply(CLIENT, X_GrabKeyboard)) == NULL) { - Log_Err("client %d failed to receive GrabKeyboard reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received GrabKeyboard reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(rep); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent GrabKeyboard request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong GrabKeyboard request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/GrabPointer/GrabPointer.m b/xts5/tset/Xproto/GrabPointer/GrabPointer.m new file mode 100644 index 00000000..f4ba0b68 --- /dev/null +++ b/xts5/tset/Xproto/GrabPointer/GrabPointer.m @@ -0,0 +1,249 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/GrabPointer/GrabPointer.m,v 1.2 2005-11-03 08:44:08 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/GrabPointer/GrabPointer.m +>># +>># Description: +>># Tests for GrabPointer +>># +>># Modifications: +>># $Log: grbpntr.m,v $ +>># Revision 1.2 2005-11-03 08:44:08 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:58 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:35 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:16 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:05 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:36 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:29 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:04:28 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE GrabPointer Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for GrabPointer request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xGrabPointerReq *req; +xGrabPointerReply *rep; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xGrabPointerReq *) Make_Req(CLIENT, X_GrabPointer); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default GrabPointer request\n", CLIENT); + if ((rep = (xGrabPointerReply *) Expect_Reply(CLIENT, X_GrabPointer)) == NULL) { + Log_Err("client %d failed to receive GrabPointer reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received GrabPointer reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(rep); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent GrabPointer request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong GrabPointer request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/GrabPointer/XGrabPointer.m b/xts5/tset/Xproto/GrabPointer/XGrabPointer.m deleted file mode 100644 index d6e20e3f..00000000 --- a/xts5/tset/Xproto/GrabPointer/XGrabPointer.m +++ /dev/null @@ -1,249 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XGrabPointer/XGrabPointer.m,v 1.2 2005-11-03 08:44:08 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XGrabPointer/XGrabPointer.m ->># ->># Description: ->># Tests for GrabPointer ->># ->># Modifications: ->># $Log: grbpntr.m,v $ ->># Revision 1.2 2005-11-03 08:44:08 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:58 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:35 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:16 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:05 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:36 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:29 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:04:28 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE GrabPointer Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for GrabPointer request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xGrabPointerReq *req; -xGrabPointerReply *rep; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xGrabPointerReq *) Make_Req(CLIENT, X_GrabPointer); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default GrabPointer request\n", CLIENT); - if ((rep = (xGrabPointerReply *) Expect_Reply(CLIENT, X_GrabPointer)) == NULL) { - Log_Err("client %d failed to receive GrabPointer reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received GrabPointer reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(rep); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent GrabPointer request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong GrabPointer request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/GrabServer/GrabServer.m b/xts5/tset/Xproto/GrabServer/GrabServer.m new file mode 100644 index 00000000..bdc47341 --- /dev/null +++ b/xts5/tset/Xproto/GrabServer/GrabServer.m @@ -0,0 +1,239 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/GrabServer/GrabServer.m,v 1.2 2005-11-03 08:44:08 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/GrabServer/GrabServer.m +>># +>># Description: +>># Tests for GrabServer +>># +>># Modifications: +>># $Log: grbsrvr.m,v $ +>># Revision 1.2 2005-11-03 08:44:08 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:59 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:35 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:17 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:05 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:37 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:30 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:04:30 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE GrabServer Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for GrabServer request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xReq *) Make_Req(CLIENT, X_GrabServer); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default GrabServer request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent GrabServer request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong GrabServer request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/GrabServer/XGrabServer.m b/xts5/tset/Xproto/GrabServer/XGrabServer.m deleted file mode 100644 index c2d13dbf..00000000 --- a/xts5/tset/Xproto/GrabServer/XGrabServer.m +++ /dev/null @@ -1,239 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XGrabServer/XGrabServer.m,v 1.2 2005-11-03 08:44:08 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XGrabServer/XGrabServer.m ->># ->># Description: ->># Tests for GrabServer ->># ->># Modifications: ->># $Log: grbsrvr.m,v $ ->># Revision 1.2 2005-11-03 08:44:08 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:59 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:35 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:17 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:05 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:37 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:30 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:04:30 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE GrabServer Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for GrabServer request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xReq *) Make_Req(CLIENT, X_GrabServer); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default GrabServer request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent GrabServer request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong GrabServer request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/InstallColormap/InstallColormap.m b/xts5/tset/Xproto/InstallColormap/InstallColormap.m new file mode 100644 index 00000000..49baf7c7 --- /dev/null +++ b/xts5/tset/Xproto/InstallColormap/InstallColormap.m @@ -0,0 +1,275 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/InstallColormap/InstallColormap.m,v 1.2 2005-11-03 08:44:11 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/InstallColormap/InstallColormap.m +>># +>># Description: +>># Tests for InstallColormap +>># +>># Modifications: +>># $Log: instllclrm.m,v $ +>># Revision 1.2 2005-11-03 08:44:11 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:59 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:45 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:35 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:14 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:46 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:54 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:05:09 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE InstallColormap Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for InstallColormap request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xResourceReq *req; +xAllocColorCellsReply *reply; + +/* + intent: send a InstallColormap request to the server and check + that nothing was sent back. + input: + output: none + global input: + side effects: creates a window resource. + installs a color map. + methods: +*/ + +static +void +tester() +{ + + + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + (void) Create_Default_Colormap(CLIENT); + + /* Allocate color cells if client hasn't got any */ + + if (Allocatable (CLIENT)) { + req = (xResourceReq *) Make_Req(CLIENT, X_AllocColorCells); + Send_Req(CLIENT, (xReq *) req); + if ((reply = (xAllocColorCellsReply *) Expect_Reply(CLIENT, X_AllocColorCells)) == NULL) { + Log_Err("client %d failed to receive AllocColorCells reply\n", CLIENT); + Exit(); + } + else { + Log_Trace("client %d received AllocColorCells reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(reply); + } + Free_Req(req); + } + (void) Expect_Nothing(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_InstallColormap); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default InstallColormap request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent InstallColormap request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong InstallColormap request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +and the client has no event selected in the +.M event_mask +for any window, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/InstallColormap/XInstallColormap.m b/xts5/tset/Xproto/InstallColormap/XInstallColormap.m deleted file mode 100644 index da0abb89..00000000 --- a/xts5/tset/Xproto/InstallColormap/XInstallColormap.m +++ /dev/null @@ -1,275 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XInstallColormap/XInstallColormap.m,v 1.2 2005-11-03 08:44:11 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XInstallColormap/XInstallColormap.m ->># ->># Description: ->># Tests for InstallColormap ->># ->># Modifications: ->># $Log: instllclrm.m,v $ ->># Revision 1.2 2005-11-03 08:44:11 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:59 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:45 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:35 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:14 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:46 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:54 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:05:09 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE InstallColormap Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for InstallColormap request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xResourceReq *req; -xAllocColorCellsReply *reply; - -/* - intent: send a InstallColormap request to the server and check - that nothing was sent back. - input: - output: none - global input: - side effects: creates a window resource. - installs a color map. - methods: -*/ - -static -void -tester() -{ - - - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - (void) Create_Default_Colormap(CLIENT); - - /* Allocate color cells if client hasn't got any */ - - if (Allocatable (CLIENT)) { - req = (xResourceReq *) Make_Req(CLIENT, X_AllocColorCells); - Send_Req(CLIENT, (xReq *) req); - if ((reply = (xAllocColorCellsReply *) Expect_Reply(CLIENT, X_AllocColorCells)) == NULL) { - Log_Err("client %d failed to receive AllocColorCells reply\n", CLIENT); - Exit(); - } - else { - Log_Trace("client %d received AllocColorCells reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(reply); - } - Free_Req(req); - } - (void) Expect_Nothing(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_InstallColormap); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default InstallColormap request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent InstallColormap request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong InstallColormap request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -and the client has no event selected in the -.M event_mask -for any window, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/InternAtom/InternAtom.m b/xts5/tset/Xproto/InternAtom/InternAtom.m new file mode 100644 index 00000000..ae166fd8 --- /dev/null +++ b/xts5/tset/Xproto/InternAtom/InternAtom.m @@ -0,0 +1,247 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/InternAtom/InternAtom.m,v 1.2 2005-11-03 08:44:11 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/InternAtom/InternAtom.m +>># +>># Description: +>># Tests for InternAtom +>># +>># Modifications: +>># $Log: intrnatm.m,v $ +>># Revision 1.2 2005-11-03 08:44:11 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:05:59 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:45 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:36 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:14 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:46 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:56 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:05:11 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE InternAtom Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for InternAtom request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xInternAtomReq *req; +xInternAtomReply *rep; + +static +void +tester() +{ + Create_Client(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xInternAtomReq *) Make_Req(CLIENT, X_InternAtom); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default InternAtom request\n", CLIENT); + if ((rep = (xInternAtomReply *) Expect_Reply(CLIENT, X_InternAtom)) == NULL) { + Log_Err("client %d failed to receive InternAtom reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received InternAtom reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(rep); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent InternAtom request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong InternAtom request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/InternAtom/XInternAtom.m b/xts5/tset/Xproto/InternAtom/XInternAtom.m deleted file mode 100644 index 3e259d0b..00000000 --- a/xts5/tset/Xproto/InternAtom/XInternAtom.m +++ /dev/null @@ -1,247 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XInternAtom/XInternAtom.m,v 1.2 2005-11-03 08:44:11 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XInternAtom/XInternAtom.m ->># ->># Description: ->># Tests for InternAtom ->># ->># Modifications: ->># $Log: intrnatm.m,v $ ->># Revision 1.2 2005-11-03 08:44:11 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:05:59 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:45 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:36 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:14 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:46 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:56 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:05:11 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE InternAtom Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for InternAtom request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xInternAtomReq *req; -xInternAtomReply *rep; - -static -void -tester() -{ - Create_Client(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xInternAtomReq *) Make_Req(CLIENT, X_InternAtom); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default InternAtom request\n", CLIENT); - if ((rep = (xInternAtomReply *) Expect_Reply(CLIENT, X_InternAtom)) == NULL) { - Log_Err("client %d failed to receive InternAtom reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received InternAtom reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(rep); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent InternAtom request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong InternAtom request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/KillClient/KillClient.m b/xts5/tset/Xproto/KillClient/KillClient.m new file mode 100644 index 00000000..878b5534 --- /dev/null +++ b/xts5/tset/Xproto/KillClient/KillClient.m @@ -0,0 +1,248 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/KillClient/KillClient.m,v 1.2 2005-11-03 08:44:11 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/KillClient/KillClient.m +>># +>># Description: +>># Tests for KillClient() +>># +>># Modifications: +>># $Log: kllclnt.m,v $ +>># Revision 1.2 2005-11-03 08:44:11 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:00 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:46 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:37 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:15 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:46 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:57 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:05:13 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE KillClient Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for KillClient request */ + +#include "Xstlib.h" + +#define VICTIM 0 +#define CLIENT 1 +static TestType test_type = SETUP; +Window win; +xResourceReq *req; + +static +void +tester() +{ + Create_Client(VICTIM); + Create_Client(CLIENT); + + win = Create_Default_Window(VICTIM); + (void) Create_Default_GContext(VICTIM); + + /* We can't send anything on the VICTIM client to see if it's + really been killed. If we do, the library will see "Connection + reset by peer" and blow off the test. */ + + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_KillClient); + req->id = win; + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default KillClient request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent KillClient request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong KillClient request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/KillClient/XKillClient.m b/xts5/tset/Xproto/KillClient/XKillClient.m deleted file mode 100644 index 08a33164..00000000 --- a/xts5/tset/Xproto/KillClient/XKillClient.m +++ /dev/null @@ -1,248 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XKillClient/XKillClient.m,v 1.2 2005-11-03 08:44:11 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XKillClient/XKillClient.m ->># ->># Description: ->># Tests for KillClient() ->># ->># Modifications: ->># $Log: kllclnt.m,v $ ->># Revision 1.2 2005-11-03 08:44:11 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:00 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:46 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:37 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:15 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:46 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:57 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:05:13 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE KillClient Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for KillClient request */ - -#include "Xstlib.h" - -#define VICTIM 0 -#define CLIENT 1 -static TestType test_type = SETUP; -Window win; -xResourceReq *req; - -static -void -tester() -{ - Create_Client(VICTIM); - Create_Client(CLIENT); - - win = Create_Default_Window(VICTIM); - (void) Create_Default_GContext(VICTIM); - - /* We can't send anything on the VICTIM client to see if it's - really been killed. If we do, the library will see "Connection - reset by peer" and blow off the test. */ - - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_KillClient); - req->id = win; - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default KillClient request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent KillClient request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong KillClient request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/ListFonts/ListFonts.m b/xts5/tset/Xproto/ListFonts/ListFonts.m new file mode 100644 index 00000000..6629bf97 --- /dev/null +++ b/xts5/tset/Xproto/ListFonts/ListFonts.m @@ -0,0 +1,247 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/ListFonts/ListFonts.m,v 1.2 2005-11-03 08:44:12 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/ListFonts/ListFonts.m +>># +>># Description: +>># Tests for ListFonts +>># +>># Modifications: +>># $Log: lstfnts.m,v $ +>># Revision 1.2 2005-11-03 08:44:12 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:00 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:48 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:41 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:16 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:48 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:06:01 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:05:19 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE ListFonts Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for ListFonts request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xListFontsReq *req; +xListFontsReply *rep; + +static +void +tester() +{ + Create_Client(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xListFontsReq *) Make_Req(CLIENT, X_ListFonts); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default ListFonts request\n", CLIENT); + if ((rep = (xListFontsReply *) Expect_Reply(CLIENT, X_ListFonts)) == NULL) { + Log_Err("client %d failed to receive ListFonts reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received ListFonts reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(rep); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent ListFonts request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong ListFonts request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/ListFonts/XListFonts.m b/xts5/tset/Xproto/ListFonts/XListFonts.m deleted file mode 100644 index 9272c0ce..00000000 --- a/xts5/tset/Xproto/ListFonts/XListFonts.m +++ /dev/null @@ -1,247 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XListFonts/XListFonts.m,v 1.2 2005-11-03 08:44:12 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XListFonts/XListFonts.m ->># ->># Description: ->># Tests for ListFonts ->># ->># Modifications: ->># $Log: lstfnts.m,v $ ->># Revision 1.2 2005-11-03 08:44:12 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:00 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:48 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:41 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:16 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:48 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:06:01 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:05:19 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE ListFonts Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for ListFonts request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xListFontsReq *req; -xListFontsReply *rep; - -static -void -tester() -{ - Create_Client(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xListFontsReq *) Make_Req(CLIENT, X_ListFonts); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default ListFonts request\n", CLIENT); - if ((rep = (xListFontsReply *) Expect_Reply(CLIENT, X_ListFonts)) == NULL) { - Log_Err("client %d failed to receive ListFonts reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received ListFonts reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(rep); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent ListFonts request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong ListFonts request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/ListFontsWithInfo/ListFontsWithInfo.m b/xts5/tset/Xproto/ListFontsWithInfo/ListFontsWithInfo.m new file mode 100644 index 00000000..e5137e19 --- /dev/null +++ b/xts5/tset/Xproto/ListFontsWithInfo/ListFontsWithInfo.m @@ -0,0 +1,258 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/ListFontsWithInfo/ListFontsWithInfo.m,v 1.2 2005-11-03 08:44:12 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/ListFontsWithInfo/ListFontsWithInfo.m +>># +>># Description: +>># Tests for ListFontsWithInfo +>># +>># Modifications: +>># $Log: lstfntswth.m,v $ +>># Revision 1.2 2005-11-03 08:44:12 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:00 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:48 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:41 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:16 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:48 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:06:03 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:05:22 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE ListFontsWithInfo Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for ListFontsWithInfo request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xCreateWindowReq *cwr; +xListFontsWithInfoReq *req; +xListFontsWithInfoReply *rep; + +static +void +tester() +{ + Create_Client(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xListFontsWithInfoReq *) Make_Req(CLIENT, X_ListFontsWithInfo); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default ListFontsWithInfo request\n", CLIENT); + if ((rep = (xListFontsWithInfoReply *) Expect_Reply(CLIENT, X_ListFontsWithInfo)) == NULL) { + Log_Err("client %d failed to receive ListFontsWithInfo reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received ListFontsWithInfo reply\n", CLIENT); + /* do any reply checking here */ + } + while (rep->nameLength != 0) { + Free_Reply(rep); + if ((rep = (xListFontsWithInfoReply *) Expect_Reply(CLIENT, X_ListFontsWithInfo)) == NULL) { + Log_Err("client %d failed to receive ListFontsWithInfo reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received ListFontsWithInfo reply\n", CLIENT); + /* do any reply checking here */ + } + } + Free_Reply(rep); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent ListFontsWithInfo request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong ListFontsWithInfo request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back replies to the client +until a reply with a zero length name is returned. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/ListFontsWithInfo/XListFontsWithInfo.m b/xts5/tset/Xproto/ListFontsWithInfo/XListFontsWithInfo.m deleted file mode 100644 index 9ddfdfe6..00000000 --- a/xts5/tset/Xproto/ListFontsWithInfo/XListFontsWithInfo.m +++ /dev/null @@ -1,258 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XListFontsWithInfo/XListFontsWithInfo.m,v 1.2 2005-11-03 08:44:12 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XListFontsWithInfo/XListFontsWithInfo.m ->># ->># Description: ->># Tests for ListFontsWithInfo ->># ->># Modifications: ->># $Log: lstfntswth.m,v $ ->># Revision 1.2 2005-11-03 08:44:12 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:00 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:48 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:41 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:16 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:48 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:06:03 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:05:22 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE ListFontsWithInfo Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for ListFontsWithInfo request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xCreateWindowReq *cwr; -xListFontsWithInfoReq *req; -xListFontsWithInfoReply *rep; - -static -void -tester() -{ - Create_Client(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xListFontsWithInfoReq *) Make_Req(CLIENT, X_ListFontsWithInfo); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default ListFontsWithInfo request\n", CLIENT); - if ((rep = (xListFontsWithInfoReply *) Expect_Reply(CLIENT, X_ListFontsWithInfo)) == NULL) { - Log_Err("client %d failed to receive ListFontsWithInfo reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received ListFontsWithInfo reply\n", CLIENT); - /* do any reply checking here */ - } - while (rep->nameLength != 0) { - Free_Reply(rep); - if ((rep = (xListFontsWithInfoReply *) Expect_Reply(CLIENT, X_ListFontsWithInfo)) == NULL) { - Log_Err("client %d failed to receive ListFontsWithInfo reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received ListFontsWithInfo reply\n", CLIENT); - /* do any reply checking here */ - } - } - Free_Reply(rep); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent ListFontsWithInfo request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong ListFontsWithInfo request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back replies to the client -until a reply with a zero length name is returned. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/ListHosts/ListHosts.m b/xts5/tset/Xproto/ListHosts/ListHosts.m new file mode 100644 index 00000000..b82c961a --- /dev/null +++ b/xts5/tset/Xproto/ListHosts/ListHosts.m @@ -0,0 +1,247 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/ListHosts/ListHosts.m,v 1.2 2005-11-03 08:44:12 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/ListHosts/ListHosts.m +>># +>># Description: +>># Tests for ListHosts +>># +>># Modifications: +>># $Log: lsthsts.m,v $ +>># Revision 1.2 2005-11-03 08:44:12 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:00 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:49 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:42 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:17 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:49 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:06:04 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:05:25 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE ListHosts Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for ListHosts request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xListHostsReq *req; +xListHostsReply *rep; + +static +void +tester() +{ + Create_Client(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xListHostsReq *) Make_Req(CLIENT, X_ListHosts); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default ListHosts request\n", CLIENT); + if ((rep = (xListHostsReply *) Expect_Reply(CLIENT, X_ListHosts)) == NULL) { + Log_Err("client %d failed to receive ListHosts reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received ListHosts reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(rep); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent ListHosts request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong ListHosts request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/ListHosts/XListHosts.m b/xts5/tset/Xproto/ListHosts/XListHosts.m deleted file mode 100644 index 9fe654a5..00000000 --- a/xts5/tset/Xproto/ListHosts/XListHosts.m +++ /dev/null @@ -1,247 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XListHosts/XListHosts.m,v 1.2 2005-11-03 08:44:12 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XListHosts/XListHosts.m ->># ->># Description: ->># Tests for ListHosts ->># ->># Modifications: ->># $Log: lsthsts.m,v $ ->># Revision 1.2 2005-11-03 08:44:12 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:00 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:49 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:42 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:17 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:49 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:06:04 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:05:25 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE ListHosts Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for ListHosts request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xListHostsReq *req; -xListHostsReply *rep; - -static -void -tester() -{ - Create_Client(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xListHostsReq *) Make_Req(CLIENT, X_ListHosts); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default ListHosts request\n", CLIENT); - if ((rep = (xListHostsReply *) Expect_Reply(CLIENT, X_ListHosts)) == NULL) { - Log_Err("client %d failed to receive ListHosts reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received ListHosts reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(rep); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent ListHosts request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong ListHosts request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/ListInstalledColormaps/ListInstalledColormaps.m b/xts5/tset/Xproto/ListInstalledColormaps/ListInstalledColormaps.m new file mode 100644 index 00000000..d5d26b1c --- /dev/null +++ b/xts5/tset/Xproto/ListInstalledColormaps/ListInstalledColormaps.m @@ -0,0 +1,261 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/ListInstalledColormaps/ListInstalledColormaps.m,v 1.2 2005-11-03 08:44:12 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/ListInstalledColormaps/ListInstalledColormaps.m +>># +>># Description: +>># Tests for ListInstalledColormaps +>># +>># Modifications: +>># $Log: lstinstlld.m,v $ +>># Revision 1.2 2005-11-03 08:44:12 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:00 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:49 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:43 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:17 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:49 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:06:06 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:05:27 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE ListInstalledColormaps Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for ListInstalledColormaps request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xResourceReq *req; +xListInstalledColormapsReply *reply; + +/* + intent: send a ListInstalledColormaps request to the server and check + that the server sent a ListInstalledColormaps reply back. + input: + output: none + global input: + side effects: creates a window resource + methods: +*/ + +static +void +tester() +{ + + + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_ListInstalledColormaps); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default ListInstalledColormaps request\n", CLIENT); + if ((reply = (xListInstalledColormapsReply *) Expect_Reply(CLIENT, X_ListInstalledColormaps)) == NULL) { + Log_Err("client %d failed to receive ListInstalledColormaps reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received ListInstalledColormaps reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(reply); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent ListInstalledColormaps request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong ListInstalledColormaps request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/ListInstalledColormaps/XListInstalledColormaps.m b/xts5/tset/Xproto/ListInstalledColormaps/XListInstalledColormaps.m deleted file mode 100644 index ae01b627..00000000 --- a/xts5/tset/Xproto/ListInstalledColormaps/XListInstalledColormaps.m +++ /dev/null @@ -1,261 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XListInstalledColormaps/XListInstalledColormaps.m,v 1.2 2005-11-03 08:44:12 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XListInstalledColormaps/XListInstalledColormaps.m ->># ->># Description: ->># Tests for ListInstalledColormaps ->># ->># Modifications: ->># $Log: lstinstlld.m,v $ ->># Revision 1.2 2005-11-03 08:44:12 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:00 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:49 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:43 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:17 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:49 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:06:06 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:05:27 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE ListInstalledColormaps Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for ListInstalledColormaps request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xResourceReq *req; -xListInstalledColormapsReply *reply; - -/* - intent: send a ListInstalledColormaps request to the server and check - that the server sent a ListInstalledColormaps reply back. - input: - output: none - global input: - side effects: creates a window resource - methods: -*/ - -static -void -tester() -{ - - - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_ListInstalledColormaps); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default ListInstalledColormaps request\n", CLIENT); - if ((reply = (xListInstalledColormapsReply *) Expect_Reply(CLIENT, X_ListInstalledColormaps)) == NULL) { - Log_Err("client %d failed to receive ListInstalledColormaps reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received ListInstalledColormaps reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(reply); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent ListInstalledColormaps request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong ListInstalledColormaps request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/ListProperties/ListProperties.m b/xts5/tset/Xproto/ListProperties/ListProperties.m new file mode 100644 index 00000000..cc13a1d7 --- /dev/null +++ b/xts5/tset/Xproto/ListProperties/ListProperties.m @@ -0,0 +1,249 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/ListProperties/ListProperties.m,v 1.2 2005-11-03 08:44:13 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/ListProperties/ListProperties.m +>># +>># Description: +>># Tests for ListProperties +>># +>># Modifications: +>># $Log: lstprprts.m,v $ +>># Revision 1.2 2005-11-03 08:44:13 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:00 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:50 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:44 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:18 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:50 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:06:07 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:05:29 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE ListProperties Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for ListProperties request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xResourceReq *req; +xListPropertiesReply *rep; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_ListProperties); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default ListProperties request\n", CLIENT); + if ((rep = (xListPropertiesReply *) Expect_Reply(CLIENT, X_ListProperties)) == NULL) { + Log_Err("client %d failed to receive ListProperties reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received ListProperties reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(rep); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent ListProperties request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong ListProperties request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/ListProperties/XListProperties.m b/xts5/tset/Xproto/ListProperties/XListProperties.m deleted file mode 100644 index 376c8b69..00000000 --- a/xts5/tset/Xproto/ListProperties/XListProperties.m +++ /dev/null @@ -1,249 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XListProperties/XListProperties.m,v 1.2 2005-11-03 08:44:13 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XListProperties/XListProperties.m ->># ->># Description: ->># Tests for ListProperties ->># ->># Modifications: ->># $Log: lstprprts.m,v $ ->># Revision 1.2 2005-11-03 08:44:13 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:00 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:50 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:44 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:18 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:50 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:06:07 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:05:29 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE ListProperties Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for ListProperties request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xResourceReq *req; -xListPropertiesReply *rep; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_ListProperties); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default ListProperties request\n", CLIENT); - if ((rep = (xListPropertiesReply *) Expect_Reply(CLIENT, X_ListProperties)) == NULL) { - Log_Err("client %d failed to receive ListProperties reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received ListProperties reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(rep); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent ListProperties request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong ListProperties request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/LookupColor/LookupColor.m b/xts5/tset/Xproto/LookupColor/LookupColor.m new file mode 100644 index 00000000..4922f1aa --- /dev/null +++ b/xts5/tset/Xproto/LookupColor/LookupColor.m @@ -0,0 +1,259 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/LookupColor/LookupColor.m,v 1.2 2005-11-03 08:44:11 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/LookupColor/LookupColor.m +>># +>># Description: +>># Tests for LookupColor +>># +>># Modifications: +>># $Log: lkpclr.m,v $ +>># Revision 1.2 2005-11-03 08:44:11 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:00 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:46 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:38 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:15 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:47 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:05:59 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:05:15 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE LookupColor Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for LookupColor request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xResourceReq *req; +xLookupColorReply *rep; + +/* + intent: send a LookupColor request to the server and check + that the server sent a reply back + input: + output: none + global input: + side effects: creates a window resource + methods: +*/ + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + (void) Create_Default_Colormap(CLIENT); + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_LookupColor); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default LookupColor request\n", CLIENT); + if ((rep = (xLookupColorReply *) Expect_Reply(CLIENT, X_LookupColor)) == NULL) { + Log_Err("client %d failed to receive LookupColor reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received LookupColor reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(rep); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent LookupColor request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong LookupColor request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/LookupColor/XLookupColor.m b/xts5/tset/Xproto/LookupColor/XLookupColor.m deleted file mode 100644 index 203614dd..00000000 --- a/xts5/tset/Xproto/LookupColor/XLookupColor.m +++ /dev/null @@ -1,259 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XLookupColor/XLookupColor.m,v 1.2 2005-11-03 08:44:11 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XLookupColor/XLookupColor.m ->># ->># Description: ->># Tests for LookupColor ->># ->># Modifications: ->># $Log: lkpclr.m,v $ ->># Revision 1.2 2005-11-03 08:44:11 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:00 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:46 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:38 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:15 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:47 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:05:59 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:05:15 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE LookupColor Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for LookupColor request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xResourceReq *req; -xLookupColorReply *rep; - -/* - intent: send a LookupColor request to the server and check - that the server sent a reply back - input: - output: none - global input: - side effects: creates a window resource - methods: -*/ - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - (void) Create_Default_Colormap(CLIENT); - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_LookupColor); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default LookupColor request\n", CLIENT); - if ((rep = (xLookupColorReply *) Expect_Reply(CLIENT, X_LookupColor)) == NULL) { - Log_Err("client %d failed to receive LookupColor reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received LookupColor reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(rep); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent LookupColor request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong LookupColor request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/Makefile.am b/xts5/tset/Xproto/Makefile.am index 344c39ea..dabf17b9 100644 --- a/xts5/tset/Xproto/Makefile.am +++ b/xts5/tset/Xproto/Makefile.am @@ -10,82 +10,82 @@ CLEANFILES = $(BUILT_SOURCES) tprogs = \ AllocColor/AllocColor \ - AllocColorCells/XAllocColorCells \ - AllocColorPlanes/XAllocColorPlanes \ - AllocNamedColor/XAllocNamedColor \ - AllowEvents/XAllowEvents \ + AllocColorCells/AllocColorCells \ + AllocColorPlanes/AllocColorPlanes \ + AllocNamedColor/AllocNamedColor \ + AllowEvents/AllowEvents \ BadRequest/BadRequest \ - Bell/XBell \ - ChangeActivePointerGrab/XChangeActivePointerGrab \ - ChangeGC/XChangeGC \ + Bell/Bell \ + ChangeActivePointerGrab/ChangeActivePointerGrab \ + ChangeGC/ChangeGC \ ChangeHosts/ChangeHosts \ - ChangeKeyboardControl/XChangeKeyboardControl \ - ChangeKeyboardMapping/XChangeKeyboardMapping \ - ChangePointerControl/XChangePointerControl \ - ChangeProperty/XChangeProperty \ - ChangeSaveSet/XChangeSaveSet \ - ChangeWindowAttributes/XChangeWindowAttributes \ - ClearArea/XClearArea \ + ChangeKeyboardControl/ChangeKeyboardControl \ + ChangeKeyboardMapping/ChangeKeyboardMapping \ + ChangePointerControl/ChangePointerControl \ + ChangeProperty/ChangeProperty \ + ChangeSaveSet/ChangeSaveSet \ + ChangeWindowAttributes/ChangeWindowAttributes \ + ClearArea/ClearArea \ CloseFont/CloseFont \ - ConfigureWindow/XConfigureWindow \ - ConvertSelection/XConvertSelection \ - CopyArea/XCopyArea \ - CopyColormapAndFree/XCopyColormapAndFree \ - CopyGC/XCopyGC \ - CopyPlane/XCopyPlane \ + ConfigureWindow/ConfigureWindow \ + ConvertSelection/ConvertSelection \ + CopyArea/CopyArea \ + CopyColormapAndFree/CopyColormapAndFree \ + CopyGC/CopyGC \ + CopyPlane/CopyPlane \ CirculateWindow/CirculateWindow \ - CreateColormap/XCreateColormap \ + CreateColormap/CreateColormap \ CreateCursor/CreateCursor \ - CreateGC/XCreateGC \ - CreateGlyphCursor/XCreateGlyphCursor \ - CreatePixmap/XCreatePixmap \ - CreateWindow/XCreateWindow \ - DeleteProperty/XDeleteProperty \ - DestroySubwindows/XDestroySubwindows \ - DestroyWindow/XDestroyWindow \ + CreateGC/CreateGC \ + CreateGlyphCursor/CreateGlyphCursor \ + CreatePixmap/CreatePixmap \ + CreateWindow/CreateWindow \ + DeleteProperty/DeleteProperty \ + DestroySubwindows/DestroySubwindows \ + DestroyWindow/DestroyWindow \ FillPoly/FillPoly \ - FreeColormap/XFreeColormap \ - FreeColors/XFreeColors \ - FreeCursor/XFreeCursor \ - ForceScreenSaver/XForceScreenSaver \ - FreeGC/XFreeGC \ - FreePixmap/XFreePixmap \ - GrabButton/XGrabButton \ - GrabKey/XGrabKey \ - GrabKeyboard/XGrabKeyboard \ - GrabPointer/XGrabPointer \ - GrabServer/XGrabServer \ - GetAtomName/XGetAtomName \ - GetFontPath/XGetFontPath \ - GetGeometry/XGetGeometry \ - GetImage/XGetImage \ - GetInputFocus/XGetInputFocus \ - GetKeyboardControl/XGetKeyboardControl \ - GetKeyboardMapping/XGetKeyboardMapping \ - GetModifierMapping/XGetModifierMapping \ - GetMotionEvents/XGetMotionEvents \ - GetPointerControl/XGetPointerControl \ - GetPointerMapping/XGetPointerMapping \ + FreeColormap/FreeColormap \ + FreeColors/FreeColors \ + FreeCursor/FreeCursor \ + ForceScreenSaver/ForceScreenSaver \ + FreeGC/FreeGC \ + FreePixmap/FreePixmap \ + GrabButton/GrabButton \ + GrabKey/GrabKey \ + GrabKeyboard/GrabKeyboard \ + GrabPointer/GrabPointer \ + GrabServer/GrabServer \ + GetAtomName/GetAtomName \ + GetFontPath/GetFontPath \ + GetGeometry/GetGeometry \ + GetImage/GetImage \ + GetInputFocus/GetInputFocus \ + GetKeyboardControl/GetKeyboardControl \ + GetKeyboardMapping/GetKeyboardMapping \ + GetModifierMapping/GetModifierMapping \ + GetMotionEvents/GetMotionEvents \ + GetPointerControl/GetPointerControl \ + GetPointerMapping/GetPointerMapping \ GetProperty/GetProperty \ - GetScreenSaver/XGetScreenSaver \ - GetSelectionOwner/XGetSelectionOwner \ - GetWindowAttributes/XGetWindowAttributes \ + GetScreenSaver/GetScreenSaver \ + GetSelectionOwner/GetSelectionOwner \ + GetWindowAttributes/GetWindowAttributes \ ImageText16/ImageText16 \ ImageText8/ImageText8 \ - InstallColormap/XInstallColormap \ - InternAtom/XInternAtom \ - KillClient/XKillClient \ - LookupColor/XLookupColor \ + InstallColormap/InstallColormap \ + InternAtom/InternAtom \ + KillClient/KillClient \ + LookupColor/LookupColor \ ListExtensions/ListExtensions \ - ListFonts/XListFonts \ - ListFontsWithInfo/XListFontsWithInfo \ - ListHosts/XListHosts \ - ListInstalledColormaps/XListInstalledColormaps \ - ListProperties/XListProperties \ - MapSubwindows/XMapSubwindows \ - MapWindow/XMapWindow \ + ListFonts/ListFonts \ + ListFontsWithInfo/ListFontsWithInfo \ + ListHosts/ListHosts \ + ListInstalledColormaps/ListInstalledColormaps \ + ListProperties/ListProperties \ + MapSubwindows/MapSubwindows \ + MapWindow/MapWindow \ NoOperation/NoOperation \ - OpenDisplay/XOpenDisplay \ + OpenDisplay/OpenDisplay \ OpenFont/OpenFont \ PolyArc/PolyArc \ PolyFillArc/PolyFillArc \ @@ -96,38 +96,38 @@ tprogs = \ PolySegment/PolySegment \ PolyText16/PolyText16 \ PolyText8/PolyText8 \ - PutImage/XPutImage \ - QueryBestSize/XQueryBestSize \ - QueryColors/XQueryColors \ + PutImage/PutImage \ + QueryBestSize/QueryBestSize \ + QueryColors/QueryColors \ QueryExtension/QueryExtension \ - QueryFont/XQueryFont \ - QueryKeymap/XQueryKeymap \ - QueryPointer/XQueryPointer \ - QueryTree/XQueryTree \ - QueryTextExtents/XQueryTextExtents \ - RecolorCursor/XRecolorCursor \ - ReparentWindow/XReparentWindow \ + QueryFont/QueryFont \ + QueryKeymap/QueryKeymap \ + QueryPointer/QueryPointer \ + QueryTree/QueryTree \ + QueryTextExtents/QueryTextExtents \ + RecolorCursor/RecolorCursor \ + ReparentWindow/ReparentWindow \ RotateProperties/RotateProperties \ - SendEvent/XSendEvent \ - SetAccessControl/XSetAccessControl \ - SetClipRectangles/XSetClipRectangles \ - SetCloseDownMode/XSetCloseDownMode \ - SetDashes/XSetDashes \ - SetFontPath/XSetFontPath \ - SetInputFocus/XSetInputFocus \ - SetModifierMapping/XSetModifierMapping \ - SetPointerMapping/XSetPointerMapping \ - StoreColors/XStoreColors \ - StoreNamedColor/XStoreNamedColor \ - SetScreenSaver/XSetScreenSaver \ - SetSelectionOwner/XSetSelectionOwner \ + SendEvent/SendEvent \ + SetAccessControl/SetAccessControl \ + SetClipRectangles/SetClipRectangles \ + SetCloseDownMode/SetCloseDownMode \ + SetDashes/SetDashes \ + SetFontPath/SetFontPath \ + SetInputFocus/SetInputFocus \ + SetModifierMapping/SetModifierMapping \ + SetPointerMapping/SetPointerMapping \ + StoreColors/StoreColors \ + StoreNamedColor/StoreNamedColor \ + SetScreenSaver/SetScreenSaver \ + SetSelectionOwner/SetSelectionOwner \ TranslateCoords/TranslateCoords \ - UngrabButton/XUngrabButton \ - UngrabKey/XUngrabKey \ - UngrabKeyboard/XUngrabKeyboard \ - UngrabPointer/XUngrabPointer \ - UngrabServer/XUngrabServer \ - UnmapSubwindows/XUnmapSubwindows \ - UnmapWindow/XUnmapWindow \ - UninstallColormap/XUninstallColormap \ - WarpPointer/XWarpPointer + UngrabButton/UngrabButton \ + UngrabKey/UngrabKey \ + UngrabKeyboard/UngrabKeyboard \ + UngrabPointer/UngrabPointer \ + UngrabServer/UngrabServer \ + UnmapSubwindows/UnmapSubwindows \ + UnmapWindow/UnmapWindow \ + UninstallColormap/UninstallColormap \ + WarpPointer/WarpPointer diff --git a/xts5/tset/Xproto/MapSubwindows/MapSubwindows.m b/xts5/tset/Xproto/MapSubwindows/MapSubwindows.m new file mode 100644 index 00000000..836acf69 --- /dev/null +++ b/xts5/tset/Xproto/MapSubwindows/MapSubwindows.m @@ -0,0 +1,252 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/MapSubwindows/MapSubwindows.m,v 1.2 2005-11-03 08:44:13 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/MapSubwindows/MapSubwindows.m +>># +>># Description: +>># Tests for MapSubwindows +>># +>># Modifications: +>># $Log: mpsbws.m,v $ +>># Revision 1.2 2005-11-03 08:44:13 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:00 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:50 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:45 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:18 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:50 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:06:08 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:05:32 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE MapSubwindows Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for MapSubwindows request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +Window Default_Window; +xCreateWindowReq *cwr; +xResourceReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + Default_Window = Create_Default_Window(CLIENT); + + cwr = (xCreateWindowReq *) Make_Req(CLIENT, X_CreateWindow); + cwr->parent = Default_Window; + Send_Req(CLIENT, (xReq *) cwr); + Log_Trace("client %d sent additional CreateWindow request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + Free_Req(cwr); + + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_MapSubwindows); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default MapSubwindows request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent MapSubwindows request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong MapSubwindows request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +and the parent window is not mapped, +and the client has no event selected in the +.M event_mask +for any window, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/MapSubwindows/XMapSubwindows.m b/xts5/tset/Xproto/MapSubwindows/XMapSubwindows.m deleted file mode 100644 index b447d495..00000000 --- a/xts5/tset/Xproto/MapSubwindows/XMapSubwindows.m +++ /dev/null @@ -1,252 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XMapSubwindows/XMapSubwindows.m,v 1.2 2005-11-03 08:44:13 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XMapSubwindows/XMapSubwindows.m ->># ->># Description: ->># Tests for MapSubwindows ->># ->># Modifications: ->># $Log: mpsbws.m,v $ ->># Revision 1.2 2005-11-03 08:44:13 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:00 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:50 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:45 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:18 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:50 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:06:08 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:05:32 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE MapSubwindows Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for MapSubwindows request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -Window Default_Window; -xCreateWindowReq *cwr; -xResourceReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - Default_Window = Create_Default_Window(CLIENT); - - cwr = (xCreateWindowReq *) Make_Req(CLIENT, X_CreateWindow); - cwr->parent = Default_Window; - Send_Req(CLIENT, (xReq *) cwr); - Log_Trace("client %d sent additional CreateWindow request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - Free_Req(cwr); - - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_MapSubwindows); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default MapSubwindows request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent MapSubwindows request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong MapSubwindows request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -and the parent window is not mapped, -and the client has no event selected in the -.M event_mask -for any window, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/MapWindow/MapWindow.m b/xts5/tset/Xproto/MapWindow/MapWindow.m new file mode 100644 index 00000000..2275bb6a --- /dev/null +++ b/xts5/tset/Xproto/MapWindow/MapWindow.m @@ -0,0 +1,249 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/MapWindow/MapWindow.m,v 1.2 2005-11-03 08:44:13 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/MapWindow/MapWindow.m +>># +>># Description: +>># Tests for MapWindow +>># +>># Modifications: +>># $Log: mpwdw.m,v $ +>># Revision 1.2 2005-11-03 08:44:13 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:00 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:51 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:45 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:19 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:51 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:06:09 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:05:34 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE MapWindow Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for MapWindow request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xResourceReq *req; +xEvent *ev; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_MapWindow); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default MapWindow request\n", CLIENT); + if ((ev = (xEvent *) Expect_Event(CLIENT, Expose)) == NULL) { + Log_Err("client %d failed to receive Expose\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received Expose\n", CLIENT); + /* do any event checking here */ + Free_Event(ev); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent MapWindow request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong MapWindow request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +and backing store has not been maintained while the window was unmapped, +then the X server sends back an Expose event to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back an Expose event. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back an Expose event. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/MapWindow/XMapWindow.m b/xts5/tset/Xproto/MapWindow/XMapWindow.m deleted file mode 100644 index 2310d198..00000000 --- a/xts5/tset/Xproto/MapWindow/XMapWindow.m +++ /dev/null @@ -1,249 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XMapWindow/XMapWindow.m,v 1.2 2005-11-03 08:44:13 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XMapWindow/XMapWindow.m ->># ->># Description: ->># Tests for MapWindow ->># ->># Modifications: ->># $Log: mpwdw.m,v $ ->># Revision 1.2 2005-11-03 08:44:13 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:00 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:51 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:45 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:19 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:51 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:06:09 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:05:34 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE MapWindow Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for MapWindow request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xResourceReq *req; -xEvent *ev; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_MapWindow); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default MapWindow request\n", CLIENT); - if ((ev = (xEvent *) Expect_Event(CLIENT, Expose)) == NULL) { - Log_Err("client %d failed to receive Expose\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received Expose\n", CLIENT); - /* do any event checking here */ - Free_Event(ev); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent MapWindow request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong MapWindow request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -and backing store has not been maintained while the window was unmapped, -then the X server sends back an Expose event to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back an Expose event. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back an Expose event. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/OpenDisplay/OpenDisplay.m b/xts5/tset/Xproto/OpenDisplay/OpenDisplay.m new file mode 100644 index 00000000..cf72766c --- /dev/null +++ b/xts5/tset/Xproto/OpenDisplay/OpenDisplay.m @@ -0,0 +1,205 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/OpenDisplay/OpenDisplay.m,v 1.2 2005-11-03 08:44:13 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/OpenDisplay/OpenDisplay.m +>># +>># Description: +>># Tests for OpenDisplay +>># +>># Modifications: +>># $Log: opndsply.m,v $ +>># Revision 1.2 2005-11-03 08:44:13 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:00 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:52 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:48 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:20 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:52 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:06:12 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:05:38 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE OpenDisplay Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for OpenDisplay request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; + +/* + intent: send an OpenDisplay request to the server and check + that the server sent an OpenDisplay reply back + input: + output: none + global input: + side effects: + methods: +*/ + +static +void +tester() +{ + int status = Create_Client_Tested(CLIENT, test_type); + + if(!status) { + switch(test_type) { + case OPEN_DISPLAY: + Log_Err("Expected connection to fail, but it didn't"); + break; + default: + Log_Err("Expected connection not to fail, but it did"); + break; + } + Exit(); + } + + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a valid authorisation-accepted +reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a valid authorisation-accepted reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a valid authorisation-accepted reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +>># Assertion changed, 11th March 1992, to expect other than valid +>># auth.-accepted reply. It's wrong to expect a valid auth.-fail +>># reply as if byte order unknown then the 2-byte major & minor +>># protocol versions can't be sent properly: client byte-sex is +>># unknown to the server. We therefore will accept anything but +>># a valid reply: nothing; connection closed or reply with first +>># byte False (0). See bug report 0223. +>># This was not noticed at initial assertion review time. +When a client sends an invalid xname protocol request to the X server, +in which the +.M byte_order +is not 0x42 or 0x6C, +then the X server does not +send back a valid authorisation-accepted reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server. +Send an invalid xname protocol request to the X server with byte_order + other than 0x42 (and not 0x6C, either). +Verify that the X server does not send back a valid authorisation-accepted reply. +Open a connection to the X server. +Send an invalid xname protocol request to the X server with byte_order + other than 0x6C (and not 0x42, either). +Verify that the X server does not send back a valid authorisation-accepted reply. +>>CODE + + test_type = OPEN_DISPLAY; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/OpenDisplay/XOpenDisplay.m b/xts5/tset/Xproto/OpenDisplay/XOpenDisplay.m deleted file mode 100644 index 4d0f28f1..00000000 --- a/xts5/tset/Xproto/OpenDisplay/XOpenDisplay.m +++ /dev/null @@ -1,205 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XOpenDisplay/XOpenDisplay.m,v 1.2 2005-11-03 08:44:13 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XOpenDisplay/XOpenDisplay.m ->># ->># Description: ->># Tests for OpenDisplay ->># ->># Modifications: ->># $Log: opndsply.m,v $ ->># Revision 1.2 2005-11-03 08:44:13 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:00 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:52 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:48 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:20 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:52 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:06:12 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:05:38 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE OpenDisplay Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for OpenDisplay request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; - -/* - intent: send an OpenDisplay request to the server and check - that the server sent an OpenDisplay reply back - input: - output: none - global input: - side effects: - methods: -*/ - -static -void -tester() -{ - int status = Create_Client_Tested(CLIENT, test_type); - - if(!status) { - switch(test_type) { - case OPEN_DISPLAY: - Log_Err("Expected connection to fail, but it didn't"); - break; - default: - Log_Err("Expected connection not to fail, but it did"); - break; - } - Exit(); - } - - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a valid authorisation-accepted -reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a valid authorisation-accepted reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a valid authorisation-accepted reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 ->># Assertion changed, 11th March 1992, to expect other than valid ->># auth.-accepted reply. It's wrong to expect a valid auth.-fail ->># reply as if byte order unknown then the 2-byte major & minor ->># protocol versions can't be sent properly: client byte-sex is ->># unknown to the server. We therefore will accept anything but ->># a valid reply: nothing; connection closed or reply with first ->># byte False (0). See bug report 0223. ->># This was not noticed at initial assertion review time. -When a client sends an invalid xname protocol request to the X server, -in which the -.M byte_order -is not 0x42 or 0x6C, -then the X server does not -send back a valid authorisation-accepted reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server. -Send an invalid xname protocol request to the X server with byte_order - other than 0x42 (and not 0x6C, either). -Verify that the X server does not send back a valid authorisation-accepted reply. -Open a connection to the X server. -Send an invalid xname protocol request to the X server with byte_order - other than 0x6C (and not 0x42, either). -Verify that the X server does not send back a valid authorisation-accepted reply. ->>CODE - - test_type = OPEN_DISPLAY; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/PutImage/PutImage.m b/xts5/tset/Xproto/PutImage/PutImage.m new file mode 100644 index 00000000..cf6e31f5 --- /dev/null +++ b/xts5/tset/Xproto/PutImage/PutImage.m @@ -0,0 +1,317 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/PutImage/PutImage.m,v 1.3 2005-11-03 08:44:16 jmichael Exp $ + +Copyright (c) 1999 The Open Group +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/PutImage/PutImage.m +>># +>># Description: +>># Tests for PutImage +>># +>># Modifications: +>># $Log: ptimg.m,v $ +>># Revision 1.3 2005-11-03 08:44:16 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.2 2005/04/21 09:40:42 ajosey +>># resync to VSW5.1.5 +>># +>># Revision 8.2 2005/01/21 12:08:31 gwc +>># Updated copyright notice +>># +>># Revision 8.1 1999/12/03 11:33:31 vsx +>># TSD4W.00165: in TOO_LONG test don't try to allocate image buffer when Big-Requests are enabled +>># +>># Revision 8.0 1998/12/23 23:32:57 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:53:59 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:25 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:57 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/18 02:41:19 tbr +>># Branch point for release 5.0.0. +>># +>># Revision 3.2 1995/12/18 02:40:30 tbr +>># changed bcopy to wbcopy +>># +>># Revision 3.1 1995/12/15 01:06:04 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE PutImage Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for PutImage request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +Window win; +xPolyRectangleReq *prr; +xGetImageReq *req; +xGetImageReply *rep; +xPutImageReq *pir; + +static +void +tester() +{ + unsigned char *from; + unsigned char *to; + unsigned int len; + + Create_Client(CLIENT); + + win = Create_Default_Window(CLIENT); + (void) Create_Default_GContext(CLIENT); + Map_Window(CLIENT, win); + + prr = (xPolyRectangleReq *) Make_Req(CLIENT, X_PolyRectangle); + Send_Req(CLIENT, (xReq *) prr); + Log_Trace("client %d sent pixmap PolyRectangle request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + Free_Req(req); + + req = (xGetImageReq *) Make_Req(CLIENT, X_GetImage); + Send_Req(CLIENT, (xReq *) req); + Log_Trace("client %d sent default GetImage request\n", CLIENT); + + if ((rep = (xGetImageReply *) Expect_Reply(CLIENT, X_GetImage)) == NULL) { + Log_Del("client %d failed to receive GetImage reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received GetImage reply\n", CLIENT); + /* do any reply checking here */ + } + (void) Expect_Nothing(CLIENT); + + win = Create_Default_Window(CLIENT); + Map_Window(CLIENT, win); + + Set_Test_Type(CLIENT, test_type); + pir = (xPutImageReq *) Make_Req(CLIENT, X_PutImage); + pir->dstX = 0; + pir->dstY = 0; + pir->width = req->width; + pir->height = req->height; + if (test_type != BAD_LENGTH) { + switch (test_type) { + case JUST_TOO_LONG: + pir->length += 10; /* ensure we're well over + w*h*depth_and_format_and_pad_stuff/4 */ + /* now fall through */ + default: + pir->length += rep->length; + break; + case TOO_LONG: + /* Send_Req() won't access any request data, so + no need to allocate it */ + pir->length = 0; + break; + } + len = pir->length<<2; + if (len != 0) { + pir = (xPutImageReq *) Xstrealloc((char *) pir, len); + if (pir == NULL) { + Log_Del ("client %d could not reallocate %d bytes for request buffer\n", CLIENT, len); + Exit (); + } + to = (unsigned char *) (pir+1); + from = (unsigned char *) (rep+1); + wbcopy(from, to, rep->length << 2); + } + } + + Send_Req(CLIENT, (xReq *) pir); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default PutImage request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + Visual_Check(); + break; + case BAD_LENGTH: + Log_Trace("client %d sent PutImage request with bad length (%d)\n", CLIENT, pir->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong PutImage request (%d)\n", CLIENT, pir->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Free_Reply(rep); + Free_Req(pir); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/PutImage/XPutImage.m b/xts5/tset/Xproto/PutImage/XPutImage.m deleted file mode 100644 index 8786c1be..00000000 --- a/xts5/tset/Xproto/PutImage/XPutImage.m +++ /dev/null @@ -1,317 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XPutImage/XPutImage.m,v 1.3 2005-11-03 08:44:16 jmichael Exp $ - -Copyright (c) 1999 The Open Group -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XPutImage/XPutImage.m ->># ->># Description: ->># Tests for PutImage ->># ->># Modifications: ->># $Log: ptimg.m,v $ ->># Revision 1.3 2005-11-03 08:44:16 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.2 2005/04/21 09:40:42 ajosey ->># resync to VSW5.1.5 ->># ->># Revision 8.2 2005/01/21 12:08:31 gwc ->># Updated copyright notice ->># ->># Revision 8.1 1999/12/03 11:33:31 vsx ->># TSD4W.00165: in TOO_LONG test don't try to allocate image buffer when Big-Requests are enabled ->># ->># Revision 8.0 1998/12/23 23:32:57 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:53:59 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:25 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:57 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/18 02:41:19 tbr ->># Branch point for release 5.0.0. ->># ->># Revision 3.2 1995/12/18 02:40:30 tbr ->># changed bcopy to wbcopy ->># ->># Revision 3.1 1995/12/15 01:06:04 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE PutImage Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for PutImage request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -Window win; -xPolyRectangleReq *prr; -xGetImageReq *req; -xGetImageReply *rep; -xPutImageReq *pir; - -static -void -tester() -{ - unsigned char *from; - unsigned char *to; - unsigned int len; - - Create_Client(CLIENT); - - win = Create_Default_Window(CLIENT); - (void) Create_Default_GContext(CLIENT); - Map_Window(CLIENT, win); - - prr = (xPolyRectangleReq *) Make_Req(CLIENT, X_PolyRectangle); - Send_Req(CLIENT, (xReq *) prr); - Log_Trace("client %d sent pixmap PolyRectangle request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - Free_Req(req); - - req = (xGetImageReq *) Make_Req(CLIENT, X_GetImage); - Send_Req(CLIENT, (xReq *) req); - Log_Trace("client %d sent default GetImage request\n", CLIENT); - - if ((rep = (xGetImageReply *) Expect_Reply(CLIENT, X_GetImage)) == NULL) { - Log_Del("client %d failed to receive GetImage reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received GetImage reply\n", CLIENT); - /* do any reply checking here */ - } - (void) Expect_Nothing(CLIENT); - - win = Create_Default_Window(CLIENT); - Map_Window(CLIENT, win); - - Set_Test_Type(CLIENT, test_type); - pir = (xPutImageReq *) Make_Req(CLIENT, X_PutImage); - pir->dstX = 0; - pir->dstY = 0; - pir->width = req->width; - pir->height = req->height; - if (test_type != BAD_LENGTH) { - switch (test_type) { - case JUST_TOO_LONG: - pir->length += 10; /* ensure we're well over - w*h*depth_and_format_and_pad_stuff/4 */ - /* now fall through */ - default: - pir->length += rep->length; - break; - case TOO_LONG: - /* Send_Req() won't access any request data, so - no need to allocate it */ - pir->length = 0; - break; - } - len = pir->length<<2; - if (len != 0) { - pir = (xPutImageReq *) Xstrealloc((char *) pir, len); - if (pir == NULL) { - Log_Del ("client %d could not reallocate %d bytes for request buffer\n", CLIENT, len); - Exit (); - } - to = (unsigned char *) (pir+1); - from = (unsigned char *) (rep+1); - wbcopy(from, to, rep->length << 2); - } - } - - Send_Req(CLIENT, (xReq *) pir); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default PutImage request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - Visual_Check(); - break; - case BAD_LENGTH: - Log_Trace("client %d sent PutImage request with bad length (%d)\n", CLIENT, pir->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong PutImage request (%d)\n", CLIENT, pir->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Free_Reply(rep); - Free_Req(pir); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/QueryBestSize/QueryBestSize.m b/xts5/tset/Xproto/QueryBestSize/QueryBestSize.m new file mode 100644 index 00000000..aefff527 --- /dev/null +++ b/xts5/tset/Xproto/QueryBestSize/QueryBestSize.m @@ -0,0 +1,251 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/QueryBestSize/QueryBestSize.m,v 1.2 2005-11-03 08:44:16 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/QueryBestSize/QueryBestSize.m +>># +>># Description: +>># Tests for QueryBestSize +>># +>># Modifications: +>># $Log: qrybstsz.m,v $ +>># Revision 1.2 2005-11-03 08:44:16 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:00 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:32:58 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:00 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:25 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:57 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:06:29 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:06:07 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE QueryBestSize Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for QueryBestSize request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +Window win; +xQueryBestSizeReq *req; +xQueryBestSizeReply *rep; + +static +void +tester() +{ + Create_Client(CLIENT); + + win = Create_Default_Window(CLIENT); + (void) Create_Default_GContext(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xQueryBestSizeReq *) Make_Req(CLIENT, X_QueryBestSize); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default QueryBestSize request\n", CLIENT); + if ((rep = (xQueryBestSizeReply *) Expect_Reply(CLIENT, X_QueryBestSize)) == NULL) { + Log_Err("client %d failed to receive QueryBestSize reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received QueryBestSize reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(rep); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent QueryBestSize request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong QueryBestSize request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/QueryBestSize/XQueryBestSize.m b/xts5/tset/Xproto/QueryBestSize/XQueryBestSize.m deleted file mode 100644 index 4352c250..00000000 --- a/xts5/tset/Xproto/QueryBestSize/XQueryBestSize.m +++ /dev/null @@ -1,251 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XQueryBestSize/XQueryBestSize.m,v 1.2 2005-11-03 08:44:16 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XQueryBestSize/XQueryBestSize.m ->># ->># Description: ->># Tests for QueryBestSize ->># ->># Modifications: ->># $Log: qrybstsz.m,v $ ->># Revision 1.2 2005-11-03 08:44:16 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:00 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:32:58 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:00 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:25 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:57 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:06:29 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:06:07 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE QueryBestSize Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for QueryBestSize request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -Window win; -xQueryBestSizeReq *req; -xQueryBestSizeReply *rep; - -static -void -tester() -{ - Create_Client(CLIENT); - - win = Create_Default_Window(CLIENT); - (void) Create_Default_GContext(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xQueryBestSizeReq *) Make_Req(CLIENT, X_QueryBestSize); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default QueryBestSize request\n", CLIENT); - if ((rep = (xQueryBestSizeReply *) Expect_Reply(CLIENT, X_QueryBestSize)) == NULL) { - Log_Err("client %d failed to receive QueryBestSize reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received QueryBestSize reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(rep); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent QueryBestSize request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong QueryBestSize request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/QueryColors/QueryColors.m b/xts5/tset/Xproto/QueryColors/QueryColors.m new file mode 100644 index 00000000..a4cb5b14 --- /dev/null +++ b/xts5/tset/Xproto/QueryColors/QueryColors.m @@ -0,0 +1,272 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/QueryColors/QueryColors.m,v 1.3 2005-11-03 08:44:16 jmichael Exp $ + +Copyright (c) 2001 The Open Group +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/QueryColors/QueryColors.m +>># +>># Description: +>># Tests for QueryColors +>># +>># Modifications: +>># $Log: qryclrs.m,v $ +>># Revision 1.3 2005-11-03 08:44:16 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.2 2005/04/21 09:40:42 ajosey +>># resync to VSW5.1.5 +>># +>># Revision 8.2 2005/01/21 12:09:35 gwc +>># Updated copyright notice +>># +>># Revision 8.1 2001/01/05 17:22:54 vsx +>># TSD4W.00169: changed reply_pixel from unsigned long to CARD32 +>># +>># Revision 8.0 1998/12/23 23:32:59 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:01 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:25 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:58 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:06:30 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:06:09 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE QueryColors Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for QueryColors request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xResourceReq *req; +xAllocNamedColorReply *alloc_reply; +xQueryColorsReply *query_reply; +xError *err; +extern CARD32 reply_pixel; + +/* + intent: send a QueryColors request to the server and check + that the server sent a QueryColors reply back. + input: + output: none + global input: + side effects: creates a window resource + writes to global reply_pixel + methods: +*/ + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + (void) Create_Default_Colormap(CLIENT); + + /* allocate a color and store pixel from reply in global */ + + req = (xResourceReq *) Make_Req(CLIENT, X_AllocNamedColor); + Send_Req(CLIENT, (xReq *) req); + Log_Trace("client %d sent default AllocNamedColor request\n", CLIENT); + if ((alloc_reply = (xAllocNamedColorReply *) Expect_Reply(CLIENT, X_AllocNamedColor)) == NULL) { + Log_Err("client %d failed to receive AllocNamedColor reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received AllocNamedColor reply\n", CLIENT); + } + reply_pixel = alloc_reply->pixel; + (void) Expect_Nothing(CLIENT); + + /* query colors */ + + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_QueryColors); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default QueryColors request\n", CLIENT); + if ((query_reply = (xQueryColorsReply *) Expect_Reply(CLIENT, X_QueryColors)) == NULL) { + Log_Err("client %d failed to receive QueryColors reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received QueryColors reply\n", CLIENT); + Free_Reply(query_reply); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent QueryColors request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong QueryColors request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/QueryColors/XQueryColors.m b/xts5/tset/Xproto/QueryColors/XQueryColors.m deleted file mode 100644 index aba0f75f..00000000 --- a/xts5/tset/Xproto/QueryColors/XQueryColors.m +++ /dev/null @@ -1,272 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XQueryColors/XQueryColors.m,v 1.3 2005-11-03 08:44:16 jmichael Exp $ - -Copyright (c) 2001 The Open Group -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XQueryColors/XQueryColors.m ->># ->># Description: ->># Tests for QueryColors ->># ->># Modifications: ->># $Log: qryclrs.m,v $ ->># Revision 1.3 2005-11-03 08:44:16 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.2 2005/04/21 09:40:42 ajosey ->># resync to VSW5.1.5 ->># ->># Revision 8.2 2005/01/21 12:09:35 gwc ->># Updated copyright notice ->># ->># Revision 8.1 2001/01/05 17:22:54 vsx ->># TSD4W.00169: changed reply_pixel from unsigned long to CARD32 ->># ->># Revision 8.0 1998/12/23 23:32:59 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:01 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:25 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:58 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:06:30 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:06:09 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE QueryColors Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for QueryColors request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xResourceReq *req; -xAllocNamedColorReply *alloc_reply; -xQueryColorsReply *query_reply; -xError *err; -extern CARD32 reply_pixel; - -/* - intent: send a QueryColors request to the server and check - that the server sent a QueryColors reply back. - input: - output: none - global input: - side effects: creates a window resource - writes to global reply_pixel - methods: -*/ - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - (void) Create_Default_Colormap(CLIENT); - - /* allocate a color and store pixel from reply in global */ - - req = (xResourceReq *) Make_Req(CLIENT, X_AllocNamedColor); - Send_Req(CLIENT, (xReq *) req); - Log_Trace("client %d sent default AllocNamedColor request\n", CLIENT); - if ((alloc_reply = (xAllocNamedColorReply *) Expect_Reply(CLIENT, X_AllocNamedColor)) == NULL) { - Log_Err("client %d failed to receive AllocNamedColor reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received AllocNamedColor reply\n", CLIENT); - } - reply_pixel = alloc_reply->pixel; - (void) Expect_Nothing(CLIENT); - - /* query colors */ - - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_QueryColors); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default QueryColors request\n", CLIENT); - if ((query_reply = (xQueryColorsReply *) Expect_Reply(CLIENT, X_QueryColors)) == NULL) { - Log_Err("client %d failed to receive QueryColors reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received QueryColors reply\n", CLIENT); - Free_Reply(query_reply); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent QueryColors request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong QueryColors request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/QueryFont/QueryFont.m b/xts5/tset/Xproto/QueryFont/QueryFont.m new file mode 100644 index 00000000..504dd81c --- /dev/null +++ b/xts5/tset/Xproto/QueryFont/QueryFont.m @@ -0,0 +1,254 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/QueryFont/QueryFont.m,v 1.2 2005-11-03 08:44:17 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/QueryFont/QueryFont.m +>># +>># Description: +>># Tests for QueryFont +>># +>># Modifications: +>># $Log: qryfnt.m,v $ +>># Revision 1.2 2005-11-03 08:44:17 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:01 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:33:00 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:03 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:26 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:59 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:06:33 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:06:14 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE QueryFont Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>SET tpstartup tpfontstartup +>>SET tpcleanup tpfontcleanup +>>EXTERN +/* Touch test for QueryFont request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +Font Default_Font; +xResourceReq *req; +xQueryFontReply *rep; + +static +void +tester() +{ + Set_Init_Timer(); + + Create_Client(CLIENT); + + Default_Font = Create_Default_Font(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_QueryFont); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default QueryFont request\n", CLIENT); + if ((rep = (xQueryFontReply *) Expect_Reply(CLIENT, X_QueryFont)) == NULL) { + Log_Err("client %d failed to receive QueryFont reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received QueryFont reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(rep); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent QueryFont request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong QueryFont request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/QueryFont/XQueryFont.m b/xts5/tset/Xproto/QueryFont/XQueryFont.m deleted file mode 100644 index 8ead2cf2..00000000 --- a/xts5/tset/Xproto/QueryFont/XQueryFont.m +++ /dev/null @@ -1,254 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XQueryFont/XQueryFont.m,v 1.2 2005-11-03 08:44:17 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XQueryFont/XQueryFont.m ->># ->># Description: ->># Tests for QueryFont ->># ->># Modifications: ->># $Log: qryfnt.m,v $ ->># Revision 1.2 2005-11-03 08:44:17 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:01 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:33:00 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:03 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:26 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:59 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:06:33 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:06:14 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE QueryFont Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>SET tpstartup tpfontstartup ->>SET tpcleanup tpfontcleanup ->>EXTERN -/* Touch test for QueryFont request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -Font Default_Font; -xResourceReq *req; -xQueryFontReply *rep; - -static -void -tester() -{ - Set_Init_Timer(); - - Create_Client(CLIENT); - - Default_Font = Create_Default_Font(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_QueryFont); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default QueryFont request\n", CLIENT); - if ((rep = (xQueryFontReply *) Expect_Reply(CLIENT, X_QueryFont)) == NULL) { - Log_Err("client %d failed to receive QueryFont reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received QueryFont reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(rep); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent QueryFont request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong QueryFont request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/QueryKeymap/QueryKeymap.m b/xts5/tset/Xproto/QueryKeymap/QueryKeymap.m new file mode 100644 index 00000000..ac39c42a --- /dev/null +++ b/xts5/tset/Xproto/QueryKeymap/QueryKeymap.m @@ -0,0 +1,247 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/QueryKeymap/QueryKeymap.m,v 1.2 2005-11-03 08:44:17 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/QueryKeymap/QueryKeymap.m +>># +>># Description: +>># Tests for QueryKeymap +>># +>># Modifications: +>># $Log: qrykymp.m,v $ +>># Revision 1.2 2005-11-03 08:44:17 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:01 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:33:00 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:04 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:27 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:20:59 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:06:34 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:06:16 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE QueryKeymap Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for QueryKeymap request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xReq *req; +xQueryKeymapReply *rep; + +static +void +tester() +{ + Create_Client(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xReq *) Make_Req(CLIENT, X_QueryKeymap); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default QueryKeymap request\n", CLIENT); + if ((rep = (xQueryKeymapReply *) Expect_Reply(CLIENT, X_QueryKeymap)) == NULL) { + Log_Err("client %d failed to receive QueryKeymap reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received QueryKeymap reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(rep); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent QueryKeymap request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong QueryKeymap request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/QueryKeymap/XQueryKeymap.m b/xts5/tset/Xproto/QueryKeymap/XQueryKeymap.m deleted file mode 100644 index 993b8d60..00000000 --- a/xts5/tset/Xproto/QueryKeymap/XQueryKeymap.m +++ /dev/null @@ -1,247 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XQueryKeymap/XQueryKeymap.m,v 1.2 2005-11-03 08:44:17 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XQueryKeymap/XQueryKeymap.m ->># ->># Description: ->># Tests for QueryKeymap ->># ->># Modifications: ->># $Log: qrykymp.m,v $ ->># Revision 1.2 2005-11-03 08:44:17 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:01 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:33:00 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:04 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:27 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:20:59 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:06:34 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:06:16 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE QueryKeymap Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for QueryKeymap request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xReq *req; -xQueryKeymapReply *rep; - -static -void -tester() -{ - Create_Client(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xReq *) Make_Req(CLIENT, X_QueryKeymap); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default QueryKeymap request\n", CLIENT); - if ((rep = (xQueryKeymapReply *) Expect_Reply(CLIENT, X_QueryKeymap)) == NULL) { - Log_Err("client %d failed to receive QueryKeymap reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received QueryKeymap reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(rep); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent QueryKeymap request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong QueryKeymap request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/QueryPointer/QueryPointer.m b/xts5/tset/Xproto/QueryPointer/QueryPointer.m new file mode 100644 index 00000000..10f819ad --- /dev/null +++ b/xts5/tset/Xproto/QueryPointer/QueryPointer.m @@ -0,0 +1,249 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/QueryPointer/QueryPointer.m,v 1.2 2005-11-03 08:44:17 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/QueryPointer/QueryPointer.m +>># +>># Description: +>># Tests for QueryPointer +>># +>># Modifications: +>># $Log: qrypntr.m,v $ +>># Revision 1.2 2005-11-03 08:44:17 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:01 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:33:01 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:05 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:27 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:21:00 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:06:36 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:06:20 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE QueryPointer Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for QueryPointer request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xResourceReq *req; +xQueryPointerReply *rep; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_QueryPointer); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default QueryPointer request\n", CLIENT); + if ((rep = (xQueryPointerReply *) Expect_Reply(CLIENT, X_QueryPointer)) == NULL) { + Log_Err("client %d failed to receive QueryPointer reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received QueryPointer reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(rep); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent QueryPointer request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong QueryPointer request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/QueryPointer/XQueryPointer.m b/xts5/tset/Xproto/QueryPointer/XQueryPointer.m deleted file mode 100644 index 0a10836a..00000000 --- a/xts5/tset/Xproto/QueryPointer/XQueryPointer.m +++ /dev/null @@ -1,249 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XQueryPointer/XQueryPointer.m,v 1.2 2005-11-03 08:44:17 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XQueryPointer/XQueryPointer.m ->># ->># Description: ->># Tests for QueryPointer ->># ->># Modifications: ->># $Log: qrypntr.m,v $ ->># Revision 1.2 2005-11-03 08:44:17 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:01 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:33:01 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:05 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:27 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:21:00 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:06:36 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:06:20 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE QueryPointer Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for QueryPointer request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xResourceReq *req; -xQueryPointerReply *rep; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_QueryPointer); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default QueryPointer request\n", CLIENT); - if ((rep = (xQueryPointerReply *) Expect_Reply(CLIENT, X_QueryPointer)) == NULL) { - Log_Err("client %d failed to receive QueryPointer reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received QueryPointer reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(rep); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent QueryPointer request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong QueryPointer request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/QueryTextExtents/QueryTextExtents.m b/xts5/tset/Xproto/QueryTextExtents/QueryTextExtents.m new file mode 100644 index 00000000..5dabe19e --- /dev/null +++ b/xts5/tset/Xproto/QueryTextExtents/QueryTextExtents.m @@ -0,0 +1,240 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/QueryTextExtents/QueryTextExtents.m,v 1.2 2005-11-03 08:44:17 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/QueryTextExtents/QueryTextExtents.m +>># +>># Description: +>># Tests for QueryTextExtents +>># +>># Modifications: +>># $Log: qrytxtextn.m,v $ +>># Revision 1.2 2005-11-03 08:44:17 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:01 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:33:02 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:07 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:28 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:21:01 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:06:38 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:06:24 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE QueryTextExtents Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>SET tpstartup tpfontstartup +>>SET tpcleanup tpfontcleanup +>>EXTERN +/* Touch test for QueryTextExtents request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +Font Default_Font; +xQueryTextExtentsReq *req; +xQueryTextExtentsReply *rep; + +static +void +tester() +{ + Set_Init_Timer(); + + Create_Client(CLIENT); + + Default_Font = Create_Default_Font(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xQueryTextExtentsReq *) Make_Req(CLIENT, X_QueryTextExtents); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default QueryTextExtents request\n", CLIENT); + if ((rep = (xQueryTextExtentsReply *) Expect_Reply(CLIENT, X_QueryTextExtents)) == NULL) { + Log_Err("client %d failed to receive QueryTextExtents reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received QueryTextExtents reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(rep); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent QueryTextExtents request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong QueryTextExtents request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/QueryTextExtents/XQueryTextExtents.m b/xts5/tset/Xproto/QueryTextExtents/XQueryTextExtents.m deleted file mode 100644 index f1916d9e..00000000 --- a/xts5/tset/Xproto/QueryTextExtents/XQueryTextExtents.m +++ /dev/null @@ -1,240 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XQueryTextExtents/XQueryTextExtents.m,v 1.2 2005-11-03 08:44:17 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XQueryTextExtents/XQueryTextExtents.m ->># ->># Description: ->># Tests for QueryTextExtents ->># ->># Modifications: ->># $Log: qrytxtextn.m,v $ ->># Revision 1.2 2005-11-03 08:44:17 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:01 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:33:02 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:07 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:28 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:21:01 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:06:38 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:06:24 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE QueryTextExtents Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>SET tpstartup tpfontstartup ->>SET tpcleanup tpfontcleanup ->>EXTERN -/* Touch test for QueryTextExtents request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -Font Default_Font; -xQueryTextExtentsReq *req; -xQueryTextExtentsReply *rep; - -static -void -tester() -{ - Set_Init_Timer(); - - Create_Client(CLIENT); - - Default_Font = Create_Default_Font(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xQueryTextExtentsReq *) Make_Req(CLIENT, X_QueryTextExtents); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default QueryTextExtents request\n", CLIENT); - if ((rep = (xQueryTextExtentsReply *) Expect_Reply(CLIENT, X_QueryTextExtents)) == NULL) { - Log_Err("client %d failed to receive QueryTextExtents reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received QueryTextExtents reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(rep); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent QueryTextExtents request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong QueryTextExtents request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/QueryTree/QueryTree.m b/xts5/tset/Xproto/QueryTree/QueryTree.m new file mode 100644 index 00000000..1bbbf8c2 --- /dev/null +++ b/xts5/tset/Xproto/QueryTree/QueryTree.m @@ -0,0 +1,249 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/QueryTree/QueryTree.m,v 1.2 2005-11-03 08:44:17 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/QueryTree/QueryTree.m +>># +>># Description: +>># Tests for QueryTree +>># +>># Modifications: +>># $Log: qrytr.m,v $ +>># Revision 1.2 2005-11-03 08:44:17 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:01 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:33:01 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:06 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:28 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:21:00 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:06:37 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:06:22 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE QueryTree Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for QueryTree request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xResourceReq *req; +xQueryTreeReply *rep; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_QueryTree); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default QueryTree request\n", CLIENT); + if ((rep = (xQueryTreeReply *) Expect_Reply(CLIENT, X_QueryTree)) == NULL) { + Log_Err("client %d failed to receive QueryTree reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received QueryTree reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(rep); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent QueryTree request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong QueryTree request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply to the client +with the minimum required length. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/QueryTree/XQueryTree.m b/xts5/tset/Xproto/QueryTree/XQueryTree.m deleted file mode 100644 index 25362982..00000000 --- a/xts5/tset/Xproto/QueryTree/XQueryTree.m +++ /dev/null @@ -1,249 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XQueryTree/XQueryTree.m,v 1.2 2005-11-03 08:44:17 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XQueryTree/XQueryTree.m ->># ->># Description: ->># Tests for QueryTree ->># ->># Modifications: ->># $Log: qrytr.m,v $ ->># Revision 1.2 2005-11-03 08:44:17 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:01 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:33:01 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:06 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:28 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:21:00 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:06:37 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:06:22 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE QueryTree Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for QueryTree request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xResourceReq *req; -xQueryTreeReply *rep; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_QueryTree); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default QueryTree request\n", CLIENT); - if ((rep = (xQueryTreeReply *) Expect_Reply(CLIENT, X_QueryTree)) == NULL) { - Log_Err("client %d failed to receive QueryTree reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received QueryTree reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(rep); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent QueryTree request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong QueryTree request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply to the client -with the minimum required length. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/RecolorCursor/RecolorCursor.m b/xts5/tset/Xproto/RecolorCursor/RecolorCursor.m new file mode 100644 index 00000000..f61f98c2 --- /dev/null +++ b/xts5/tset/Xproto/RecolorCursor/RecolorCursor.m @@ -0,0 +1,241 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/RecolorCursor/RecolorCursor.m,v 1.2 2005-11-03 08:44:17 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/RecolorCursor/RecolorCursor.m +>># +>># Description: +>># Tests for RecolorCursor +>># +>># Modifications: +>># $Log: rclrcrsr.m,v $ +>># Revision 1.2 2005-11-03 08:44:17 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:01 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:33:02 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:08 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:29 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:21:01 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:06:40 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:06:26 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE RecolorCursor Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for RecolorCursor request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xRecolorCursorReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + (void) Create_Default_Cursor_Pixmap(CLIENT); + (void) Create_Default_Cursor(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xRecolorCursorReq *) Make_Req(CLIENT, X_RecolorCursor); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default RecolorCursor request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent RecolorCursor request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong RecolorCursor request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/RecolorCursor/XRecolorCursor.m b/xts5/tset/Xproto/RecolorCursor/XRecolorCursor.m deleted file mode 100644 index 5a1fe43c..00000000 --- a/xts5/tset/Xproto/RecolorCursor/XRecolorCursor.m +++ /dev/null @@ -1,241 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XRecolorCursor/XRecolorCursor.m,v 1.2 2005-11-03 08:44:17 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XRecolorCursor/XRecolorCursor.m ->># ->># Description: ->># Tests for RecolorCursor ->># ->># Modifications: ->># $Log: rclrcrsr.m,v $ ->># Revision 1.2 2005-11-03 08:44:17 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:01 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:33:02 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:08 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:29 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:21:01 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:06:40 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:06:26 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE RecolorCursor Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for RecolorCursor request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xRecolorCursorReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - (void) Create_Default_Cursor_Pixmap(CLIENT); - (void) Create_Default_Cursor(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xRecolorCursorReq *) Make_Req(CLIENT, X_RecolorCursor); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default RecolorCursor request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent RecolorCursor request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong RecolorCursor request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/ReparentWindow/ReparentWindow.m b/xts5/tset/Xproto/ReparentWindow/ReparentWindow.m new file mode 100644 index 00000000..1a18ba89 --- /dev/null +++ b/xts5/tset/Xproto/ReparentWindow/ReparentWindow.m @@ -0,0 +1,252 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/ReparentWindow/ReparentWindow.m,v 1.2 2005-11-03 08:44:18 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/ReparentWindow/ReparentWindow.m +>># +>># Description: +>># Tests for ReparentWindow +>># +>># Modifications: +>># $Log: rprntwdw.m,v $ +>># Revision 1.2 2005-11-03 08:44:18 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:01 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:33:03 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:09 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:29 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:21:02 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:06:41 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:06:29 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE ReparentWindow Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for ReparentWindow request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +Window Default_Window; +xCreateWindowReq *cwr; +xReparentWindowReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + Default_Window = Create_Default_Window(CLIENT); + + cwr = (xCreateWindowReq *) Make_Req(CLIENT, X_CreateWindow); + cwr->parent = Default_Window; + Send_Req(CLIENT, (xReq *) cwr); + Log_Trace("client %d sent additional CreateWindow request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + Default_Window = cwr->wid; + Free_Req(cwr); + + Set_Test_Type(CLIENT, test_type); + req = (xReparentWindowReq *) Make_Req(CLIENT, X_ReparentWindow); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default ReparentWindow request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent ReparentWindow request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong ReparentWindow request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +and the client has no event selected in the +.M event_mask +for any window, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/ReparentWindow/XReparentWindow.m b/xts5/tset/Xproto/ReparentWindow/XReparentWindow.m deleted file mode 100644 index c8ee65f5..00000000 --- a/xts5/tset/Xproto/ReparentWindow/XReparentWindow.m +++ /dev/null @@ -1,252 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XReparentWindow/XReparentWindow.m,v 1.2 2005-11-03 08:44:18 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XReparentWindow/XReparentWindow.m ->># ->># Description: ->># Tests for ReparentWindow ->># ->># Modifications: ->># $Log: rprntwdw.m,v $ ->># Revision 1.2 2005-11-03 08:44:18 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:01 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:33:03 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:09 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:29 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:21:02 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:06:41 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:06:29 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE ReparentWindow Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for ReparentWindow request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -Window Default_Window; -xCreateWindowReq *cwr; -xReparentWindowReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - Default_Window = Create_Default_Window(CLIENT); - - cwr = (xCreateWindowReq *) Make_Req(CLIENT, X_CreateWindow); - cwr->parent = Default_Window; - Send_Req(CLIENT, (xReq *) cwr); - Log_Trace("client %d sent additional CreateWindow request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - Default_Window = cwr->wid; - Free_Req(cwr); - - Set_Test_Type(CLIENT, test_type); - req = (xReparentWindowReq *) Make_Req(CLIENT, X_ReparentWindow); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default ReparentWindow request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent ReparentWindow request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong ReparentWindow request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -and the client has no event selected in the -.M event_mask -for any window, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/SendEvent/SendEvent.m b/xts5/tset/Xproto/SendEvent/SendEvent.m new file mode 100644 index 00000000..0ed64b8c --- /dev/null +++ b/xts5/tset/Xproto/SendEvent/SendEvent.m @@ -0,0 +1,280 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/SendEvent/SendEvent.m,v 1.2 2005-11-03 08:44:19 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/SendEvent/SendEvent.m +>># +>># Description: +>># Tests for SendEvent +>># +>># Modifications: +>># $Log: sndevnt.m,v $ +>># Revision 1.2 2005-11-03 08:44:19 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:01 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:33:04 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:11 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:30 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:21:02 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:06:44 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:06:34 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE SendEvent Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for SendEvent request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xSendEventReq *req; +xEvent *ev; + +/* + * Routine: + * + * Input: + * + * Output: + * + * Returns: + * + * Globals used: + * + * Side Effects: + * + * Methods: + * + */ +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + (void) Create_Default_Atom(CLIENT); + (void) Create_Default_Event(CLIENT, ClientMessage); + + Set_Test_Type(CLIENT, test_type); + req = (xSendEventReq *) Make_Req(CLIENT, X_SendEvent); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default SendEvent request\n", CLIENT); + if ((ev = (xEvent *) Expect_Event(CLIENT, ClientMessage)) == NULL) { + Log_Err("client %d failed to receive ClientMessage\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received ClientMessage\n", CLIENT); + /* Checking here that the MSBit of the event code is ON */ + if (!is_fake(ev->u.u.type)) + Log_Err("client %d Expected MSB set in event type ClientMessage; got %x\n", ev->u.u.type); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent SendEvent request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong SendEvent request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); + } + +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +and +.M event.code +is +.S ClientMessage , +and +.M event_mask +is empty, +and +.M destination +is a window created by the client, +then the X server sends back a +.S ClientMessage +event to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a ClientMessage event. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a ClientMessage event. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/SendEvent/XSendEvent.m b/xts5/tset/Xproto/SendEvent/XSendEvent.m deleted file mode 100644 index 06c26f70..00000000 --- a/xts5/tset/Xproto/SendEvent/XSendEvent.m +++ /dev/null @@ -1,280 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XSendEvent/XSendEvent.m,v 1.2 2005-11-03 08:44:19 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XSendEvent/XSendEvent.m ->># ->># Description: ->># Tests for SendEvent ->># ->># Modifications: ->># $Log: sndevnt.m,v $ ->># Revision 1.2 2005-11-03 08:44:19 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:01 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:33:04 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:11 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:30 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:21:02 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:06:44 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:06:34 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE SendEvent Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for SendEvent request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xSendEventReq *req; -xEvent *ev; - -/* - * Routine: - * - * Input: - * - * Output: - * - * Returns: - * - * Globals used: - * - * Side Effects: - * - * Methods: - * - */ -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - (void) Create_Default_Atom(CLIENT); - (void) Create_Default_Event(CLIENT, ClientMessage); - - Set_Test_Type(CLIENT, test_type); - req = (xSendEventReq *) Make_Req(CLIENT, X_SendEvent); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default SendEvent request\n", CLIENT); - if ((ev = (xEvent *) Expect_Event(CLIENT, ClientMessage)) == NULL) { - Log_Err("client %d failed to receive ClientMessage\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received ClientMessage\n", CLIENT); - /* Checking here that the MSBit of the event code is ON */ - if (!is_fake(ev->u.u.type)) - Log_Err("client %d Expected MSB set in event type ClientMessage; got %x\n", ev->u.u.type); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent SendEvent request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong SendEvent request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); - } - ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -and -.M event.code -is -.S ClientMessage , -and -.M event_mask -is empty, -and -.M destination -is a window created by the client, -then the X server sends back a -.S ClientMessage -event to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a ClientMessage event. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a ClientMessage event. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/SetAccessControl/SetAccessControl.m b/xts5/tset/Xproto/SetAccessControl/SetAccessControl.m new file mode 100644 index 00000000..e6866825 --- /dev/null +++ b/xts5/tset/Xproto/SetAccessControl/SetAccessControl.m @@ -0,0 +1,238 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/SetAccessControl/SetAccessControl.m,v 1.2 2005-11-03 08:44:19 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/SetAccessControl/SetAccessControl.m +>># +>># Description: +>># Tests for SetAccessControl +>># +>># Modifications: +>># $Log: staccsscnt.m,v $ +>># Revision 1.2 2005-11-03 08:44:19 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:01 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:33:04 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:12 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:31 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:21:03 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:06:45 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:06:36 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE SetAccessControl Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for SetAccessControl request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xSetAccessControlReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xSetAccessControlReq *) Make_Req(CLIENT, X_SetAccessControl); + req->mode = DisableAccess; + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default SetAccessControl request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent SetAccessControl request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong SetAccessControl request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/SetAccessControl/XSetAccessControl.m b/xts5/tset/Xproto/SetAccessControl/XSetAccessControl.m deleted file mode 100644 index 85331f0b..00000000 --- a/xts5/tset/Xproto/SetAccessControl/XSetAccessControl.m +++ /dev/null @@ -1,238 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XSetAccessControl/XSetAccessControl.m,v 1.2 2005-11-03 08:44:19 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XSetAccessControl/XSetAccessControl.m ->># ->># Description: ->># Tests for SetAccessControl ->># ->># Modifications: ->># $Log: staccsscnt.m,v $ ->># Revision 1.2 2005-11-03 08:44:19 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:01 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:33:04 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:12 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:31 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:21:03 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:06:45 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:06:36 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE SetAccessControl Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for SetAccessControl request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xSetAccessControlReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xSetAccessControlReq *) Make_Req(CLIENT, X_SetAccessControl); - req->mode = DisableAccess; - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default SetAccessControl request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent SetAccessControl request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong SetAccessControl request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/SetClipRectangles/SetClipRectangles.m b/xts5/tset/Xproto/SetClipRectangles/SetClipRectangles.m new file mode 100644 index 00000000..68b745d2 --- /dev/null +++ b/xts5/tset/Xproto/SetClipRectangles/SetClipRectangles.m @@ -0,0 +1,240 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/SetClipRectangles/SetClipRectangles.m,v 1.2 2005-11-03 08:44:19 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/SetClipRectangles/SetClipRectangles.m +>># +>># Description: +>># Tests for SetClipRectangles +>># +>># Modifications: +>># $Log: stclprctng.m,v $ +>># Revision 1.2 2005-11-03 08:44:19 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:01 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:33:05 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:14 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:31 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:21:03 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:06:47 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:06:39 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE SetClipRectangles Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for SetClipRectangles request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xSetClipRectanglesReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + (void) Create_Default_GContext(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xSetClipRectanglesReq *) Make_Req(CLIENT, X_SetClipRectangles); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default SetClipRectangles request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent SetClipRectangles request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong SetClipRectangles request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/SetClipRectangles/XSetClipRectangles.m b/xts5/tset/Xproto/SetClipRectangles/XSetClipRectangles.m deleted file mode 100644 index 9fb5ff05..00000000 --- a/xts5/tset/Xproto/SetClipRectangles/XSetClipRectangles.m +++ /dev/null @@ -1,240 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XSetClipRectangles/XSetClipRectangles.m,v 1.2 2005-11-03 08:44:19 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XSetClipRectangles/XSetClipRectangles.m ->># ->># Description: ->># Tests for SetClipRectangles ->># ->># Modifications: ->># $Log: stclprctng.m,v $ ->># Revision 1.2 2005-11-03 08:44:19 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:01 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:33:05 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:14 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:31 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:21:03 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:06:47 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:06:39 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE SetClipRectangles Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for SetClipRectangles request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xSetClipRectanglesReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - (void) Create_Default_GContext(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xSetClipRectanglesReq *) Make_Req(CLIENT, X_SetClipRectangles); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default SetClipRectangles request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent SetClipRectangles request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong SetClipRectangles request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/SetCloseDownMode/SetCloseDownMode.m b/xts5/tset/Xproto/SetCloseDownMode/SetCloseDownMode.m new file mode 100644 index 00000000..fbf52c27 --- /dev/null +++ b/xts5/tset/Xproto/SetCloseDownMode/SetCloseDownMode.m @@ -0,0 +1,238 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/SetCloseDownMode/SetCloseDownMode.m,v 1.2 2005-11-03 08:44:20 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/SetCloseDownMode/SetCloseDownMode.m +>># +>># Description: +>># Tests for SetCloseDownMode +>># +>># Modifications: +>># $Log: stclsdwnmd.m,v $ +>># Revision 1.2 2005-11-03 08:44:20 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:01 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:33:05 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:15 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:32 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:21:04 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:06:48 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:06:41 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE SetCloseDownMode Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for SetCloseDownMode request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xSetCloseDownModeReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xSetCloseDownModeReq *) Make_Req(CLIENT, X_SetCloseDownMode); + req->mode = RetainPermanent; + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default SetCloseDownMode request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent SetCloseDownMode request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong SetCloseDownMode request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/SetCloseDownMode/XSetCloseDownMode.m b/xts5/tset/Xproto/SetCloseDownMode/XSetCloseDownMode.m deleted file mode 100644 index 54798ae3..00000000 --- a/xts5/tset/Xproto/SetCloseDownMode/XSetCloseDownMode.m +++ /dev/null @@ -1,238 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XSetCloseDownMode/XSetCloseDownMode.m,v 1.2 2005-11-03 08:44:20 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XSetCloseDownMode/XSetCloseDownMode.m ->># ->># Description: ->># Tests for SetCloseDownMode ->># ->># Modifications: ->># $Log: stclsdwnmd.m,v $ ->># Revision 1.2 2005-11-03 08:44:20 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:01 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:33:05 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:15 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:32 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:21:04 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:06:48 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:06:41 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE SetCloseDownMode Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for SetCloseDownMode request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xSetCloseDownModeReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xSetCloseDownModeReq *) Make_Req(CLIENT, X_SetCloseDownMode); - req->mode = RetainPermanent; - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default SetCloseDownMode request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent SetCloseDownMode request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong SetCloseDownMode request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/SetDashes/SetDashes.m b/xts5/tset/Xproto/SetDashes/SetDashes.m new file mode 100644 index 00000000..589d98ec --- /dev/null +++ b/xts5/tset/Xproto/SetDashes/SetDashes.m @@ -0,0 +1,240 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/SetDashes/SetDashes.m,v 1.2 2005-11-03 08:44:20 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/SetDashes/SetDashes.m +>># +>># Description: +>># Tests for SetDashes +>># +>># Modifications: +>># $Log: stdshs.m,v $ +>># Revision 1.2 2005-11-03 08:44:20 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:01 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:33:06 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:16 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:32 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:21:04 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:06:49 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:06:43 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE SetDashes Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for SetDashes request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xSetDashesReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + (void) Create_Default_GContext(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xSetDashesReq *) Make_Req(CLIENT, X_SetDashes); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default SetDashes request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent SetDashes request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong SetDashes request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/SetDashes/XSetDashes.m b/xts5/tset/Xproto/SetDashes/XSetDashes.m deleted file mode 100644 index 747a06f4..00000000 --- a/xts5/tset/Xproto/SetDashes/XSetDashes.m +++ /dev/null @@ -1,240 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XSetDashes/XSetDashes.m,v 1.2 2005-11-03 08:44:20 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XSetDashes/XSetDashes.m ->># ->># Description: ->># Tests for SetDashes ->># ->># Modifications: ->># $Log: stdshs.m,v $ ->># Revision 1.2 2005-11-03 08:44:20 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:01 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:33:06 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:16 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:32 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:21:04 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:06:49 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:06:43 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE SetDashes Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for SetDashes request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xSetDashesReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - (void) Create_Default_GContext(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xSetDashesReq *) Make_Req(CLIENT, X_SetDashes); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default SetDashes request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent SetDashes request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong SetDashes request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/SetFontPath/SetFontPath.m b/xts5/tset/Xproto/SetFontPath/SetFontPath.m new file mode 100644 index 00000000..8e906c21 --- /dev/null +++ b/xts5/tset/Xproto/SetFontPath/SetFontPath.m @@ -0,0 +1,237 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/SetFontPath/SetFontPath.m,v 1.2 2005-11-03 08:44:20 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/SetFontPath/SetFontPath.m +>># +>># Description: +>># Tests for SetFontPath +>># +>># Modifications: +>># $Log: stfntpth.m,v $ +>># Revision 1.2 2005-11-03 08:44:20 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:01 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:33:06 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:17 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:33 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:21:05 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:06:51 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:06:46 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE SetFontPath Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for SetFontPath request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xSetFontPathReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xSetFontPathReq *) Make_Req(CLIENT, X_SetFontPath); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default SetFontPath request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent SetFontPath request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong SetFontPath request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/SetFontPath/XSetFontPath.m b/xts5/tset/Xproto/SetFontPath/XSetFontPath.m deleted file mode 100644 index 859d4f33..00000000 --- a/xts5/tset/Xproto/SetFontPath/XSetFontPath.m +++ /dev/null @@ -1,237 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XSetFontPath/XSetFontPath.m,v 1.2 2005-11-03 08:44:20 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XSetFontPath/XSetFontPath.m ->># ->># Description: ->># Tests for SetFontPath ->># ->># Modifications: ->># $Log: stfntpth.m,v $ ->># Revision 1.2 2005-11-03 08:44:20 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:01 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:33:06 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:17 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:33 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:21:05 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:06:51 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:06:46 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE SetFontPath Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for SetFontPath request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xSetFontPathReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xSetFontPathReq *) Make_Req(CLIENT, X_SetFontPath); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default SetFontPath request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent SetFontPath request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong SetFontPath request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/SetInputFocus/SetInputFocus.m b/xts5/tset/Xproto/SetInputFocus/SetInputFocus.m new file mode 100644 index 00000000..b01e071d --- /dev/null +++ b/xts5/tset/Xproto/SetInputFocus/SetInputFocus.m @@ -0,0 +1,254 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/SetInputFocus/SetInputFocus.m,v 1.2 2005-11-03 08:44:20 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/SetInputFocus/SetInputFocus.m +>># +>># Description: +>># Tests for SetInputFocus +>># +>># Modifications: +>># $Log: stinptfcs.m,v $ +>># Revision 1.2 2005-11-03 08:44:20 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:01 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:33:07 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:18 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:33 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:21:05 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:06:52 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:06:48 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE SetInputFocus Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for SetInputFocus request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xReq *gifr; +xGetInputFocusReply *gifrep; +xSetInputFocusReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + gifr = (xReq *) Make_Req(CLIENT, X_GetInputFocus); + Send_Req(CLIENT, (xReq *) gifr); + Log_Trace("client %d sent default GetInputFocus\n", CLIENT); + + if ((gifrep = (xGetInputFocusReply *) Expect_Reply(CLIENT, X_GetInputFocus)) == NULL) { + Log_Err("client %d failed to receive GetInputFocus reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received GetInputFocus reply\n", CLIENT); + /* do any reply checking here */ + } + (void) Expect_Nothing(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xSetInputFocusReq *) Make_Req(CLIENT, X_SetInputFocus); + req->revertTo = gifrep->revertTo; + req->focus = gifrep->focus; + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default SetInputFocus request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent SetInputFocus request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong SetInputFocus request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/SetInputFocus/XSetInputFocus.m b/xts5/tset/Xproto/SetInputFocus/XSetInputFocus.m deleted file mode 100644 index 5a01de94..00000000 --- a/xts5/tset/Xproto/SetInputFocus/XSetInputFocus.m +++ /dev/null @@ -1,254 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XSetInputFocus/XSetInputFocus.m,v 1.2 2005-11-03 08:44:20 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XSetInputFocus/XSetInputFocus.m ->># ->># Description: ->># Tests for SetInputFocus ->># ->># Modifications: ->># $Log: stinptfcs.m,v $ ->># Revision 1.2 2005-11-03 08:44:20 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:01 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:33:07 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:18 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:33 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:21:05 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:06:52 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:06:48 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE SetInputFocus Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for SetInputFocus request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xReq *gifr; -xGetInputFocusReply *gifrep; -xSetInputFocusReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - gifr = (xReq *) Make_Req(CLIENT, X_GetInputFocus); - Send_Req(CLIENT, (xReq *) gifr); - Log_Trace("client %d sent default GetInputFocus\n", CLIENT); - - if ((gifrep = (xGetInputFocusReply *) Expect_Reply(CLIENT, X_GetInputFocus)) == NULL) { - Log_Err("client %d failed to receive GetInputFocus reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received GetInputFocus reply\n", CLIENT); - /* do any reply checking here */ - } - (void) Expect_Nothing(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xSetInputFocusReq *) Make_Req(CLIENT, X_SetInputFocus); - req->revertTo = gifrep->revertTo; - req->focus = gifrep->focus; - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default SetInputFocus request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent SetInputFocus request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong SetInputFocus request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/SetModifierMapping/SetModifierMapping.m b/xts5/tset/Xproto/SetModifierMapping/SetModifierMapping.m new file mode 100644 index 00000000..132cde2b --- /dev/null +++ b/xts5/tset/Xproto/SetModifierMapping/SetModifierMapping.m @@ -0,0 +1,291 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/SetModifierMapping/SetModifierMapping.m,v 1.2 2005-11-03 08:44:21 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/SetModifierMapping/SetModifierMapping.m +>># +>># Description: +>># Tests for SetModifierMapping +>># +>># Modifications: +>># $Log: stmdfrmppn.m,v $ +>># Revision 1.2 2005-11-03 08:44:21 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:01 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:33:08 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:20 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:34 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:21:06 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:06:55 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:06:53 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE SetModifierMapping Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for SetModifierMapping request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xReq *gmmr; +xGetModifierMappingReply *gmmrep; +xSetModifierMappingReq *req; +xSetModifierMappingReply *rep; +xEvent *ev; + +static +void +tester() +{ + Create_Client(CLIENT); + + /* Get the existing mapping... */ + + gmmr = (xReq *) Make_Req(CLIENT, X_GetModifierMapping); + Send_Req(CLIENT, (xReq *) gmmr); + Log_Trace("client %d sent default GetModifierMapping request\n", CLIENT); + + if ((gmmrep = (xGetModifierMappingReply *) Expect_Reply(CLIENT, X_GetModifierMapping)) == NULL) { + Log_Err("client %d failed to receive GetModifierMapping reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received GetModifierMapping reply\n", CLIENT); + /* do any reply checking here */ + } + (void) Expect_Nothing(CLIENT); + Free_Req(gmmr); + + /* ... then make a request to duplicate that mapping. */ + + Set_Test_Type(CLIENT, test_type); + req = (xSetModifierMappingReq *) Make_Req(CLIENT, X_SetModifierMapping); + req->numKeyPerModifier = gmmrep->numKeyPerModifier; + req->length += 2*req->numKeyPerModifier; + req = (xSetModifierMappingReq *) Xstrealloc((char *) req, req->length<<2); + { + unsigned char *p, *q, *r; + + p = (unsigned char *) (gmmrep + 1); + q = (unsigned char *) (req + 1); + r = ((unsigned char *)req) + (int)(req->length<<2); + while (q < r) + *q++ = *p++; + } + + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default SetModifierMapping request\n", CLIENT); + if ((ev = (xEvent *) Expect_Event(CLIENT, MappingNotify)) == NULL) { + Log_Err("client %d failed to receive MappingNotify\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received MappingNotify\n", CLIENT); + /* do any event checking here */ + Free_Event(ev); + } + if ((rep = (xSetModifierMappingReply *) Expect_Reply(CLIENT, X_SetModifierMapping)) == NULL) { + Log_Err("client %d failed to receive SetModifierMapping reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received SetModifierMapping reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(rep); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent SetModifierMapping request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong SetModifierMapping request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply and a +.S MappingNotify +event to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply and a MappingNotify event. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply and a MappingNotify event. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request +plus zero or more keycode groups, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request + zero keycode groups. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request + zero keycode groups. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request + n keycode groups. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request + n keycode groups. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum + n keycode groups */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/SetModifierMapping/XSetModifierMapping.m b/xts5/tset/Xproto/SetModifierMapping/XSetModifierMapping.m deleted file mode 100644 index 2346b097..00000000 --- a/xts5/tset/Xproto/SetModifierMapping/XSetModifierMapping.m +++ /dev/null @@ -1,291 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XSetModifierMapping/XSetModifierMapping.m,v 1.2 2005-11-03 08:44:21 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XSetModifierMapping/XSetModifierMapping.m ->># ->># Description: ->># Tests for SetModifierMapping ->># ->># Modifications: ->># $Log: stmdfrmppn.m,v $ ->># Revision 1.2 2005-11-03 08:44:21 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:01 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:33:08 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:20 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:34 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:21:06 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:06:55 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:06:53 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE SetModifierMapping Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for SetModifierMapping request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xReq *gmmr; -xGetModifierMappingReply *gmmrep; -xSetModifierMappingReq *req; -xSetModifierMappingReply *rep; -xEvent *ev; - -static -void -tester() -{ - Create_Client(CLIENT); - - /* Get the existing mapping... */ - - gmmr = (xReq *) Make_Req(CLIENT, X_GetModifierMapping); - Send_Req(CLIENT, (xReq *) gmmr); - Log_Trace("client %d sent default GetModifierMapping request\n", CLIENT); - - if ((gmmrep = (xGetModifierMappingReply *) Expect_Reply(CLIENT, X_GetModifierMapping)) == NULL) { - Log_Err("client %d failed to receive GetModifierMapping reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received GetModifierMapping reply\n", CLIENT); - /* do any reply checking here */ - } - (void) Expect_Nothing(CLIENT); - Free_Req(gmmr); - - /* ... then make a request to duplicate that mapping. */ - - Set_Test_Type(CLIENT, test_type); - req = (xSetModifierMappingReq *) Make_Req(CLIENT, X_SetModifierMapping); - req->numKeyPerModifier = gmmrep->numKeyPerModifier; - req->length += 2*req->numKeyPerModifier; - req = (xSetModifierMappingReq *) Xstrealloc((char *) req, req->length<<2); - { - unsigned char *p, *q, *r; - - p = (unsigned char *) (gmmrep + 1); - q = (unsigned char *) (req + 1); - r = ((unsigned char *)req) + (int)(req->length<<2); - while (q < r) - *q++ = *p++; - } - - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default SetModifierMapping request\n", CLIENT); - if ((ev = (xEvent *) Expect_Event(CLIENT, MappingNotify)) == NULL) { - Log_Err("client %d failed to receive MappingNotify\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received MappingNotify\n", CLIENT); - /* do any event checking here */ - Free_Event(ev); - } - if ((rep = (xSetModifierMappingReply *) Expect_Reply(CLIENT, X_SetModifierMapping)) == NULL) { - Log_Err("client %d failed to receive SetModifierMapping reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received SetModifierMapping reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(rep); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent SetModifierMapping request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong SetModifierMapping request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply and a -.S MappingNotify -event to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply and a MappingNotify event. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply and a MappingNotify event. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request -plus zero or more keycode groups, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request + zero keycode groups. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request + zero keycode groups. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request + n keycode groups. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request + n keycode groups. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum + n keycode groups */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/SetPointerMapping/SetPointerMapping.m b/xts5/tset/Xproto/SetPointerMapping/SetPointerMapping.m new file mode 100644 index 00000000..2f0ae801 --- /dev/null +++ b/xts5/tset/Xproto/SetPointerMapping/SetPointerMapping.m @@ -0,0 +1,285 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/SetPointerMapping/SetPointerMapping.m,v 1.2 2005-11-03 08:44:21 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/SetPointerMapping/SetPointerMapping.m +>># +>># Description: +>># Tests for SetPointerMapping +>># +>># Modifications: +>># $Log: stpntrmppn.m,v $ +>># Revision 1.2 2005-11-03 08:44:21 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:01 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:33:08 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:21 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:35 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:21:07 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:06:56 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:06:55 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE SetPointerMapping Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for SetPointerMapping request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xReq *gpmr; +xGetPointerMappingReply *gpmrep; +xSetPointerMappingReq *req; +xSetPointerMappingReply *rep; +xEvent *ev; + +static +void +tester() +{ + Create_Client(CLIENT); + + gpmr = (xReq *) Make_Req(CLIENT, X_GetPointerMapping); + Send_Req(CLIENT, (xReq *) gpmr); + Log_Trace("client %d sent default GetPointerMapping request\n", CLIENT); + + if ((gpmrep = (xGetPointerMappingReply *) Expect_Reply(CLIENT, X_GetPointerMapping)) == NULL) { + Log_Err("client %d failed to receive GetPointerMapping reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received GetPointerMapping reply\n", CLIENT); + /* do any reply checking here */ + } + (void) Expect_Nothing(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xSetPointerMappingReq *) Make_Req(CLIENT, X_SetPointerMapping); + req->nElts = gpmrep->nElts; + req->length += ((3 + req->nElts) >> 2); + req = (xSetPointerMappingReq *) Xstrealloc((char *) req, req->length<<2); + { + unsigned char *p, *q, *r; + + p = (unsigned char *) (gpmrep + 1); + q = (unsigned char *) (req + 1); + r = ((unsigned char *)req) + (int)(req->length<<2); + while (q < r) + *q++ = *p++; + } + + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default SetPointerMapping request\n", CLIENT); + if ((ev = (xEvent *) Expect_Event(CLIENT, MappingNotify)) == NULL) { + Log_Err("client %d failed to receive MappingNotify\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received MappingNotify\n", CLIENT); + /* do any event checking here */ + Free_Event(ev); + } + if ((rep = (xSetPointerMappingReply *) Expect_Reply(CLIENT, X_SetPointerMapping)) == NULL) { + Log_Err("client %d failed to receive SetPointerMapping reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received SetPointerMapping reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(rep); + } + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent SetPointerMapping request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong SetPointerMapping request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server sends back a reply and a +.S MappingNotify +event to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply and a MappingNotify event. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a reply and a MappingNotify event. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/SetPointerMapping/XSetPointerMapping.m b/xts5/tset/Xproto/SetPointerMapping/XSetPointerMapping.m deleted file mode 100644 index f7126a28..00000000 --- a/xts5/tset/Xproto/SetPointerMapping/XSetPointerMapping.m +++ /dev/null @@ -1,285 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XSetPointerMapping/XSetPointerMapping.m,v 1.2 2005-11-03 08:44:21 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XSetPointerMapping/XSetPointerMapping.m ->># ->># Description: ->># Tests for SetPointerMapping ->># ->># Modifications: ->># $Log: stpntrmppn.m,v $ ->># Revision 1.2 2005-11-03 08:44:21 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:01 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:33:08 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:21 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:35 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:21:07 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:06:56 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:06:55 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE SetPointerMapping Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for SetPointerMapping request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xReq *gpmr; -xGetPointerMappingReply *gpmrep; -xSetPointerMappingReq *req; -xSetPointerMappingReply *rep; -xEvent *ev; - -static -void -tester() -{ - Create_Client(CLIENT); - - gpmr = (xReq *) Make_Req(CLIENT, X_GetPointerMapping); - Send_Req(CLIENT, (xReq *) gpmr); - Log_Trace("client %d sent default GetPointerMapping request\n", CLIENT); - - if ((gpmrep = (xGetPointerMappingReply *) Expect_Reply(CLIENT, X_GetPointerMapping)) == NULL) { - Log_Err("client %d failed to receive GetPointerMapping reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received GetPointerMapping reply\n", CLIENT); - /* do any reply checking here */ - } - (void) Expect_Nothing(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xSetPointerMappingReq *) Make_Req(CLIENT, X_SetPointerMapping); - req->nElts = gpmrep->nElts; - req->length += ((3 + req->nElts) >> 2); - req = (xSetPointerMappingReq *) Xstrealloc((char *) req, req->length<<2); - { - unsigned char *p, *q, *r; - - p = (unsigned char *) (gpmrep + 1); - q = (unsigned char *) (req + 1); - r = ((unsigned char *)req) + (int)(req->length<<2); - while (q < r) - *q++ = *p++; - } - - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default SetPointerMapping request\n", CLIENT); - if ((ev = (xEvent *) Expect_Event(CLIENT, MappingNotify)) == NULL) { - Log_Err("client %d failed to receive MappingNotify\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received MappingNotify\n", CLIENT); - /* do any event checking here */ - Free_Event(ev); - } - if ((rep = (xSetPointerMappingReply *) Expect_Reply(CLIENT, X_SetPointerMapping)) == NULL) { - Log_Err("client %d failed to receive SetPointerMapping reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received SetPointerMapping reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(rep); - } - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent SetPointerMapping request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong SetPointerMapping request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server sends back a reply and a -.S MappingNotify -event to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply and a MappingNotify event. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a reply and a MappingNotify event. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/SetScreenSaver/SetScreenSaver.m b/xts5/tset/Xproto/SetScreenSaver/SetScreenSaver.m new file mode 100644 index 00000000..f2bfd219 --- /dev/null +++ b/xts5/tset/Xproto/SetScreenSaver/SetScreenSaver.m @@ -0,0 +1,256 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/SetScreenSaver/SetScreenSaver.m,v 1.2 2005-11-03 08:44:22 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/SetScreenSaver/SetScreenSaver.m +>># +>># Description: +>># Tests for SetScreenSaver +>># +>># Modifications: +>># $Log: stscrnsvr.m,v $ +>># Revision 1.2 2005-11-03 08:44:22 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:02 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:33:09 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:23 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:35 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:21:08 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:07:00 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:07:00 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE SetScreenSaver Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for SetScreenSaver request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xReq *gssr; +xGetScreenSaverReply *gssrep; +xSetScreenSaverReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + gssr = (xReq *) Make_Req(CLIENT, X_GetScreenSaver); + Send_Req(CLIENT, (xReq *) gssr); + Log_Trace("client %d sent default GetScreenSaver request\n", CLIENT); + + if ((gssrep = (xGetScreenSaverReply *) Expect_Reply(CLIENT, X_GetScreenSaver)) == NULL) { + Log_Err("client %d failed to receive GetScreenSaver reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received GetScreenSaver reply\n", CLIENT); + /* do any reply checking here */ + } + (void) Expect_Nothing(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xSetScreenSaverReq *) Make_Req(CLIENT, X_SetScreenSaver); + req->timeout = gssrep->timeout; + req->interval = gssrep->interval; + req->preferBlank = gssrep->preferBlanking; + req->allowExpose = gssrep->allowExposures; + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default SetScreenSaver request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent SetScreenSaver request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong SetScreenSaver request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/SetScreenSaver/XSetScreenSaver.m b/xts5/tset/Xproto/SetScreenSaver/XSetScreenSaver.m deleted file mode 100644 index 74d7ae09..00000000 --- a/xts5/tset/Xproto/SetScreenSaver/XSetScreenSaver.m +++ /dev/null @@ -1,256 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XSetScreenSaver/XSetScreenSaver.m,v 1.2 2005-11-03 08:44:22 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XSetScreenSaver/XSetScreenSaver.m ->># ->># Description: ->># Tests for SetScreenSaver ->># ->># Modifications: ->># $Log: stscrnsvr.m,v $ ->># Revision 1.2 2005-11-03 08:44:22 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:02 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:33:09 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:23 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:35 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:21:08 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:07:00 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:07:00 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE SetScreenSaver Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for SetScreenSaver request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xReq *gssr; -xGetScreenSaverReply *gssrep; -xSetScreenSaverReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - gssr = (xReq *) Make_Req(CLIENT, X_GetScreenSaver); - Send_Req(CLIENT, (xReq *) gssr); - Log_Trace("client %d sent default GetScreenSaver request\n", CLIENT); - - if ((gssrep = (xGetScreenSaverReply *) Expect_Reply(CLIENT, X_GetScreenSaver)) == NULL) { - Log_Err("client %d failed to receive GetScreenSaver reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received GetScreenSaver reply\n", CLIENT); - /* do any reply checking here */ - } - (void) Expect_Nothing(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xSetScreenSaverReq *) Make_Req(CLIENT, X_SetScreenSaver); - req->timeout = gssrep->timeout; - req->interval = gssrep->interval; - req->preferBlank = gssrep->preferBlanking; - req->allowExpose = gssrep->allowExposures; - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default SetScreenSaver request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent SetScreenSaver request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong SetScreenSaver request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/SetSelectionOwner/SetSelectionOwner.m b/xts5/tset/Xproto/SetSelectionOwner/SetSelectionOwner.m new file mode 100644 index 00000000..1e6a39a4 --- /dev/null +++ b/xts5/tset/Xproto/SetSelectionOwner/SetSelectionOwner.m @@ -0,0 +1,242 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/SetSelectionOwner/SetSelectionOwner.m,v 1.2 2005-11-03 08:44:22 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/SetSelectionOwner/SetSelectionOwner.m +>># +>># Description: +>># Tests for SetSelectionOwner +>># +>># Modifications: +>># $Log: stslctnown.m,v $ +>># Revision 1.2 2005-11-03 08:44:22 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:02 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:33:10 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:24 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:36 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:21:08 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:07:01 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:07:02 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE SetSelectionOwner Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for SetSelectionOwner request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +Atom Test_Property; +xSetSelectionOwnerReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + Test_Property = Create_Default_Atom(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xSetSelectionOwnerReq *) Make_Req(CLIENT, X_SetSelectionOwner); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default SetSelectionOwner request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent SetSelectionOwner request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong SetSelectionOwner request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +and the client does not currently own the selection, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/SetSelectionOwner/XSetSelectionOwner.m b/xts5/tset/Xproto/SetSelectionOwner/XSetSelectionOwner.m deleted file mode 100644 index 3dcbfe24..00000000 --- a/xts5/tset/Xproto/SetSelectionOwner/XSetSelectionOwner.m +++ /dev/null @@ -1,242 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XSetSelectionOwner/XSetSelectionOwner.m,v 1.2 2005-11-03 08:44:22 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XSetSelectionOwner/XSetSelectionOwner.m ->># ->># Description: ->># Tests for SetSelectionOwner ->># ->># Modifications: ->># $Log: stslctnown.m,v $ ->># Revision 1.2 2005-11-03 08:44:22 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:02 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:33:10 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:24 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:36 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:21:08 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:07:01 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:07:02 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE SetSelectionOwner Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for SetSelectionOwner request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -Atom Test_Property; -xSetSelectionOwnerReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - Test_Property = Create_Default_Atom(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xSetSelectionOwnerReq *) Make_Req(CLIENT, X_SetSelectionOwner); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default SetSelectionOwner request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent SetSelectionOwner request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong SetSelectionOwner request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -and the client does not currently own the selection, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/StoreColors/StoreColors.m b/xts5/tset/Xproto/StoreColors/StoreColors.m new file mode 100644 index 00000000..49532022 --- /dev/null +++ b/xts5/tset/Xproto/StoreColors/StoreColors.m @@ -0,0 +1,372 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/StoreColors/StoreColors.m,v 1.3 2005-11-03 08:44:21 jmichael Exp $ + +Copyright (c) 2001 The Open Group +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/StoreColors/StoreColors.m +>># +>># Description: +>># Tests for StoreColors +>># +>># Modifications: +>># $Log: strclrs.m,v $ +>># Revision 1.3 2005-11-03 08:44:21 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.2 2005/04/21 09:40:42 ajosey +>># resync to VSW5.1.5 +>># +>># Revision 8.2 2005/01/21 12:10:18 gwc +>># Updated copyright notice +>># +>># Revision 8.1 2001/01/05 17:20:26 vsx +>># TSD4W.00169: changed reply_pixel from unsigned long to CARD32 +>># +>># Revision 8.0 1998/12/23 23:33:07 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:19 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:34 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:21:06 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:06:53 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:06:50 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE StoreColors Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for StoreColors request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xResourceReq *req; +xAllocColorCellsReply *acreply; +xAllocNamedColorReply *anreply; +xError *err; +extern CARD32 reply_pixel; + +/* + intent: If a read-write color cell can be allocated: + Allocate read-write cell by sending an AllocColorCells request, + send a StoreColors request to the server and check no errors, + input: + output: none + global input: + side effects: creates a window resource + writes to global reply_pixel + methods: +*/ + +static +void +tester_rw() +{ + Create_Client(CLIENT); + if (!Allocatable (CLIENT)) { + unsupported("The visual class for screen zero is not writable"); + Exit_OK(); + } + + (void) Create_Default_Window(CLIENT); + (void) Create_Default_Colormap(CLIENT); + + /* allocate a color and store pixel from reply in global */ + + req = (xResourceReq *) Make_Req(CLIENT, X_AllocColorCells); + Send_Req(CLIENT, (xReq *) req); + Log_Trace("client %d sent default AllocColorCells request\n", CLIENT); + if ((acreply = (xAllocColorCellsReply *) Expect_Reply(CLIENT, X_AllocColorCells)) == NULL) { + Log_Err("client %d failed to receive AllocColorCells reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received AllocColorCells reply\n", CLIENT); + /* + * This line gets the first pixel value OR'd with + * zero of the returned masks + */ + reply_pixel = *(CARD32 *)(acreply + 1); + Free_Reply(acreply); + } + + (void) Expect_Nothing(CLIENT); + Free_Req(req); + + /* store a color in the pixel from the reply */ + + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_StoreColors); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + Log_Trace("client %d sent default StoreColors request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + Free_Req(req); + + Exit_OK(); +} + +/* + intent: Allocate read-only cell by sending an AllocNamedColor request, + send a StoreColors request to the server and check + that a BadAccess error is sent back. + input: + output: none + global input: + side effects: creates a window resource + writes to global reply_pixel + methods: +*/ +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + (void) Create_Default_Colormap(CLIENT); + + /* allocate a color and store pixel from reply in global */ + + req = (xResourceReq *) Make_Req(CLIENT, X_AllocNamedColor); + Send_Req(CLIENT, (xReq *) req); + Log_Trace("client %d sent default AllocNamedColor request\n", CLIENT); + if ((anreply = (xAllocNamedColorReply *) Expect_Reply(CLIENT, X_AllocNamedColor)) == NULL) { + Log_Err("client %d failed to receive AllocNamedColor reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received AllocNamedColor reply\n", CLIENT); + reply_pixel = anreply->pixel; + Free_Reply(anreply); + } + + (void) Expect_Nothing(CLIENT); + Free_Req(req); + + /* store a color in the pixel from the reply */ + + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_StoreColors); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + /* + * The default test code called Expect_Nothing() - this is + * not the case here, we expect BadAccess error. + */ + Log_Trace("client %d sent default StoreColors request\n", CLIENT); + (void) Expect_BadAccess(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent StoreColors request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong StoreColors request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good C +If the default visual class for screen zero is +.S DirectColor , +.S PseudoColor , +or +.S GrayScale : +When a client sends a valid xname protocol request to the X server, +and the colour cell is read-write, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +DirectColor, PseudoColor, or GrayScale : +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester_rw); + +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +and the colour cell is read-only, +then the X server sends back a BadAccess error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a BadAccess error. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a BadAccess error. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request +plus zero or more colours, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request + zero colours. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request + zero colours. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request + n colours. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request + n colours. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum + n colours */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/StoreColors/XStoreColors.m b/xts5/tset/Xproto/StoreColors/XStoreColors.m deleted file mode 100644 index 8844d695..00000000 --- a/xts5/tset/Xproto/StoreColors/XStoreColors.m +++ /dev/null @@ -1,372 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XStoreColors/XStoreColors.m,v 1.3 2005-11-03 08:44:21 jmichael Exp $ - -Copyright (c) 2001 The Open Group -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XStoreColors/XStoreColors.m ->># ->># Description: ->># Tests for StoreColors ->># ->># Modifications: ->># $Log: strclrs.m,v $ ->># Revision 1.3 2005-11-03 08:44:21 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.2 2005/04/21 09:40:42 ajosey ->># resync to VSW5.1.5 ->># ->># Revision 8.2 2005/01/21 12:10:18 gwc ->># Updated copyright notice ->># ->># Revision 8.1 2001/01/05 17:20:26 vsx ->># TSD4W.00169: changed reply_pixel from unsigned long to CARD32 ->># ->># Revision 8.0 1998/12/23 23:33:07 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:19 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:34 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:21:06 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:06:53 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:06:50 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE StoreColors Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for StoreColors request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xResourceReq *req; -xAllocColorCellsReply *acreply; -xAllocNamedColorReply *anreply; -xError *err; -extern CARD32 reply_pixel; - -/* - intent: If a read-write color cell can be allocated: - Allocate read-write cell by sending an AllocColorCells request, - send a StoreColors request to the server and check no errors, - input: - output: none - global input: - side effects: creates a window resource - writes to global reply_pixel - methods: -*/ - -static -void -tester_rw() -{ - Create_Client(CLIENT); - if (!Allocatable (CLIENT)) { - unsupported("The visual class for screen zero is not writable"); - Exit_OK(); - } - - (void) Create_Default_Window(CLIENT); - (void) Create_Default_Colormap(CLIENT); - - /* allocate a color and store pixel from reply in global */ - - req = (xResourceReq *) Make_Req(CLIENT, X_AllocColorCells); - Send_Req(CLIENT, (xReq *) req); - Log_Trace("client %d sent default AllocColorCells request\n", CLIENT); - if ((acreply = (xAllocColorCellsReply *) Expect_Reply(CLIENT, X_AllocColorCells)) == NULL) { - Log_Err("client %d failed to receive AllocColorCells reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received AllocColorCells reply\n", CLIENT); - /* - * This line gets the first pixel value OR'd with - * zero of the returned masks - */ - reply_pixel = *(CARD32 *)(acreply + 1); - Free_Reply(acreply); - } - - (void) Expect_Nothing(CLIENT); - Free_Req(req); - - /* store a color in the pixel from the reply */ - - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_StoreColors); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - Log_Trace("client %d sent default StoreColors request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - Free_Req(req); - - Exit_OK(); -} - -/* - intent: Allocate read-only cell by sending an AllocNamedColor request, - send a StoreColors request to the server and check - that a BadAccess error is sent back. - input: - output: none - global input: - side effects: creates a window resource - writes to global reply_pixel - methods: -*/ -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - (void) Create_Default_Colormap(CLIENT); - - /* allocate a color and store pixel from reply in global */ - - req = (xResourceReq *) Make_Req(CLIENT, X_AllocNamedColor); - Send_Req(CLIENT, (xReq *) req); - Log_Trace("client %d sent default AllocNamedColor request\n", CLIENT); - if ((anreply = (xAllocNamedColorReply *) Expect_Reply(CLIENT, X_AllocNamedColor)) == NULL) { - Log_Err("client %d failed to receive AllocNamedColor reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received AllocNamedColor reply\n", CLIENT); - reply_pixel = anreply->pixel; - Free_Reply(anreply); - } - - (void) Expect_Nothing(CLIENT); - Free_Req(req); - - /* store a color in the pixel from the reply */ - - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_StoreColors); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - /* - * The default test code called Expect_Nothing() - this is - * not the case here, we expect BadAccess error. - */ - Log_Trace("client %d sent default StoreColors request\n", CLIENT); - (void) Expect_BadAccess(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent StoreColors request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong StoreColors request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good C -If the default visual class for screen zero is -.S DirectColor , -.S PseudoColor , -or -.S GrayScale : -When a client sends a valid xname protocol request to the X server, -and the colour cell is read-write, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -DirectColor, PseudoColor, or GrayScale : -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester_rw); - ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -and the colour cell is read-only, -then the X server sends back a BadAccess error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a BadAccess error. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a BadAccess error. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request -plus zero or more colours, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request + zero colours. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request + zero colours. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request + n colours. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request + n colours. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum + n colours */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/StoreNamedColor/StoreNamedColor.m b/xts5/tset/Xproto/StoreNamedColor/StoreNamedColor.m new file mode 100644 index 00000000..1dbb30df --- /dev/null +++ b/xts5/tset/Xproto/StoreNamedColor/StoreNamedColor.m @@ -0,0 +1,368 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/StoreNamedColor/StoreNamedColor.m,v 1.3 2005-11-03 08:44:21 jmichael Exp $ + +Copyright (c) 2001 The Open Group +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/StoreNamedColor/StoreNamedColor.m +>># +>># Description: +>># Tests for StoreNamedColor +>># +>># Modifications: +>># $Log: strnmdclr.m,v $ +>># Revision 1.3 2005-11-03 08:44:21 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.2 2005/04/21 09:40:42 ajosey +>># resync to VSW5.1.5 +>># +>># Revision 8.2 2005/01/21 12:11:21 gwc +>># Updated copyright notice +>># +>># Revision 8.1 2001/01/05 17:24:19 vsx +>># TSD4W.00169: changed reply_pixel from unsigned long to CARD32 +>># +>># Revision 8.0 1998/12/23 23:33:09 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:22 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:35 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:21:07 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:06:58 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:06:57 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE StoreNamedColor Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for StoreNamedColor request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xResourceReq *req; +xAllocColorCellsReply *acreply; +xAllocNamedColorReply *anreply; +xError *err; +extern CARD32 reply_pixel; + +/* + intent: If a read-write color cell can be allocated: + Allocate read-write cell by sending an AllocColorCells request, + send a StoreNamedColor request to the server and check no errors, + input: + output: none + global input: + side effects: creates a window resource + writes to global reply_pixel + methods: +*/ + +static +void +tester_rw() +{ + Create_Client(CLIENT); + if (!Allocatable (CLIENT)) { + unsupported("The visual class for screen zero is not writable"); + Exit_OK(); + } + + (void) Create_Default_Window(CLIENT); + (void) Create_Default_Colormap(CLIENT); + + /* allocate a color and store pixel from reply in global */ + + req = (xResourceReq *) Make_Req(CLIENT, X_AllocColorCells); + Send_Req(CLIENT, (xReq *) req); + Log_Trace("client %d sent default AllocColorCells request\n", CLIENT); + if ((acreply = (xAllocColorCellsReply *) Expect_Reply(CLIENT, X_AllocColorCells)) == NULL) { + Log_Err("client %d failed to receive AllocColorCells reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received AllocColorCells reply\n", CLIENT); + /* + * This line gets the first pixel value OR'd with + * zero of the returned masks + */ + reply_pixel = *(CARD32 *) (acreply + 1); + Free_Reply(acreply); + } + + (void) Expect_Nothing(CLIENT); + Free_Req(req); + + /* store a color in the pixel from the reply */ + + req = (xResourceReq *) Make_Req(CLIENT, X_StoreNamedColor); + Send_Req(CLIENT, (xReq *) req); + Log_Trace("client %d sent default StoreNamedColor request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + Free_Req(req); + + Exit_OK(); +} + +/* + intent: Allocate read-only cell by sending an AllocNamedColor request, + send a StoreNamedColor request to the server and check + that a BadAccess error is sent back. + input: + output: none + global input: + side effects: creates a window resource + writes to global reply_pixel + methods: +*/ +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + (void) Create_Default_Colormap(CLIENT); + + /* allocate a color and store pixel from reply in global */ + + req = (xResourceReq *) Make_Req(CLIENT, X_AllocNamedColor); + Send_Req(CLIENT, (xReq *) req); + Log_Trace("client %d sent default AllocNamedColor request\n", CLIENT); + if ((anreply = (xAllocNamedColorReply *) Expect_Reply(CLIENT, X_AllocNamedColor)) == NULL) { + Log_Err("client %d failed to receive AllocNamedColor reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received AllocNamedColor reply\n", CLIENT); + reply_pixel = anreply->pixel; + Free_Reply(anreply); + } + + (void) Expect_Nothing(CLIENT); + Free_Req(req); + + /* store a color in the pixel from the reply */ + + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_StoreNamedColor); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + /* + * The default test code called Expect_Nothing() - this is + * not the case here, we expect BadAccess error. + */ + Log_Trace("client %d sent default StoreNamedColor request\n", CLIENT); + (void) Expect_BadAccess(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent StoreNamedColor request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong StoreNamedColor request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good C +If the default visual class for screen zero is +.S DirectColor , +.S PseudoColor , +or +.S GrayScale : +When a client sends a valid xname protocol request to the X server, +and the colour cell is read-write, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +DirectColor, PseudoColor, or GrayScale : +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester_rw); +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +and the colour cell is read-only, +then the X server sends back a BadAccess error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a BadAccess error. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back a BadAccess error. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/StoreNamedColor/XStoreNamedColor.m b/xts5/tset/Xproto/StoreNamedColor/XStoreNamedColor.m deleted file mode 100644 index 757f9a2b..00000000 --- a/xts5/tset/Xproto/StoreNamedColor/XStoreNamedColor.m +++ /dev/null @@ -1,368 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XStoreNamedColor/XStoreNamedColor.m,v 1.3 2005-11-03 08:44:21 jmichael Exp $ - -Copyright (c) 2001 The Open Group -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XStoreNamedColor/XStoreNamedColor.m ->># ->># Description: ->># Tests for StoreNamedColor ->># ->># Modifications: ->># $Log: strnmdclr.m,v $ ->># Revision 1.3 2005-11-03 08:44:21 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.2 2005/04/21 09:40:42 ajosey ->># resync to VSW5.1.5 ->># ->># Revision 8.2 2005/01/21 12:11:21 gwc ->># Updated copyright notice ->># ->># Revision 8.1 2001/01/05 17:24:19 vsx ->># TSD4W.00169: changed reply_pixel from unsigned long to CARD32 ->># ->># Revision 8.0 1998/12/23 23:33:09 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:22 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:35 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:21:07 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:06:58 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:06:57 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE StoreNamedColor Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for StoreNamedColor request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xResourceReq *req; -xAllocColorCellsReply *acreply; -xAllocNamedColorReply *anreply; -xError *err; -extern CARD32 reply_pixel; - -/* - intent: If a read-write color cell can be allocated: - Allocate read-write cell by sending an AllocColorCells request, - send a StoreNamedColor request to the server and check no errors, - input: - output: none - global input: - side effects: creates a window resource - writes to global reply_pixel - methods: -*/ - -static -void -tester_rw() -{ - Create_Client(CLIENT); - if (!Allocatable (CLIENT)) { - unsupported("The visual class for screen zero is not writable"); - Exit_OK(); - } - - (void) Create_Default_Window(CLIENT); - (void) Create_Default_Colormap(CLIENT); - - /* allocate a color and store pixel from reply in global */ - - req = (xResourceReq *) Make_Req(CLIENT, X_AllocColorCells); - Send_Req(CLIENT, (xReq *) req); - Log_Trace("client %d sent default AllocColorCells request\n", CLIENT); - if ((acreply = (xAllocColorCellsReply *) Expect_Reply(CLIENT, X_AllocColorCells)) == NULL) { - Log_Err("client %d failed to receive AllocColorCells reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received AllocColorCells reply\n", CLIENT); - /* - * This line gets the first pixel value OR'd with - * zero of the returned masks - */ - reply_pixel = *(CARD32 *) (acreply + 1); - Free_Reply(acreply); - } - - (void) Expect_Nothing(CLIENT); - Free_Req(req); - - /* store a color in the pixel from the reply */ - - req = (xResourceReq *) Make_Req(CLIENT, X_StoreNamedColor); - Send_Req(CLIENT, (xReq *) req); - Log_Trace("client %d sent default StoreNamedColor request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - Free_Req(req); - - Exit_OK(); -} - -/* - intent: Allocate read-only cell by sending an AllocNamedColor request, - send a StoreNamedColor request to the server and check - that a BadAccess error is sent back. - input: - output: none - global input: - side effects: creates a window resource - writes to global reply_pixel - methods: -*/ -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - (void) Create_Default_Colormap(CLIENT); - - /* allocate a color and store pixel from reply in global */ - - req = (xResourceReq *) Make_Req(CLIENT, X_AllocNamedColor); - Send_Req(CLIENT, (xReq *) req); - Log_Trace("client %d sent default AllocNamedColor request\n", CLIENT); - if ((anreply = (xAllocNamedColorReply *) Expect_Reply(CLIENT, X_AllocNamedColor)) == NULL) { - Log_Err("client %d failed to receive AllocNamedColor reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received AllocNamedColor reply\n", CLIENT); - reply_pixel = anreply->pixel; - Free_Reply(anreply); - } - - (void) Expect_Nothing(CLIENT); - Free_Req(req); - - /* store a color in the pixel from the reply */ - - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_StoreNamedColor); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - /* - * The default test code called Expect_Nothing() - this is - * not the case here, we expect BadAccess error. - */ - Log_Trace("client %d sent default StoreNamedColor request\n", CLIENT); - (void) Expect_BadAccess(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent StoreNamedColor request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong StoreNamedColor request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good C -If the default visual class for screen zero is -.S DirectColor , -.S PseudoColor , -or -.S GrayScale : -When a client sends a valid xname protocol request to the X server, -and the colour cell is read-write, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -DirectColor, PseudoColor, or GrayScale : -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester_rw); ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -and the colour cell is read-only, -then the X server sends back a BadAccess error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a BadAccess error. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back a BadAccess error. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/UngrabButton/UngrabButton.m b/xts5/tset/Xproto/UngrabButton/UngrabButton.m new file mode 100644 index 00000000..514d33a6 --- /dev/null +++ b/xts5/tset/Xproto/UngrabButton/UngrabButton.m @@ -0,0 +1,246 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/UngrabButton/UngrabButton.m,v 1.2 2005-11-03 08:44:23 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/UngrabButton/UngrabButton.m +>># +>># Description: +>># Tests for UngrabButton +>># +>># Modifications: +>># $Log: ungrbbttn.m,v $ +>># Revision 1.2 2005-11-03 08:44:23 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:02 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:33:11 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:25 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:37 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:21:09 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:07:04 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:07:07 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE UngrabButton Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for UngrabButton request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xGrabButtonReq *gbr; +xUngrabButtonReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + + gbr = (xGrabButtonReq *) Make_Req(CLIENT, X_GrabButton); + Send_Req(CLIENT, (xReq *) gbr); + Log_Trace("client %d sent default GrabButton request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + Free_Req(gbr); + + Set_Test_Type(CLIENT, test_type); + req = (xUngrabButtonReq *) Make_Req(CLIENT, X_UngrabButton); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default UngrabButton request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent UngrabButton request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong UngrabButton request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/UngrabButton/XUngrabButton.m b/xts5/tset/Xproto/UngrabButton/XUngrabButton.m deleted file mode 100644 index 4ff15b1c..00000000 --- a/xts5/tset/Xproto/UngrabButton/XUngrabButton.m +++ /dev/null @@ -1,246 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XUngrabButton/XUngrabButton.m,v 1.2 2005-11-03 08:44:23 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XUngrabButton/XUngrabButton.m ->># ->># Description: ->># Tests for UngrabButton ->># ->># Modifications: ->># $Log: ungrbbttn.m,v $ ->># Revision 1.2 2005-11-03 08:44:23 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:02 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:33:11 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:25 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:37 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:21:09 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:07:04 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:07:07 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE UngrabButton Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for UngrabButton request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xGrabButtonReq *gbr; -xUngrabButtonReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - - gbr = (xGrabButtonReq *) Make_Req(CLIENT, X_GrabButton); - Send_Req(CLIENT, (xReq *) gbr); - Log_Trace("client %d sent default GrabButton request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - Free_Req(gbr); - - Set_Test_Type(CLIENT, test_type); - req = (xUngrabButtonReq *) Make_Req(CLIENT, X_UngrabButton); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default UngrabButton request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent UngrabButton request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong UngrabButton request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/UngrabKey/UngrabKey.m b/xts5/tset/Xproto/UngrabKey/UngrabKey.m new file mode 100644 index 00000000..36a1070c --- /dev/null +++ b/xts5/tset/Xproto/UngrabKey/UngrabKey.m @@ -0,0 +1,246 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/UngrabKey/UngrabKey.m,v 1.2 2005-11-03 08:44:24 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/UngrabKey/UngrabKey.m +>># +>># Description: +>># Tests for UngrabKey +>># +>># Modifications: +>># $Log: ungrbky.m,v $ +>># Revision 1.2 2005-11-03 08:44:24 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:02 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:33:11 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:26 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:37 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:21:09 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:07:05 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:07:09 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE UngrabKey Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for UngrabKey request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xGrabKeyReq *gkr; +xUngrabKeyReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + + gkr = (xGrabKeyReq *) Make_Req(CLIENT, X_GrabKey); + Send_Req(CLIENT, (xReq *) gkr); + Log_Trace("client %d sent default GrabKey request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + Free_Req(gkr); + + Set_Test_Type(CLIENT, test_type); + req = (xUngrabKeyReq *) Make_Req(CLIENT, X_UngrabKey); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default UngrabKey request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent UngrabKey request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong UngrabKey request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/UngrabKey/XUngrabKey.m b/xts5/tset/Xproto/UngrabKey/XUngrabKey.m deleted file mode 100644 index b4dd91bc..00000000 --- a/xts5/tset/Xproto/UngrabKey/XUngrabKey.m +++ /dev/null @@ -1,246 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XUngrabKey/XUngrabKey.m,v 1.2 2005-11-03 08:44:24 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XUngrabKey/XUngrabKey.m ->># ->># Description: ->># Tests for UngrabKey ->># ->># Modifications: ->># $Log: ungrbky.m,v $ ->># Revision 1.2 2005-11-03 08:44:24 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:02 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:33:11 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:26 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:37 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:21:09 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:07:05 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:07:09 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE UngrabKey Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for UngrabKey request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xGrabKeyReq *gkr; -xUngrabKeyReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - - gkr = (xGrabKeyReq *) Make_Req(CLIENT, X_GrabKey); - Send_Req(CLIENT, (xReq *) gkr); - Log_Trace("client %d sent default GrabKey request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - Free_Req(gkr); - - Set_Test_Type(CLIENT, test_type); - req = (xUngrabKeyReq *) Make_Req(CLIENT, X_UngrabKey); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default UngrabKey request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent UngrabKey request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong UngrabKey request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/UngrabKeyboard/UngrabKeyboard.m b/xts5/tset/Xproto/UngrabKeyboard/UngrabKeyboard.m new file mode 100644 index 00000000..ba86a2b2 --- /dev/null +++ b/xts5/tset/Xproto/UngrabKeyboard/UngrabKeyboard.m @@ -0,0 +1,259 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/UngrabKeyboard/UngrabKeyboard.m,v 1.2 2005-11-03 08:44:24 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/UngrabKeyboard/UngrabKeyboard.m +>># +>># Description: +>># Tests for UngrabKeyboard +>># +>># Modifications: +>># $Log: ungrbkybrd.m,v $ +>># Revision 1.2 2005-11-03 08:44:24 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:02 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:33:12 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:27 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:38 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:21:10 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:07:06 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:07:11 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE UngrabKeyboard Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for UngrabKeyboard request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xResourceReq *req; +xGrabKeyboardReq *gkr; +xGrabKeyboardReply *gkrep; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + + gkr = (xGrabKeyboardReq *) Make_Req(CLIENT, X_GrabKeyboard); + Send_Req(CLIENT, (xReq *) gkr); + Log_Trace("client %d sent default GrabKeyboard request\n", CLIENT); + + if ((gkrep = (xGrabKeyboardReply *) Expect_Reply(CLIENT, X_GrabKeyboard)) == NULL) { + Log_Err("client %d failed to receive GrabKeyboard reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received GrabKeyboard reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(gkrep); + } + (void) Expect_Nothing(CLIENT); + Free_Req(gkr); + + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_UngrabKeyboard); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default UngrabKeyboard request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent UngrabKeyboard request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong UngrabKeyboard request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +and the client has no event selected in the +.M event_mask +for any window, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/UngrabKeyboard/XUngrabKeyboard.m b/xts5/tset/Xproto/UngrabKeyboard/XUngrabKeyboard.m deleted file mode 100644 index 954904cc..00000000 --- a/xts5/tset/Xproto/UngrabKeyboard/XUngrabKeyboard.m +++ /dev/null @@ -1,259 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XUngrabKeyboard/XUngrabKeyboard.m,v 1.2 2005-11-03 08:44:24 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XUngrabKeyboard/XUngrabKeyboard.m ->># ->># Description: ->># Tests for UngrabKeyboard ->># ->># Modifications: ->># $Log: ungrbkybrd.m,v $ ->># Revision 1.2 2005-11-03 08:44:24 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:02 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:33:12 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:27 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:38 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:21:10 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:07:06 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:07:11 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE UngrabKeyboard Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for UngrabKeyboard request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xResourceReq *req; -xGrabKeyboardReq *gkr; -xGrabKeyboardReply *gkrep; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - - gkr = (xGrabKeyboardReq *) Make_Req(CLIENT, X_GrabKeyboard); - Send_Req(CLIENT, (xReq *) gkr); - Log_Trace("client %d sent default GrabKeyboard request\n", CLIENT); - - if ((gkrep = (xGrabKeyboardReply *) Expect_Reply(CLIENT, X_GrabKeyboard)) == NULL) { - Log_Err("client %d failed to receive GrabKeyboard reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received GrabKeyboard reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(gkrep); - } - (void) Expect_Nothing(CLIENT); - Free_Req(gkr); - - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_UngrabKeyboard); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default UngrabKeyboard request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent UngrabKeyboard request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong UngrabKeyboard request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -and the client has no event selected in the -.M event_mask -for any window, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/UngrabPointer/UngrabPointer.m b/xts5/tset/Xproto/UngrabPointer/UngrabPointer.m new file mode 100644 index 00000000..0f0de336 --- /dev/null +++ b/xts5/tset/Xproto/UngrabPointer/UngrabPointer.m @@ -0,0 +1,259 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/UngrabPointer/UngrabPointer.m,v 1.2 2005-11-03 08:44:24 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/UngrabPointer/UngrabPointer.m +>># +>># Description: +>># Tests for UngrabPointer +>># +>># Modifications: +>># $Log: ungrbpntr.m,v $ +>># Revision 1.2 2005-11-03 08:44:24 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:02 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:33:12 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:28 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:38 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:21:10 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:07:08 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:07:13 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE UngrabPointer Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for UngrabPointer request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xGrabPointerReq *gpr; +xGrabPointerReply *gprep; +xResourceReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + + gpr = (xGrabPointerReq *) Make_Req(CLIENT, X_GrabPointer); + Send_Req(CLIENT, (xReq *) gpr); + Log_Trace("client %d sent default GrabPointer request\n", CLIENT); + + if ((gprep = (xGrabPointerReply *) Expect_Reply(CLIENT, X_GrabPointer)) == NULL) { + Log_Err("client %d failed to receive GrabPointer reply\n", CLIENT); + Exit(); + } else { + Log_Trace("client %d received GrabPointer reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(gprep); + } + (void) Expect_Nothing(CLIENT); + Free_Req(gpr); + + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_UngrabPointer); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default UngrabPointer request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent UngrabPointer request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong UngrabPointer request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +and the client has no event selected in the +.M event_mask +for any window, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/UngrabPointer/XUngrabPointer.m b/xts5/tset/Xproto/UngrabPointer/XUngrabPointer.m deleted file mode 100644 index 380bde26..00000000 --- a/xts5/tset/Xproto/UngrabPointer/XUngrabPointer.m +++ /dev/null @@ -1,259 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XUngrabPointer/XUngrabPointer.m,v 1.2 2005-11-03 08:44:24 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XUngrabPointer/XUngrabPointer.m ->># ->># Description: ->># Tests for UngrabPointer ->># ->># Modifications: ->># $Log: ungrbpntr.m,v $ ->># Revision 1.2 2005-11-03 08:44:24 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:02 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:33:12 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:28 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:38 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:21:10 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:07:08 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:07:13 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE UngrabPointer Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for UngrabPointer request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xGrabPointerReq *gpr; -xGrabPointerReply *gprep; -xResourceReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - - gpr = (xGrabPointerReq *) Make_Req(CLIENT, X_GrabPointer); - Send_Req(CLIENT, (xReq *) gpr); - Log_Trace("client %d sent default GrabPointer request\n", CLIENT); - - if ((gprep = (xGrabPointerReply *) Expect_Reply(CLIENT, X_GrabPointer)) == NULL) { - Log_Err("client %d failed to receive GrabPointer reply\n", CLIENT); - Exit(); - } else { - Log_Trace("client %d received GrabPointer reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(gprep); - } - (void) Expect_Nothing(CLIENT); - Free_Req(gpr); - - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_UngrabPointer); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default UngrabPointer request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent UngrabPointer request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong UngrabPointer request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -and the client has no event selected in the -.M event_mask -for any window, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/UngrabServer/UngrabServer.m b/xts5/tset/Xproto/UngrabServer/UngrabServer.m new file mode 100644 index 00000000..7f9d4a22 --- /dev/null +++ b/xts5/tset/Xproto/UngrabServer/UngrabServer.m @@ -0,0 +1,246 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/UngrabServer/UngrabServer.m,v 1.2 2005-11-03 08:44:24 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/UngrabServer/UngrabServer.m +>># +>># Description: +>># Tests for UngrabServer +>># +>># Modifications: +>># $Log: ungrbsrvr.m,v $ +>># Revision 1.2 2005-11-03 08:44:24 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:02 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:33:13 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:29 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:39 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:21:11 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:07:09 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:07:16 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE UngrabServer Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for UngrabServer request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xReq *gsr; +xReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + + gsr = (xReq *) Make_Req(CLIENT, X_GrabServer); + Send_Req(CLIENT, (xReq *) gsr); + Log_Trace("client %d sent default GrabServer\n", CLIENT); + (void) Expect_Nothing(CLIENT); + Free_Req(gsr); + + Set_Test_Type(CLIENT, test_type); + req = (xReq *) Make_Req(CLIENT, X_UngrabServer); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default UngrabServer request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent UngrabServer request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong UngrabServer request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/UngrabServer/XUngrabServer.m b/xts5/tset/Xproto/UngrabServer/XUngrabServer.m deleted file mode 100644 index d5d515e8..00000000 --- a/xts5/tset/Xproto/UngrabServer/XUngrabServer.m +++ /dev/null @@ -1,246 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XUngrabServer/XUngrabServer.m,v 1.2 2005-11-03 08:44:24 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XUngrabServer/XUngrabServer.m ->># ->># Description: ->># Tests for UngrabServer ->># ->># Modifications: ->># $Log: ungrbsrvr.m,v $ ->># Revision 1.2 2005-11-03 08:44:24 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:02 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:33:13 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:29 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:39 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:21:11 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:07:09 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:07:16 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE UngrabServer Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for UngrabServer request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xReq *gsr; -xReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - - gsr = (xReq *) Make_Req(CLIENT, X_GrabServer); - Send_Req(CLIENT, (xReq *) gsr); - Log_Trace("client %d sent default GrabServer\n", CLIENT); - (void) Expect_Nothing(CLIENT); - Free_Req(gsr); - - Set_Test_Type(CLIENT, test_type); - req = (xReq *) Make_Req(CLIENT, X_UngrabServer); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default UngrabServer request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent UngrabServer request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong UngrabServer request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/UninstallColormap/UninstallColormap.m b/xts5/tset/Xproto/UninstallColormap/UninstallColormap.m new file mode 100644 index 00000000..13c7493a --- /dev/null +++ b/xts5/tset/Xproto/UninstallColormap/UninstallColormap.m @@ -0,0 +1,281 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/UninstallColormap/UninstallColormap.m,v 1.2 2005-11-03 08:44:25 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/UninstallColormap/UninstallColormap.m +>># +>># Description: +>># Tests for UninstallColormap +>># +>># Modifications: +>># $Log: unnstllclr.m,v $ +>># Revision 1.2 2005-11-03 08:44:25 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:02 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:33:14 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:32 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:40 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:21:12 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:07:13 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:07:24 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE UninstallColormap Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for UninstallColormap request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xResourceReq *req; +xAllocColorCellsReply *reply; + +/* + intent: send an UninstallColormap request to the server and check + that nothing was sent back. + input: + output: none + global input: + side effects: creates a window resource. + installs and uninstalls a colormap. + methods: +*/ + +static +void +tester() +{ + + + Create_Client(CLIENT); + + (void) Create_Default_Window(CLIENT); + (void) Create_Default_Colormap(CLIENT); + + /* Allocate color cells if client hasn't got any */ + + if (Allocatable (CLIENT)) { + req = (xResourceReq *) Make_Req(CLIENT, X_AllocColorCells); + Send_Req(CLIENT, (xReq *) req); + if ((reply = (xAllocColorCellsReply *) Expect_Reply(CLIENT, X_AllocColorCells)) == NULL) { + Log_Err("client %d failed to receive AllocColorCells reply\n", CLIENT); + Exit(); + } + else { + Log_Trace("client %d received AllocColorCells reply\n", CLIENT); + /* do any reply checking here */ + Free_Reply(reply); + } + Free_Req(req); + } + (void) Expect_Nothing(CLIENT); + + req = (xResourceReq *) Make_Req(CLIENT, X_InstallColormap); + Send_Req(CLIENT, (xReq *) req); + Log_Trace("client %d sent default InstallColormap request\n",CLIENT); + (void) Expect_Nothing(CLIENT); + Free_Req(req); + + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_UninstallColormap); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default UninstallColormap request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent UninstallColormap request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong UninstallColormap request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +and the client has no event selected in the +.M event_mask +for any window, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/UninstallColormap/XUninstallColormap.m b/xts5/tset/Xproto/UninstallColormap/XUninstallColormap.m deleted file mode 100644 index fffa6ec6..00000000 --- a/xts5/tset/Xproto/UninstallColormap/XUninstallColormap.m +++ /dev/null @@ -1,281 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XUninstallColormap/XUninstallColormap.m,v 1.2 2005-11-03 08:44:25 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XUninstallColormap/XUninstallColormap.m ->># ->># Description: ->># Tests for UninstallColormap ->># ->># Modifications: ->># $Log: unnstllclr.m,v $ ->># Revision 1.2 2005-11-03 08:44:25 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:02 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:33:14 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:32 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:40 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:21:12 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:07:13 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:07:24 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE UninstallColormap Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for UninstallColormap request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xResourceReq *req; -xAllocColorCellsReply *reply; - -/* - intent: send an UninstallColormap request to the server and check - that nothing was sent back. - input: - output: none - global input: - side effects: creates a window resource. - installs and uninstalls a colormap. - methods: -*/ - -static -void -tester() -{ - - - Create_Client(CLIENT); - - (void) Create_Default_Window(CLIENT); - (void) Create_Default_Colormap(CLIENT); - - /* Allocate color cells if client hasn't got any */ - - if (Allocatable (CLIENT)) { - req = (xResourceReq *) Make_Req(CLIENT, X_AllocColorCells); - Send_Req(CLIENT, (xReq *) req); - if ((reply = (xAllocColorCellsReply *) Expect_Reply(CLIENT, X_AllocColorCells)) == NULL) { - Log_Err("client %d failed to receive AllocColorCells reply\n", CLIENT); - Exit(); - } - else { - Log_Trace("client %d received AllocColorCells reply\n", CLIENT); - /* do any reply checking here */ - Free_Reply(reply); - } - Free_Req(req); - } - (void) Expect_Nothing(CLIENT); - - req = (xResourceReq *) Make_Req(CLIENT, X_InstallColormap); - Send_Req(CLIENT, (xReq *) req); - Log_Trace("client %d sent default InstallColormap request\n",CLIENT); - (void) Expect_Nothing(CLIENT); - Free_Req(req); - - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_UninstallColormap); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default UninstallColormap request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent UninstallColormap request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong UninstallColormap request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -and the client has no event selected in the -.M event_mask -for any window, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/UnmapSubwindows/UnmapSubwindows.m b/xts5/tset/Xproto/UnmapSubwindows/UnmapSubwindows.m new file mode 100644 index 00000000..0b3d24dd --- /dev/null +++ b/xts5/tset/Xproto/UnmapSubwindows/UnmapSubwindows.m @@ -0,0 +1,261 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/UnmapSubwindows/UnmapSubwindows.m,v 1.2 2005-11-03 08:44:24 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/UnmapSubwindows/UnmapSubwindows.m +>># +>># Description: +>># Tests for UnmapSubwindows +>># +>># Modifications: +>># $Log: unmpsbws.m,v $ +>># Revision 1.2 2005-11-03 08:44:24 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:02 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:33:13 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:30 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:39 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:21:11 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:07:10 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:07:19 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE UnmapSubwindows Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for UnmapSubwindows request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +Window Default_Window; +xCreateWindowReq *cwr; +xResourceReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + Default_Window = Create_Default_Window(CLIENT); + + cwr = (xCreateWindowReq *) Make_Req(CLIENT, X_CreateWindow); + cwr->parent = Default_Window; + Send_Req(CLIENT, (xReq *) cwr); + Log_Trace("client %d sent additional CreateWindow request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + Free_Req(cwr); + + req = (xResourceReq *) Make_Req(CLIENT, X_MapSubwindows); + Send_Req(CLIENT, (xReq *) req); + Log_Trace("client %d sent default MapSubwindows\n", CLIENT); + + /* Don't expect to see Expose event because the parent is not + mapped. */ + (void) Expect_Nothing(CLIENT); + Free_Req(req); + + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_UnmapSubwindows); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default UnmapSubwindows request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent UnmapSubwindows request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong UnmapSubwindows request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +and the parent window is not mapped, +and the client has no event selected in the +.M event_mask +for any window, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/UnmapSubwindows/XUnmapSubwindows.m b/xts5/tset/Xproto/UnmapSubwindows/XUnmapSubwindows.m deleted file mode 100644 index 41a9c329..00000000 --- a/xts5/tset/Xproto/UnmapSubwindows/XUnmapSubwindows.m +++ /dev/null @@ -1,261 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XUnmapSubwindows/XUnmapSubwindows.m,v 1.2 2005-11-03 08:44:24 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XUnmapSubwindows/XUnmapSubwindows.m ->># ->># Description: ->># Tests for UnmapSubwindows ->># ->># Modifications: ->># $Log: unmpsbws.m,v $ ->># Revision 1.2 2005-11-03 08:44:24 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:02 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:33:13 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:30 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:39 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:21:11 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:07:10 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:07:19 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE UnmapSubwindows Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for UnmapSubwindows request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -Window Default_Window; -xCreateWindowReq *cwr; -xResourceReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - Default_Window = Create_Default_Window(CLIENT); - - cwr = (xCreateWindowReq *) Make_Req(CLIENT, X_CreateWindow); - cwr->parent = Default_Window; - Send_Req(CLIENT, (xReq *) cwr); - Log_Trace("client %d sent additional CreateWindow request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - Free_Req(cwr); - - req = (xResourceReq *) Make_Req(CLIENT, X_MapSubwindows); - Send_Req(CLIENT, (xReq *) req); - Log_Trace("client %d sent default MapSubwindows\n", CLIENT); - - /* Don't expect to see Expose event because the parent is not - mapped. */ - (void) Expect_Nothing(CLIENT); - Free_Req(req); - - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_UnmapSubwindows); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default UnmapSubwindows request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent UnmapSubwindows request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong UnmapSubwindows request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -and the parent window is not mapped, -and the client has no event selected in the -.M event_mask -for any window, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/UnmapWindow/UnmapWindow.m b/xts5/tset/Xproto/UnmapWindow/UnmapWindow.m new file mode 100644 index 00000000..2c3af2e7 --- /dev/null +++ b/xts5/tset/Xproto/UnmapWindow/UnmapWindow.m @@ -0,0 +1,244 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/UnmapWindow/UnmapWindow.m,v 1.2 2005-11-03 08:44:25 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/UnmapWindow/UnmapWindow.m +>># +>># Description: +>># Tests for UnmapWindow +>># +>># Modifications: +>># $Log: unmpwdw.m,v $ +>># Revision 1.2 2005-11-03 08:44:25 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:02 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:33:14 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:31 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:40 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:21:11 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:07:12 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:07:22 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE UnmapWindow Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for UnmapWindow request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +Window Default_Window; +xResourceReq *req; + +static +void +tester() +{ + Create_Client(CLIENT); + + Default_Window = Create_Default_Window(CLIENT); + Map_Window(CLIENT, Default_Window); + + Set_Test_Type(CLIENT, test_type); + req = (xResourceReq *) Make_Req(CLIENT, X_UnmapWindow); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default UnmapWindow request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent UnmapWindow request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong UnmapWindow request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +and the client has no event selected in the +.M event_mask +for any window, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back an UnmapNotify event. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server sends back an UnmapNotify event. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/UnmapWindow/XUnmapWindow.m b/xts5/tset/Xproto/UnmapWindow/XUnmapWindow.m deleted file mode 100644 index 9d7a3357..00000000 --- a/xts5/tset/Xproto/UnmapWindow/XUnmapWindow.m +++ /dev/null @@ -1,244 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XUnmapWindow/XUnmapWindow.m,v 1.2 2005-11-03 08:44:25 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XUnmapWindow/XUnmapWindow.m ->># ->># Description: ->># Tests for UnmapWindow ->># ->># Modifications: ->># $Log: unmpwdw.m,v $ ->># Revision 1.2 2005-11-03 08:44:25 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:02 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:33:14 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:31 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:40 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:21:11 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:07:12 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:07:22 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE UnmapWindow Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for UnmapWindow request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -Window Default_Window; -xResourceReq *req; - -static -void -tester() -{ - Create_Client(CLIENT); - - Default_Window = Create_Default_Window(CLIENT); - Map_Window(CLIENT, Default_Window); - - Set_Test_Type(CLIENT, test_type); - req = (xResourceReq *) Make_Req(CLIENT, X_UnmapWindow); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default UnmapWindow request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent UnmapWindow request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong UnmapWindow request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -and the client has no event selected in the -.M event_mask -for any window, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back an UnmapNotify event. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server sends back an UnmapNotify event. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); diff --git a/xts5/tset/Xproto/WarpPointer/WarpPointer.m b/xts5/tset/Xproto/WarpPointer/WarpPointer.m new file mode 100644 index 00000000..8998ab6a --- /dev/null +++ b/xts5/tset/Xproto/WarpPointer/WarpPointer.m @@ -0,0 +1,241 @@ +Copyright (c) 2005 X.Org Foundation L.L.C. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +$Header: /cvs/xtest/xtest/xts5/tset/Xproto/WarpPointer/WarpPointer.m,v 1.2 2005-11-03 08:44:26 jmichael Exp $ + +Copyright (c) Applied Testing and Technology, Inc. 1995 +All Rights Reserved. + +>># Project: VSW5 +>># +>># File: xts5/tset/Xproto/WarpPointer/WarpPointer.m +>># +>># Description: +>># Tests for WarpPointer +>># +>># Modifications: +>># $Log: wrppntr.m,v $ +>># Revision 1.2 2005-11-03 08:44:26 jmichael +>># clean up all vsw5 paths to use xts5 instead. +>># +>># Revision 1.1.1.2 2005/04/15 14:06:02 anderson +>># Reimport of the base with the legal name in the copyright fixed. +>># +>># Revision 8.0 1998/12/23 23:33:15 mar +>># Branch point for Release 5.0.2 +>># +>># Revision 7.0 1998/10/30 22:54:33 mar +>># Branch point for Release 5.0.2b1 +>># +>># Revision 6.0 1998/03/02 05:24:40 tbr +>># Branch point for Release 5.0.1 +>># +>># Revision 5.0 1998/01/26 03:21:12 tbr +>># Branch point for Release 5.0.1b1 +>># +>># Revision 4.0 1995/12/15 09:07:15 tbr +>># Branch point for Release 5.0.0 +>># +>># Revision 3.1 1995/12/15 01:07:27 andy +>># Prepare for GA Release +>># +/* + +Copyright (c) 1990, 1991 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1990, 1991 by UniSoft Group Limited. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of UniSoft not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. UniSoft +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Sequent not be used +in advertising or publicity pertaining to distribution or use of the +software without specific, written prior permission. + +SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL +SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +*/ +>>TITLE WarpPointer Xproto +>>SET startup protostartup +>>SET cleanup protocleanup +>>EXTERN +/* Touch test for WarpPointer request */ + +#include "Xstlib.h" + +#define CLIENT 0 +static TestType test_type = SETUP; +xWarpPointerReq *req; +xEvent *ev; + +static +void +tester() +{ + Create_Client(CLIENT); + + Set_Test_Type(CLIENT, test_type); + req = (xWarpPointerReq *) Make_Req(CLIENT, X_WarpPointer); + Send_Req(CLIENT, (xReq *) req); + Set_Test_Type(CLIENT, GOOD); + switch(test_type) { + case GOOD: + Log_Trace("client %d sent default WarpPointer request\n", CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case BAD_LENGTH: + Log_Trace("client %d sent WarpPointer request with bad length (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + case TOO_LONG: + case JUST_TOO_LONG: + Log_Trace("client %d sent overlong WarpPointer request (%d)\n", CLIENT, req->length); + (void) Expect_BadLength(CLIENT); + (void) Expect_Nothing(CLIENT); + break; + default: + Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", + test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); + Abort(); + /*NOTREACHED*/ + break; + } + Free_Req(req); + Exit_OK(); +} +>>ASSERTION Good A +When a client sends a valid xname protocol request to the X server, +and the client has no event selected in the +.M event_mask +for any window, +then the X server does not send back an error, event or reply to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +Open a connection to the X server using reversed byte sex. +Send a valid xname protocol request to the X server. +Verify that the X server does not send back an error, event or reply. +>>CODE + + test_type = GOOD; + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad A +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request is not the minimum length required to +contain the request, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one less than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. + +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the minimum length required to contain the request. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = BAD_LENGTH; /* < minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + + test_type = JUST_TOO_LONG; /* > minimum */ + + /* Call a library function to exercise the test code */ + testfunc(tester); + +>>ASSERTION Bad B 1 +When a client sends an invalid xname protocol request to the X server, +in which the length field of the request exceeds the maximum length accepted +by the X server, +then the X server sends back a BadLength error to the client. +>>STRATEGY +Call library function testfunc() to do the following: +Open a connection to the X server using native byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +Open a connection to the X server using reversed byte sex. +Send an invalid xname protocol request to the X server with length + one greater than the maximum length accepted by the server. +Verify that the X server sends back a BadLength error. +>>CODE + + test_type = TOO_LONG; + + /* Call a library function to exercise the test code */ + testfunc(tester); diff --git a/xts5/tset/Xproto/WarpPointer/XWarpPointer.m b/xts5/tset/Xproto/WarpPointer/XWarpPointer.m deleted file mode 100644 index 6dcb0970..00000000 --- a/xts5/tset/Xproto/WarpPointer/XWarpPointer.m +++ /dev/null @@ -1,241 +0,0 @@ -Copyright (c) 2005 X.Org Foundation L.L.C. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -$Header: /cvs/xtest/xtest/xts5/tset/Xproto/XWarpPointer/XWarpPointer.m,v 1.2 2005-11-03 08:44:26 jmichael Exp $ - -Copyright (c) Applied Testing and Technology, Inc. 1995 -All Rights Reserved. - ->># Project: VSW5 ->># ->># File: xts5/tset/Xproto/XWarpPointer/XWarpPointer.m ->># ->># Description: ->># Tests for WarpPointer ->># ->># Modifications: ->># $Log: wrppntr.m,v $ ->># Revision 1.2 2005-11-03 08:44:26 jmichael ->># clean up all vsw5 paths to use xts5 instead. ->># ->># Revision 1.1.1.2 2005/04/15 14:06:02 anderson ->># Reimport of the base with the legal name in the copyright fixed. ->># ->># Revision 8.0 1998/12/23 23:33:15 mar ->># Branch point for Release 5.0.2 ->># ->># Revision 7.0 1998/10/30 22:54:33 mar ->># Branch point for Release 5.0.2b1 ->># ->># Revision 6.0 1998/03/02 05:24:40 tbr ->># Branch point for Release 5.0.1 ->># ->># Revision 5.0 1998/01/26 03:21:12 tbr ->># Branch point for Release 5.0.1b1 ->># ->># Revision 4.0 1995/12/15 09:07:15 tbr ->># Branch point for Release 5.0.0 ->># ->># Revision 3.1 1995/12/15 01:07:27 andy ->># Prepare for GA Release ->># -/* - -Copyright (c) 1990, 1991 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -Copyright 1990, 1991 by UniSoft Group Limited. - -Permission to use, copy, modify, distribute, and sell this software and -its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of UniSoft not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. UniSoft -makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -Copyright 1989 by Sequent Computer Systems, Inc., Portland, Oregon - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Sequent not be used -in advertising or publicity pertaining to distribution or use of the -software without specific, written prior permission. - -SEQUENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL -SEQUENT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -*/ ->>TITLE WarpPointer Xproto ->>SET startup protostartup ->>SET cleanup protocleanup ->>EXTERN -/* Touch test for WarpPointer request */ - -#include "Xstlib.h" - -#define CLIENT 0 -static TestType test_type = SETUP; -xWarpPointerReq *req; -xEvent *ev; - -static -void -tester() -{ - Create_Client(CLIENT); - - Set_Test_Type(CLIENT, test_type); - req = (xWarpPointerReq *) Make_Req(CLIENT, X_WarpPointer); - Send_Req(CLIENT, (xReq *) req); - Set_Test_Type(CLIENT, GOOD); - switch(test_type) { - case GOOD: - Log_Trace("client %d sent default WarpPointer request\n", CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case BAD_LENGTH: - Log_Trace("client %d sent WarpPointer request with bad length (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - case TOO_LONG: - case JUST_TOO_LONG: - Log_Trace("client %d sent overlong WarpPointer request (%d)\n", CLIENT, req->length); - (void) Expect_BadLength(CLIENT); - (void) Expect_Nothing(CLIENT); - break; - default: - Log_Err("INTERNAL ERROR: test_type %d not one of GOOD(%d), BAD_LENGTH(%d), TOO_LONG(%d) or JUST_TOO_LONG(%d)\n", - test_type, GOOD, BAD_LENGTH, TOO_LONG, JUST_TOO_LONG); - Abort(); - /*NOTREACHED*/ - break; - } - Free_Req(req); - Exit_OK(); -} ->>ASSERTION Good A -When a client sends a valid xname protocol request to the X server, -and the client has no event selected in the -.M event_mask -for any window, -then the X server does not send back an error, event or reply to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. -Open a connection to the X server using reversed byte sex. -Send a valid xname protocol request to the X server. -Verify that the X server does not send back an error, event or reply. ->>CODE - - test_type = GOOD; - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad A -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request is not the minimum length required to -contain the request, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one less than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. - -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the minimum length required to contain the request. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = BAD_LENGTH; /* < minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - - test_type = JUST_TOO_LONG; /* > minimum */ - - /* Call a library function to exercise the test code */ - testfunc(tester); - ->>ASSERTION Bad B 1 -When a client sends an invalid xname protocol request to the X server, -in which the length field of the request exceeds the maximum length accepted -by the X server, -then the X server sends back a BadLength error to the client. ->>STRATEGY -Call library function testfunc() to do the following: -Open a connection to the X server using native byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. -Open a connection to the X server using reversed byte sex. -Send an invalid xname protocol request to the X server with length - one greater than the maximum length accepted by the server. -Verify that the X server sends back a BadLength error. ->>CODE - - test_type = TOO_LONG; - - /* Call a library function to exercise the test code */ - testfunc(tester); -- cgit v1.2.3 From 1cb70454247c0bf99dce7feeaaf467ee900a40bb Mon Sep 17 00:00:00 2001 From: Tinderbox user Date: Fri, 11 Sep 2009 10:06:02 +1000 Subject: Install all tests into libexec --- xts5/Makefile.am | 2 +- xts5/tset/XI/Makefile.am | 2 +- xts5/tset/XIproto/Makefile.am | 2 +- xts5/tset/Xlib10/Makefile.am | 2 +- xts5/tset/Xlib11/Makefile.am | 2 +- xts5/tset/Xlib12/Makefile.am | 4 ++-- xts5/tset/Xlib13/Makefile.am | 2 +- xts5/tset/Xlib14/Makefile.am | 2 +- xts5/tset/Xlib15/Makefile.am | 4 ++-- xts5/tset/Xlib16/Makefile.am | 2 +- xts5/tset/Xlib17/Makefile.am | 4 ++-- xts5/tset/Xlib3/Makefile.am | 4 ++-- xts5/tset/Xlib4/Makefile.am | 2 +- xts5/tset/Xlib5/Makefile.am | 2 +- xts5/tset/Xlib6/Makefile.am | 2 +- xts5/tset/Xlib7/Makefile.am | 2 +- xts5/tset/Xlib8/Makefile.am | 2 +- xts5/tset/Xlib9/Makefile.am | 2 +- xts5/tset/Xopen/Makefile.am | 2 +- xts5/tset/Xproto/Makefile.am | 2 +- 20 files changed, 24 insertions(+), 24 deletions(-) (limited to 'xts5') diff --git a/xts5/Makefile.am b/xts5/Makefile.am index f18d5896..0428f8dd 100644 --- a/xts5/Makefile.am +++ b/xts5/Makefile.am @@ -2,7 +2,7 @@ include common.mk SUBDIRS = . src fonts tset -check_DATA = tetexec.cfg +libexec_SCRIPTS = tetexec.cfg XTS_CONFIG = TET_ROOT='$(TET_ROOT)' DISPLAY='$(XT_DISPLAY)' \ XSET='$(XSET)' XDPYINFO='$(XDPYINFO)' \ diff --git a/xts5/tset/XI/Makefile.am b/xts5/tset/XI/Makefile.am index d0573332..ff984fb5 100644 --- a/xts5/tset/XI/Makefile.am +++ b/xts5/tset/XI/Makefile.am @@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = subdir-objects AM_CFLAGS = $(XTS_LCFLAGS) $(XTS_CFLAGS) LDADD = $(TCM) $(XTS_LLIBS) $(XTS_LIBS) -check_PROGRAMS = $(tprogs) +libexec_PROGRAMS = $(tprogs) BUILT_SOURCES = $(tprogs:$(EXEEXT)=.c) CLEANFILES = $(BUILT_SOURCES) diff --git a/xts5/tset/XIproto/Makefile.am b/xts5/tset/XIproto/Makefile.am index cce00c50..2c91bf29 100644 --- a/xts5/tset/XIproto/Makefile.am +++ b/xts5/tset/XIproto/Makefile.am @@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = subdir-objects AM_CFLAGS = $(XP_LCFLAGS) $(XP_CFLAGS) LDADD = $(TCM) $(XP_LLIBS) $(XP_LIBS) -check_PROGRAMS = $(tprogs) +libexec_PROGRAMS = $(tprogs) BUILT_SOURCES = $(tprogs:$(EXEEXT)=.c) CLEANFILES = $(BUILT_SOURCES) diff --git a/xts5/tset/Xlib10/Makefile.am b/xts5/tset/Xlib10/Makefile.am index a6a98a6d..ec98940c 100644 --- a/xts5/tset/Xlib10/Makefile.am +++ b/xts5/tset/Xlib10/Makefile.am @@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = subdir-objects AM_CFLAGS = $(XTS_LCFLAGS) $(XTS_CFLAGS) LDADD = $(TCM) $(XTS_LLIBS) $(XTS_LIBS) -check_PROGRAMS = $(tprogs) +libexec_PROGRAMS = $(tprogs) BUILT_SOURCES = $(tprogs:$(EXEEXT)=.c) CLEANFILES = $(BUILT_SOURCES) diff --git a/xts5/tset/Xlib11/Makefile.am b/xts5/tset/Xlib11/Makefile.am index c037084b..b0168c6a 100644 --- a/xts5/tset/Xlib11/Makefile.am +++ b/xts5/tset/Xlib11/Makefile.am @@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = subdir-objects AM_CFLAGS = $(XTS_LCFLAGS) $(XTS_CFLAGS) LDADD = $(TCM) $(XTS_LLIBS) $(XTS_LIBS) -check_PROGRAMS = $(tprogs) +libexec_PROGRAMS = $(tprogs) BUILT_SOURCES = $(tprogs:$(EXEEXT)=.c) CLEANFILES = $(BUILT_SOURCES) diff --git a/xts5/tset/Xlib12/Makefile.am b/xts5/tset/Xlib12/Makefile.am index 32983ec0..130ffb4c 100644 --- a/xts5/tset/Xlib12/Makefile.am +++ b/xts5/tset/Xlib12/Makefile.am @@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = subdir-objects AM_CFLAGS = $(XTS_LCFLAGS) $(XTS_CFLAGS) LDADD = $(TCM) $(XTS_LLIBS) $(XTS_LIBS) -check_PROGRAMS = $(tprogs) +libexec_PROGRAMS = $(tprogs) BUILT_SOURCES = $(tprogs:$(EXEEXT)=.c) CLEANFILES = $(BUILT_SOURCES) @@ -38,5 +38,5 @@ tprogs = \ XWindowEvent/XWindowEvent # Auxiliary programs run from tests -check_PROGRAMS += XDisplayName/Test1 +libexec_PROGRAMS += XDisplayName/Test1 XDisplayName_Test1_LDADD = $(TCMCHILD) $(XTS_LLIBS) $(XTS_LIBS) diff --git a/xts5/tset/Xlib13/Makefile.am b/xts5/tset/Xlib13/Makefile.am index 7681a572..b3157610 100644 --- a/xts5/tset/Xlib13/Makefile.am +++ b/xts5/tset/Xlib13/Makefile.am @@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = subdir-objects AM_CFLAGS = $(XTS_LCFLAGS) $(XTS_CFLAGS) LDADD = $(TCM) $(XTS_LLIBS) $(XTS_LIBS) -check_PROGRAMS = $(tprogs) +libexec_PROGRAMS = $(tprogs) BUILT_SOURCES = $(tprogs:$(EXEEXT)=.c) CLEANFILES = $(BUILT_SOURCES) diff --git a/xts5/tset/Xlib14/Makefile.am b/xts5/tset/Xlib14/Makefile.am index b7cc06cb..37618c27 100644 --- a/xts5/tset/Xlib14/Makefile.am +++ b/xts5/tset/Xlib14/Makefile.am @@ -5,7 +5,7 @@ AM_CFLAGS = $(XTS_LCFLAGS) $(XTS_CFLAGS) LDADD = $(TCM) $(XTS_LLIBS) $(XTS_LIBS) \ $(top_builddir)/xts5/src/libXR5/libXR5.a -check_PROGRAMS = $(tprogs) +libexec_PROGRAMS = $(tprogs) BUILT_SOURCES = $(tprogs:$(EXEEXT)=.c) CLEANFILES = $(BUILT_SOURCES) diff --git a/xts5/tset/Xlib15/Makefile.am b/xts5/tset/Xlib15/Makefile.am index 5dd799d1..c557b1ee 100644 --- a/xts5/tset/Xlib15/Makefile.am +++ b/xts5/tset/Xlib15/Makefile.am @@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = subdir-objects AM_CFLAGS = $(XTS_LCFLAGS) $(XTS_CFLAGS) LDADD = $(TCM) $(XTS_LLIBS) $(XTS_LIBS) -check_PROGRAMS = $(tprogs) +libexec_PROGRAMS = $(tprogs) BUILT_SOURCES = $(tprogs:$(EXEEXT)=.c) CLEANFILES = $(BUILT_SOURCES) @@ -58,7 +58,7 @@ tprogs = \ XWithdrawWindow/XWithdrawWindow # Auxiliary programs run from tests -check_PROGRAMS += \ +libexec_PROGRAMS += \ XSetWMProperties/Test1 \ XSetWMProperties/Test2 XSetWMProperties_Test1_LDADD = $(TCMCHILD) $(XTS_LLIBS) $(XTS_LIBS) diff --git a/xts5/tset/Xlib16/Makefile.am b/xts5/tset/Xlib16/Makefile.am index 998a0036..040c2863 100644 --- a/xts5/tset/Xlib16/Makefile.am +++ b/xts5/tset/Xlib16/Makefile.am @@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = subdir-objects AM_CFLAGS = $(XTS_LCFLAGS) $(XTS_CFLAGS) LDADD = $(TCM) $(XTS_LLIBS) $(XTS_LIBS) -check_PROGRAMS = $(tprogs) +libexec_PROGRAMS = $(tprogs) BUILT_SOURCES = $(tprogs:$(EXEEXT)=.c) CLEANFILES = $(BUILT_SOURCES) diff --git a/xts5/tset/Xlib17/Makefile.am b/xts5/tset/Xlib17/Makefile.am index 3808e665..fd0531cb 100644 --- a/xts5/tset/Xlib17/Makefile.am +++ b/xts5/tset/Xlib17/Makefile.am @@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = subdir-objects AM_CFLAGS = $(XTS_LCFLAGS) $(XTS_CFLAGS) LDADD = $(TCM) $(XTS_LLIBS) $(XTS_LIBS) -check_PROGRAMS = $(tprogs) +libexec_PROGRAMS = $(tprogs) BUILT_SOURCES = $(tprogs:$(EXEEXT)=.c) CLEANFILES = $(BUILT_SOURCES) @@ -66,7 +66,7 @@ tprogs = \ XXorRegion/XXorRegion # Auxiliary programs run from tests -check_PROGRAMS += \ +libexec_PROGRAMS += \ XGetDefault/Test3 \ XGetDefault/Test4 \ XGetDefault/Test5 diff --git a/xts5/tset/Xlib3/Makefile.am b/xts5/tset/Xlib3/Makefile.am index ec537aa6..c36cd73a 100644 --- a/xts5/tset/Xlib3/Makefile.am +++ b/xts5/tset/Xlib3/Makefile.am @@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = subdir-objects AM_CFLAGS = $(XTS_LCFLAGS) $(XTS_CFLAGS) LDADD = $(TCM) $(XTS_LLIBS) $(XTS_LIBS) -check_PROGRAMS = $(tprogs) +libexec_PROGRAMS = $(tprogs) BUILT_SOURCES = $(tprogs:$(EXEEXT)=.c) CLEANFILES = $(BUILT_SOURCES) @@ -70,7 +70,7 @@ tprogs = XAllPlanes/XAllPlanes \ XWhitePixelOfScreen/XWhitePixelOfScreen XWhitePixelOfScreen/XWhitePixelOfScreen_m # Auxiliary programs run from tests -check_PROGRAMS += \ +libexec_PROGRAMS += \ XDisplayString/Test1 \ XOpenDisplay/Test1 XDisplayString_Test1_LDADD = $(TCMCHILD) $(XTS_LLIBS) $(XTS_LIBS) diff --git a/xts5/tset/Xlib4/Makefile.am b/xts5/tset/Xlib4/Makefile.am index d5078a8f..9758c5d2 100644 --- a/xts5/tset/Xlib4/Makefile.am +++ b/xts5/tset/Xlib4/Makefile.am @@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = subdir-objects AM_CFLAGS = $(XTS_LCFLAGS) $(XTS_CFLAGS) LDADD = $(TCM) $(XTS_LLIBS) $(XTS_LIBS) -check_PROGRAMS = $(tprogs) +libexec_PROGRAMS = $(tprogs) BUILT_SOURCES = $(tprogs:$(EXEEXT)=.c) CLEANFILES = $(BUILT_SOURCES) diff --git a/xts5/tset/Xlib5/Makefile.am b/xts5/tset/Xlib5/Makefile.am index 8ae8ae43..9931325b 100644 --- a/xts5/tset/Xlib5/Makefile.am +++ b/xts5/tset/Xlib5/Makefile.am @@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = subdir-objects AM_CFLAGS = $(XTS_LCFLAGS) $(XTS_CFLAGS) LDADD = $(TCM) $(XTS_LLIBS) $(XTS_LIBS) -check_PROGRAMS = $(tprogs) +libexec_PROGRAMS = $(tprogs) BUILT_SOURCES = $(tprogs:$(EXEEXT)=.c) CLEANFILES = $(BUILT_SOURCES) diff --git a/xts5/tset/Xlib6/Makefile.am b/xts5/tset/Xlib6/Makefile.am index aa61f62d..5a229aed 100644 --- a/xts5/tset/Xlib6/Makefile.am +++ b/xts5/tset/Xlib6/Makefile.am @@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = subdir-objects AM_CFLAGS = $(XTS_LCFLAGS) $(XTS_CFLAGS) LDADD = $(TCM) $(XTS_LLIBS) $(XTS_LIBS) -check_PROGRAMS = $(tprogs) +libexec_PROGRAMS = $(tprogs) BUILT_SOURCES = $(tprogs:$(EXEEXT)=.c) CLEANFILES = $(BUILT_SOURCES) diff --git a/xts5/tset/Xlib7/Makefile.am b/xts5/tset/Xlib7/Makefile.am index 95811ad3..57351e27 100644 --- a/xts5/tset/Xlib7/Makefile.am +++ b/xts5/tset/Xlib7/Makefile.am @@ -5,7 +5,7 @@ AM_CFLAGS = $(XTS_LCFLAGS) $(XTS_CFLAGS) LDADD = $(TCM) $(XTS_LLIBS) $(XTS_LIBS) \ $(top_builddir)/xts5/src/libXR5/libXR5.a -check_PROGRAMS = $(tprogs) +libexec_PROGRAMS = $(tprogs) BUILT_SOURCES = $(tprogs:$(EXEEXT)=.c) CLEANFILES = $(BUILT_SOURCES) diff --git a/xts5/tset/Xlib8/Makefile.am b/xts5/tset/Xlib8/Makefile.am index 6b05d12b..8fe5a345 100644 --- a/xts5/tset/Xlib8/Makefile.am +++ b/xts5/tset/Xlib8/Makefile.am @@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = subdir-objects AM_CFLAGS = $(XTS_LCFLAGS) $(XTS_CFLAGS) LDADD = $(TCM) $(XTS_LLIBS) $(XTS_LIBS) -check_PROGRAMS = $(tprogs) +libexec_PROGRAMS = $(tprogs) BUILT_SOURCES = $(tprogs:$(EXEEXT)=.c) CLEANFILES = $(BUILT_SOURCES) diff --git a/xts5/tset/Xlib9/Makefile.am b/xts5/tset/Xlib9/Makefile.am index d87d7e2d..b27329ef 100644 --- a/xts5/tset/Xlib9/Makefile.am +++ b/xts5/tset/Xlib9/Makefile.am @@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = subdir-objects AM_CFLAGS = $(XTS_LCFLAGS) $(XTS_CFLAGS) LDADD = $(TCM) $(XTS_LLIBS) $(XTS_LIBS) -check_PROGRAMS = $(tprogs) +libexec_PROGRAMS = $(tprogs) BUILT_SOURCES = $(tprogs:$(EXEEXT)=.c) CLEANFILES = $(BUILT_SOURCES) diff --git a/xts5/tset/Xopen/Makefile.am b/xts5/tset/Xopen/Makefile.am index 3012fe29..45e22d40 100644 --- a/xts5/tset/Xopen/Makefile.am +++ b/xts5/tset/Xopen/Makefile.am @@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = subdir-objects AM_CFLAGS = $(XTS_LCFLAGS) $(XTS_CFLAGS) LDADD = $(TCM) $(XTS_LLIBS) $(XTS_LIBS) -check_PROGRAMS = $(tprogs) +libexec_PROGRAMS = $(tprogs) BUILT_SOURCES = $(tprogs:$(EXEEXT)=.c) CLEANFILES = $(BUILT_SOURCES) diff --git a/xts5/tset/Xproto/Makefile.am b/xts5/tset/Xproto/Makefile.am index dabf17b9..ae6e21a7 100644 --- a/xts5/tset/Xproto/Makefile.am +++ b/xts5/tset/Xproto/Makefile.am @@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = subdir-objects AM_CFLAGS = $(XP_LCFLAGS) $(XP_CFLAGS) LDADD = $(TCM) $(XP_LLIBS) $(XP_LIBS) -check_PROGRAMS = $(tprogs) +libexec_PROGRAMS = $(tprogs) BUILT_SOURCES = $(tprogs:$(EXEEXT)=.c) CLEANFILES = $(BUILT_SOURCES) -- cgit v1.2.3 From 25ce85eed58da8608c5573b23fc821869fc9bc4a Mon Sep 17 00:00:00 2001 From: Tinderbox user Date: Fri, 11 Sep 2009 10:28:32 +1000 Subject: Add tetexec_cfg, tet_scen and the scenarios to data files. --- configure.ac | 1 + xts5/Makefile.am | 5 +++-- xts5/scenarios/Makefile.am | 39 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 xts5/scenarios/Makefile.am (limited to 'xts5') diff --git a/configure.ac b/configure.ac index 8398ae92..affa90f3 100644 --- a/configure.ac +++ b/configure.ac @@ -105,6 +105,7 @@ src/tet3/tcm/Makefile src/tet3/tcc/Makefile src/tet3/tcclib/Makefile xts5/Makefile +xts5/scenarios/Makefile xts5/src/Makefile xts5/src/lib/Makefile xts5/src/libproto/Makefile diff --git a/xts5/Makefile.am b/xts5/Makefile.am index 0428f8dd..53c51e39 100644 --- a/xts5/Makefile.am +++ b/xts5/Makefile.am @@ -1,8 +1,9 @@ include common.mk -SUBDIRS = . src fonts tset +SUBDIRS = . src fonts tset scenarios -libexec_SCRIPTS = tetexec.cfg +xts5_DATA = tetexec.cfg tet_scen +xts5dir = $(datadir)/xts5 XTS_CONFIG = TET_ROOT='$(TET_ROOT)' DISPLAY='$(XT_DISPLAY)' \ XSET='$(XSET)' XDPYINFO='$(XDPYINFO)' \ diff --git a/xts5/scenarios/Makefile.am b/xts5/scenarios/Makefile.am new file mode 100644 index 00000000..e9fdb672 --- /dev/null +++ b/xts5/scenarios/Makefile.am @@ -0,0 +1,39 @@ +include ../common.mk + +scenarios_DATA = \ + shape_scen \ + XIproto_scen \ + XI_scen \ + Xlib10_scen \ + Xlib11_scen \ + Xlib12_scen \ + Xlib13_scen \ + Xlib14_scen \ + Xlib15_scen \ + Xlib16_scen \ + Xlib17_scen \ + Xlib3_scen \ + Xlib4_scen \ + Xlib5_scen \ + Xlib6_scen \ + Xlib7_scen \ + Xlib8_scen \ + Xlib9_scen \ + Xopen_scen \ + Xproto_scen \ + Xt10_scen \ + Xt11_scen \ + Xt12_scen \ + Xt13_scen \ + Xt14_scen \ + Xt15_scen \ + Xt3_scen \ + Xt4_scen \ + Xt5_scen \ + Xt6_scen \ + Xt7_scen \ + Xt8_scen \ + Xt9_scen \ + XtC_scen \ + XtE_scen +scenariosdir = $(datadir)/xts5/scenarios -- cgit v1.2.3