Ignore:
Timestamp:
Jun 16, 2017, 3:49:27 PM (7 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
0892b1b
Parents:
d33bc7c
Message:

I've been sitting on these tests for a while. New tests for maybe/result. Passing on my machine.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/containers/result.c

    rd33bc7c r20877d2  
    7474forall(otype T, otype E)
    7575bool ?!=?(result(T, E) this, zero_t) {
    76         return !this.has_value;
     76        return this.has_value;
    7777}
    7878
     
    100100forall(otype T, otype E)
    101101E get_error(result(T, E) * this) {
    102         assertf(this->has_value, "attempt to get from result without error");
     102        assertf(!this->has_value, "attempt to get from result without error");
    103103        return this->error;
    104104}
Note: See TracChangeset for help on using the changeset viewer.