record.lua 656 B

1234567891011121314151617181920212223242526
  1. --[[--------------------------------------------------------------------------
  2. LGI testsuite, record test suite.
  3. Copyright (c) 2012 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 GLib = lgi.GLib
  9. local GObject = lgi.GObject
  10. local check = testsuite.check
  11. -- Basic GObject testing
  12. local record = testsuite.group.new('record')
  13. function record.native()
  14. local c = GObject.EnumValue()
  15. local p = c._native
  16. check(type(p) == 'userdata')
  17. check(GObject.EnumValue(p) == c)
  18. end