c++ - LevelDB TEST_ Prefix for Methods -
i'm reading through code in leveldb , keep running across test_ prefix that's used. expect test_ indicates method used tests able operate on internals wouldn't otherwise public. such, i'd expect none of in critical paths. i'd expect them in none of primary methods. however, test_compactrange example called compactrange apart of main compaction path. test_ prefix mean, , can find info? the authors seem use test_ prefix public methods not intended part of api. methods public make testing easier, , prefixed test_ discourage users calling them. why shouldn't these methods appear in critical paths? private methods, visible testing. other thoughts: i'm not sure whether naming convention best practice. c++ has friend declarations accomplish similar. the naming convention similar java guava library's @visiblefortesting annotation edit: clear, i'm making guess based on handful of methods test_ prefix. grepping codebase shows such...