File: clear_memory.cpp

package info (click to toggle)
yrmcds 1.1.9-1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye
  • size: 940 kB
  • sloc: cpp: 11,149; sh: 148; makefile: 117
file content (10 lines) | stat: -rw-r--r-- 223 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
#include <cybozu/util.hpp>
#include <cybozu/test.hpp>

AUTOTEST(clear_memory) {
    char hoge[] = "abcdef";
    cybozu::clear_memory(hoge, sizeof(hoge));
    for( char c : hoge ) {
        cybozu_assert(c == '\0');
    }
}