File: record.lua

package info (click to toggle)
lua-lgi 0.9.2-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,388 kB
  • sloc: ansic: 5,082; makefile: 169; sh: 31
file content (25 lines) | stat: -rw-r--r-- 656 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--[[--------------------------------------------------------------------------

  LGI testsuite, record test suite.

  Copyright (c) 2012 Pavel Holejsovsky
  Licensed under the MIT license:
  http://www.opensource.org/licenses/mit-license.php

--]]--------------------------------------------------------------------------

local lgi = require 'lgi'
local GLib = lgi.GLib
local GObject = lgi.GObject

local check = testsuite.check

-- Basic GObject testing
local record = testsuite.group.new('record')

function record.native()
   local c = GObject.EnumValue()
   local p = c._native
   check(type(p) == 'userdata')
   check(GObject.EnumValue(p) == c)
end