]> ocean-lang.org Git - ocean/blobdiff - csrc/oceani.mdc
oceani: improve test coverage
[ocean] / csrc / oceani.mdc
index 65790ec985469c5268208cd68bb38a8fc116f1df..415c024e2dd55cd086b765c5bb4c93493c548cb9 100644 (file)
@@ -226,7 +226,7 @@ structures can be used.
                                exit(1);
                        }
                } else
-                       ss = s;
+                       ss = s;                         // NOTEST
                parse_oceani(ss->code, &context.config, dotrace ? stderr : NULL);
 
                if (!context.prog) {
@@ -494,7 +494,7 @@ Named type are stored in a simple linked list.  Objects of each type are
        static void type_print(struct type *type, FILE *f)
        {
                if (!type)
-                       fputs("*unknown*type*", f);
+                       fputs("*unknown*type*", f);     // NOTEST
                else if (type->name.len)
                        fprintf(f, "%.*s", type->name.len, type->name.txt);
                else if (type->print_type)
@@ -509,7 +509,7 @@ Named type are stored in a simple linked list.  Objects of each type are
                        type->init(type, val);
        }
 
-       static void dup_value(struct type *type, 
+       static void dup_value(struct type *type,
                              struct value *vold, struct value *vnew)
        {
                if (type && type->dup)
@@ -523,7 +523,7 @@ Named type are stored in a simple linked list.  Objects of each type are
                        return tl->cmp_order(tl, tr, left, right);
                if (tl && tl->cmp_eq)
                        return tl->cmp_eq(tl, tr, left, right);
-               return -1;
+               return -1;                              // NOTEST
        }
 
        static void print_value(struct type *type, struct value *v)
@@ -619,7 +619,7 @@ A separate function encoding these cases will simplify some code later.
        static void _free_value(struct type *type, struct value *v)
        {
                if (!v)
-                       return;
+                       return;         // NOTEST
                switch (type->vtype) {
                case Vnone: break;
                case Vstr: free(v->str.txt); break;
@@ -645,9 +645,9 @@ A separate function encoding these cases will simplify some code later.
                case Vbool:
                        val->bool = 0;
                        break;
-               case Vlabel:                    // NOTEST
-                       val->label = NULL;      // NOTEST
-                       break;                  // NOTEST
+               case Vlabel:
+                       val->label = NULL;
+                       break;
                }
        }
 
@@ -970,7 +970,7 @@ need to be freed.  For this we need to be able to find it, so assume that
 
                if (primary->merged)
                        // shouldn't happen
-                       primary = primary->merged;
+                       primary = primary->merged;      // NOTEST
 
                for (v = primary->previous; v; v=v->previous)
                        if (v == secondary || v == secondary->merged ||
@@ -1214,8 +1214,8 @@ is started, so there is no need to allocate until the size is known.
                        if (!c->local || !v->type)
                                return NULL;
                        if (v->frame_pos + v->type->size > c->local_size) {
-                               printf("INVALID frame_pos\n"); // NOTEST
-                               exit(2);
+                               printf("INVALID frame_pos\n");  // NOTEST
+                               exit(2);                        // NOTEST
                        }
                        return c->local + v->frame_pos;
                }
@@ -1349,8 +1349,8 @@ from the `exec_types` enum.
                }
                if (loc->type == Xbinode)
                        return __fput_loc(cast(binode,loc)->left, f) ||
-                              __fput_loc(cast(binode,loc)->right, f);
-               return 0;
+                              __fput_loc(cast(binode,loc)->right, f);  // NOTEST
+               return 0;                       // NOTEST
        }
        static void fput_loc(struct exec *loc, FILE *f)
        {