Changes in / [9d85038:1bc9dcb]
- Location:
- src
- Files:
-
- 4 deleted
- 5 edited
-
libcfa/containers/maybe (modified) (3 diffs)
-
libcfa/containers/result (modified) (3 diffs)
-
libcfa/containers/result.c (modified) (2 diffs)
-
tests/.expect/maybe.txt (deleted)
-
tests/.expect/result.txt (deleted)
-
tests/maybe.c (deleted)
-
tests/preempt_longrun/Makefile.am (modified) (1 diff)
-
tests/preempt_longrun/Makefile.in (modified) (1 diff)
-
tests/result.c (deleted)
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/containers/maybe
r9d85038 r1bc9dcb 10 10 // Created On : Wed May 24 14:43:00 2017 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Fri Jun 16 15:42:00 201713 // Update Count : 212 // Last Modified On : Thr May 25 16:36:00 2017 13 // Update Count : 1 14 14 // 15 15 … … 46 46 bool ?!=?(maybe(T) this, zero_t); 47 47 48 /* Waiting for bug#11 to be fixed.49 48 forall(otype T) 50 49 maybe(T) maybe_value(T value); … … 52 51 forall(otype T) 53 52 maybe(T) maybe_none(); 54 */55 53 56 54 forall(otype T) -
src/libcfa/containers/result
r9d85038 r1bc9dcb 10 10 // Created On : Wed May 24 14:45:00 2017 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Fri Jun 16 15:41:00 201713 // Update Count : 212 // Last Modified On : Thr May 25 16:39:00 2017 13 // Update Count : 1 14 14 // 15 15 … … 55 55 bool ?!=?(result(T, E) this, zero_t); 56 56 57 /* Wating for bug#11 to be fixed.58 57 forall(otype T, otype E) 59 58 result(T, E) result_value(T value); … … 61 60 forall(otype T, otype E) 62 61 result(T, E) result_error(E error); 63 */64 62 65 63 forall(otype T, otype E) -
src/libcfa/containers/result.c
r9d85038 r1bc9dcb 74 74 forall(otype T, otype E) 75 75 bool ?!=?(result(T, E) this, zero_t) { 76 return this.has_value;76 return !this.has_value; 77 77 } 78 78 … … 100 100 forall(otype T, otype E) 101 101 E 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"); 103 103 return this->error; 104 104 } -
src/tests/preempt_longrun/Makefile.am
r9d85038 r1bc9dcb 32 32 all-local: ${TESTS:=.run} 33 33 34 % : %.c ${CC}34 % : %.c /u0/tdelisle/workspace/cfa-cc/bin/cfa 35 35 ${AM_V_GEN}${CC} ${CFLAGS} ${<} -o ${@} 36 36 -
src/tests/preempt_longrun/Makefile.in
r9d85038 r1bc9dcb 466 466 all-local: ${TESTS:=.run} 467 467 468 % : %.c ${CC}468 % : %.c /u0/tdelisle/workspace/cfa-cc/bin/cfa 469 469 ${AM_V_GEN}${CC} ${CFLAGS} ${<} -o ${@} 470 470
Note:
See TracChangeset
for help on using the changeset viewer.