marshal.lua 763 B

123456789101112131415161718192021222324252627282930
  1. --[[--------------------------------------------------------------------------
  2. LGI testsuite, specific marshalling tests
  3. Copyright (c) 2010, 2011 Pavel Holejsovsky
  4. Licensed under the MIT license:
  5. http://www.opensource.org/licenses/mit-license.php
  6. --]]--------------------------------------------------------------------------
  7. local lgi = require 'lgi'
  8. local check = testsuite.check
  9. -- Basic GObject testing
  10. local marshal = testsuite.group.new('marshal')
  11. function marshal.callback_hidedata()
  12. local GLib = lgi.GLib
  13. local main_loop = GLib.MainLoop()
  14. local argc
  15. GLib.timeout_add(GLib.PRIORITY_DEFAULT, 100,
  16. function(...)
  17. argc = select('#', ...)
  18. main_loop:quit()
  19. end)
  20. main_loop:run()
  21. check(argc == 0)
  22. end