nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
online_ide: update to the new API of the loader
[nit.git]
/
tests
/
test_new_native.nit
diff --git
a/tests/test_new_native.nit
b/tests/test_new_native.nit
index
49ab177
..
28facde
100644
(file)
--- a/
tests/test_new_native.nit
+++ b/
tests/test_new_native.nit
@@
-13,10
+13,10
@@
# limitations under the License.
var s = new NativeString(4)
# limitations under the License.
var s = new NativeString(4)
-s[0] = 'N'
-s[2] = 't'
-s[1] = 'i'
-s[3] = '\0'
+s[0] = 0x4Eu8
+s[2] = 0x74u8
+s[1] = 0x69u8
+s[3] = 0u8
print s.class_name
print s[0]
print s.to_s
print s.class_name
print s[0]
print s.to_s
@@
-31,3
+31,10
@@
print a.length
print a[0]
print a.to_a.join(",")
print a[0]
print a.to_a.join(",")
+var i
+i = 3
+a = new NativeArray[Int](i)
+i = 1
+a[i] = i
+print a[i]
+print a[1]