Commits

Dean Hall  committed 5acf689

Fixes Issue 184 on branch v10 Big Rewrite

  • Participants
  • Parent commits bea5b57
  • Branches v10

Comments (0)

Files changed (3)

File src/tests/system/runtests.c

     "t245", "t256", "t259", "t281", "t284",
     "t290", "t291", "t329", "t347a","t349",
     "t370", "t374", "t376", "t377", "t378d",
+    "t384",
     };
 uint16_t num_typical_tests = sizeof(typical_tests) / sizeof(int8_t *);
 

File src/tests/system/t384.c

-/*
-# This file is Copyright 2011 Dean Hall.
-#
-# This file is part of the Python-on-a-Chip program.
-# Python-on-a-Chip is free software: you can redistribute it and/or modify
-# it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1.
-#
-# Python-on-a-Chip is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# A copy of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1
-# is seen in the file COPYING up one directory from this.
-*/
-
-/**
- * System Test 384
- */
-
-#include "pm.h"
-
-
-#define HEAP_SIZE 0x2000
-
-extern unsigned char usrlib_img[];
-
-
-int main(void)
-{
-    uint8_t heap[HEAP_SIZE];
-    PmReturn_t retval;
-
-    retval = pm_init(heap, HEAP_SIZE, MEMSPACE_PROG, usrlib_img);
-    PM_RETURN_IF_ERROR(retval);
-
-    retval = pm_run((uint8_t *)"t384");
-    C_ASSERT((int)retval == PM_RET_EX_TYPE);
-    if (retval == PM_RET_EX_TYPE) return (int)PM_RET_OK;
-    return (int)retval;
-}

File src/vm/interp.c

 
                 /* Handle all integer-to-integer (or bool) comparisons */
                 if (((OBJ_GET_TYPE(TOS) == OBJ_TYPE_INT)
-                     || (OBJ_GET_TYPE(TOS) == OBJ_TYPE_BOOL)
-                     || (OBJ_GET_TYPE(TOS) == OBJ_TYPE_NON))
+                     || (OBJ_GET_TYPE(TOS) == OBJ_TYPE_BOOL))
                     && ((OBJ_GET_TYPE(TOS1) == OBJ_TYPE_INT)
-                        || (OBJ_GET_TYPE(TOS1) == OBJ_TYPE_BOOL)
-                        || (OBJ_GET_TYPE(TOS1) == OBJ_TYPE_NON)))
+                        || (OBJ_GET_TYPE(TOS1) == OBJ_TYPE_BOOL)))
                 {
                     int32_t a = ((pPmInt_t)TOS1)->val;
                     int32_t b = ((pPmInt_t)TOS)->val;