Commits

Lucian Brănescu-Mihăilă committed 5ebb06f

Add puffinc. It doesn't work, atm.

  • Participants
  • Parent commits 06e3d77

Comments (0)

Files changed (4)

+#!/usr/bin/env python3
+
+from puffin.compiler import main
+
+main()

File objects/setup.winxed

 function setup_stable_libraries(var puffin)
 {
     setup_winxed_lib(puffin, "builtins", [],
+        "boot",
         "instance",
         "object",
         "type",

File objects/t/boot.t

 
 class boot {
     function builtins_call() {
-        using Python.builtins;
-
         self.assert.throws_nothing(function(){
+            using Python.builtins;
             builtins();
         });
     }

File objects/t/int.t

         self.assert.equal(f(i).__value__, 0);
     }
 
+    function create_one() {
+        var i = intcls();
+	var f = i.__new__;
+
+	var a = f(i, 1);
+	self.assert.equal(a.__value__, 1);
+    }
+
     function repr() {
         var i = intcls();
         var f = i.__new__;
         var b = f(i, 22);
 
         var add = i.__add__;
-        self.assert.equal(add(a, b).__value__, 42);
+	var r = add(a, b);
+        self.assert.equal(r.__value__, 42);
     }
 }