mastercoin-MSC / mastercore

mastercore info
mastercoin.org
MIT License
24 stars 11 forks source link

WIP: Move formatters etc. into own file + tests #173

Closed dexX7 closed 9 years ago

dexX7 commented 10 years ago

All tests pass and building, using the client works as expected.

The Format__MP tests should cover almost everything, tests for strToInt64 were copied from zathras, rounduint64 has none.

strprintf was an alias for tfm::format in util.h which refers to tinyformat.h which seems to have many boost dependencies.

I'm not sure about function names. Upper case, lower case, ...?

Also note: FormatDivisibleMP and FormatIndivisibleMP were in namespace mastercore. If they should be in an explicit mastercore namespace, then I suggest to remove the MP suffix.

m21 commented 10 years ago

Nice to have the tests as part of make fore sure. I am not crazy about the "transformers" name. Maybe mastercore_format.cpp or similar? I kinda prefer shorter filenames to long ones, but that's a very weak comment on my part. Just FYI : I see that at Bitcoin master they are splitting util.cpp into: util.cpp utilmoneystr.cpp utilstrencodings.cpp utiltime.cpp

and need @zathras-crypto and @faizkhan00 on this as well. Thanks!

dexX7 commented 10 years ago

Agreed, mastercoreformat is a much better choice. It may also be considered to move into a seperate directory and get rid of the mastercore prefix. By using one or more namespaces, hints such as __MP() could be further removed.

dexX7 commented 9 years ago

Replaced by #180, #182 and #183.