mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-06 16:57:04 +08:00
Testing of memberscope so we can close #91
This commit is contained in:
parent
faaa964565
commit
856b682e72
12
unittests/memberscope.chai
Normal file
12
unittests/memberscope.chai
Normal file
@ -0,0 +1,12 @@
|
||||
attr Vector3::x
|
||||
attr Vector3::y
|
||||
attr Vector3::z
|
||||
|
||||
def Vector3::Vector3(x, y, z) {
|
||||
this.x = x
|
||||
this.y = y
|
||||
this.z = z
|
||||
}
|
||||
|
||||
var v = Vector3(1,2,3);
|
||||
print(v.x);
|
||||
1
unittests/memberscope.txt
Normal file
1
unittests/memberscope.txt
Normal file
@ -0,0 +1 @@
|
||||
1
|
||||
Loading…
x
Reference in New Issue
Block a user