// -*- C++ -*- /* This is the bullet class definition file. * This file is part of *====================================================== * * LyX, The Document Processor * * Copyright (C) 1997-1998 Allan Rae * and the LyX Team *
*======================================================*/
protected: #ifdef DEBUG_AS_DEFAULT void testInvariant() const
{
assert(font >= MIN);
assert(font < FONTMAX);
assert(character >= MIN);
assert(character < CHARMAX);
assert(size >= MIN);
assert(size < SIZEMAX);
assert(user_text >= -1);
assert(user_text <= 1); // now some relational/operational tests if (user_text == 1) {
assert(font == -1 && (character == -1 && size == -1)); // assert(!text.empty()); // this isn't necessarily an error
} // else if (user_text == -1) { // assert(!text.empty()); // this also isn't necessarily an error // } // else { // // user_text == 0 // assert(text.empty()); // not usually true // }
} #endif
private: /** This enum makes adding additional panels or changing panel sizes easier. Since you only need change these values for all tests to be correct for the new values. Note: MAX means the size of the array so to test you need: (x < MAX) *not* (x <= MAX)
*/ enum { ///
MIN = -1, ///
FONTMAX = 6, ///
CHARMAX = 36, ///
SIZEMAX = 10
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.