Peter Johnson
18659257d3
Storage: Make setters globally atomic.
...
Previously, setters were locally but not globally atomic because they
used GetEntry() (globally atomic) in conjunction with locally atomic
gets/sets to the StorageEntry. To support synchronizing network handshakes
they need to be globally atomic.
GetEntry() has been removed due to this issue, so a helper was added to
StorageTest instead.
2015-07-26 09:27:23 -07:00
Peter Johnson
507b083e77
WireEncoderTest.cpp: Don't test compiler truncation.
2015-07-23 22:06:57 -07:00
Peter Johnson
13bc05d9ec
leb128Test: Fix incorrectly sized constants.
2015-07-23 22:04:51 -07:00
Peter Johnson
9c204533e8
Value: Disambiguate std::string&& and StringRef.
...
Making the former a template causes the compiler to prefer the latter
when given a bare C string.
2015-07-22 22:08:13 -07:00
Peter Johnson
5df62ac172
Storage: Disable use of update queue by default.
...
This ensures we don't "leak" memory for local use when the dispatch thread
is not running.
2015-07-20 22:24:47 -07:00
Peter Johnson
29691e0ac5
StorageTest: Add LoadPersistent and SavePersistent coverage.
2015-07-19 22:45:20 -07:00
Peter Johnson
b0802f3e26
StorageTest: Add fixture classes, add GetEntryInfo test.
2015-07-19 19:43:27 -07:00
Peter Johnson
67ae9e1ba7
Add initial set of unit tests for Storage.
2015-07-19 18:11:36 -07:00
Peter Johnson
cf18355fe2
Unit tests: Prefer constructor to SetUp() in fixtures.
2015-07-19 16:30:04 -07:00
Peter Johnson
fcbd2751ba
Provide C++ API. Move all classes to "nt" namespace.
...
The C API is now just simple wrappers around the C++ API.
2015-07-17 07:21:07 -07:00
Peter Johnson
9906116d23
Don't base Value on NT_Value.
...
Also use std::string instead of NT_String.
Conversions to/from the internal structures will be done at the interface.
2015-07-16 01:38:27 -07:00
Peter Johnson
eecf0deeec
Add WireDecoder test and finish WireEncoder test.
...
Change-Id: I0d2b3421df55f8f986678b694bbd5481e8fc6e6b
2015-07-11 09:33:34 -07:00
Peter Johnson
1634773529
Finish WireEncoder tests and fix a bug.
...
Change-Id: Iddb6003cf2050aebbda4650a5596342288432fde
2015-07-11 09:33:34 -07:00
Peter Johnson
547e2ad72b
leb128 test: naming consistency
...
Change-Id: Ib37433110781d87f8736c82d4b8249d580b5a1dd
2015-07-11 09:33:34 -07:00
Peter Johnson
ca90648118
Add copyrights and header guards.
...
Change-Id: I1e4c22a1626095750b6ffa8e0edd5e078ef221ec
2015-07-11 09:33:34 -07:00
Peter Johnson
958fbaa819
ValueTest / StringValueTest: Make conversion function static.
...
Change-Id: Ia7411fd58cfd7ee9225a7c7f90534567e7ae02ba
2015-07-11 09:33:34 -07:00
Peter Johnson
fa19a54ab7
Separate ValueTest and StringValueTest into headers.
...
Change-Id: If326e6943a11f271ef939dc815a45ba0b4ee271c
2015-07-11 09:33:34 -07:00
Peter Johnson
c9c1b7e5d8
Rename test files.
...
Change-Id: If7a2894f21b86bf9e4036e3069a2e5602ca932b0
2015-07-11 09:33:34 -07:00
Peter Johnson
4d5e5c82d4
Start WireEncoder testing.
...
Change-Id: I0e4161f5b3cab167d3c3d650588671be8a1b78b3
2015-07-11 09:33:34 -07:00
Peter Johnson
09d6619a58
Add LEB128 test.
...
Change-Id: Iaeb2d818226a281a905cb69ef12725e504c3a03d
2015-07-11 09:33:34 -07:00
Peter Johnson
ae42eee8e1
More Base64 fixes (correct decode return value).
...
Change-Id: Ic8f5eb7efd39e1d155a458aa41e430232bee7c7d
2015-07-11 09:33:34 -07:00
Peter Johnson
1225d3ef75
Slight whitespace fix.
...
Change-Id: I752a000775efefd45cf5c5be0a084e855f68e13f
2015-07-11 09:33:34 -07:00
Peter Johnson
407ded6b8c
Use ASSERT_EQ with correct order of arguments.
...
Change-Id: Ieed4703283ae222df3aee8adb07ca1e65e863c62
2015-07-11 09:33:34 -07:00
Peter Johnson
c7b5266f9a
Add Base64 tests and fix a couple of bugs found.
...
Change-Id: I9762fe018be78cf38aa506026e78139e2479cd98
2015-07-11 09:33:33 -07:00
Peter Johnson
5a0fccc9cf
Add unit tests for StringValue and Value.
...
Add unit test framework to CMakeLists.txt.
Fix a couple of bugs found by unit tests.
Change-Id: I2092a7f0570fae0f19f9e083c4837ccefcc4ca1a
2015-07-11 09:33:33 -07:00