Merge: doc: fixed some typos and other misc. corrections
[nit.git] / tests / test_ffi_c_more.nit
index 51d2a6b..9dcf6db 100644 (file)
@@ -30,7 +30,7 @@ in "C" `{
        }
 `}
 
-extern A
+extern class A
        new is extern `{ return malloc(1); `}
        new new_implicit `{ return malloc(1); `}
        new new_in_language is extern in "C" `{ return malloc(1); `}
@@ -38,16 +38,16 @@ extern A
 
        fun m : Int is extern `{ return 10; `}
 
-       fun n : String is extern import String::from_cstring `{
-               return new_String_from_cstring( "allo" );
+       fun n : String is extern import CString.to_s `{
+               return CString_to_s( "allo" );
        `}
 
-       fun o ( str : String ) is extern import String::to_cstring `{
+       fun o ( str : String ) is extern import String.to_cstring `{
                f( String_to_cstring( str ) );
        `}
 
        fun p : Int import m `{
-               return A_m( recv ) + 5;
+               return A_m( self ) + 5;
        `}
 
        fun in_language : Int is extern in "C" `{
@@ -62,19 +62,19 @@ extern A
        fun inline_implicit : Int `{ return  7; `}
 end
 
-extern B
-special A
+extern class B
+super A
 end
 
-extern C `{int*`}
+extern class C `{int*`}
 end
 
-extern D
-special C
+extern class D
+super C
 end
 
-extern E
-special C
+extern class E
+super C
 end
 
 var a = new A