From 0e921b5dffecf9bd7d153b3126f55b72930b6965 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Fri, 2 Nov 2012 17:54:14 -0400 Subject: [PATCH] Speed display, bug373. --- Changes | 2 +- include/verilated.cpp | 2 +- internals.pod | 9 ++++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Changes b/Changes index 66f62a348..e3bcd9482 100644 --- a/Changes +++ b/Changes @@ -9,7 +9,7 @@ indicates the contributor was also the author of the fix; Thanks! **** Fix large shift error on large shift constants. [David Welch] -**** Fix $display mangling on GCC 4.7, msg927. [R Diez] +**** Fix $display mangling on GCC 4.7 and speed up, msg927, bug373. [R Diez] **** Fix missing var access functions when no DPI, bug572. [Amir Gonnen] diff --git a/include/verilated.cpp b/include/verilated.cpp index bb7f09496..5e53f1679 100644 --- a/include/verilated.cpp +++ b/include/verilated.cpp @@ -308,7 +308,7 @@ void _vl_vsformat(string& output, const char* formatp, va_list ap) { const char *ep = pos; while (ep[0] && ep[0]!='%') ep++; if (ep != pos) { - output += string(pos, ep-pos); + output.append(pos, ep-pos); pos += ep-pos-1; } } else { // Format character diff --git a/internals.pod b/internals.pod index d91480fec..c7a82f55f 100644 --- a/internals.pod +++ b/internals.pod @@ -371,6 +371,13 @@ the documentation in: test_regress/t/driver.pl --help +It is important to add tests for failures as well as success (for example to +check that an error message is correctly triggered). + +Tests that fail should by convenition have the suffix C<_bad> in their name, +and include C 1> in either their C or C step as +appropriate. + Developers will also want to configure with two extra flags: =over 4 @@ -382,7 +389,7 @@ ensure no sloppy code gets added, however it can be painful when it comes to testing, since third party code used in the tests (e.g. SystemC) may not be warning free. -=item --enable-long-tests +=item --enable-longtests In addition to the standard C, SystemC and SystemPerl tests also run the tests in the C, C and C directories