e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync/* ***** BEGIN LICENSE BLOCK *****
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * Version: MPL 1.1/GPL 2.0/LGPL 2.1
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * The contents of this file are subject to the Mozilla Public License Version
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * 1.1 (the "License"); you may not use this file except in compliance with
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * the License. You may obtain a copy of the License at
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * Software distributed under the License is distributed on an "AS IS" basis,
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
e4dec40ee9c070be42661febd9ae047056007ec5vboxsync * for the specific language governing rights and limitations under the
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * The Original Code is mozilla.org code.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * The Initial Developer of the Original Code is
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * Netscape Communications Corporation.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * Portions created by the Initial Developer are Copyright (C) 1998
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * the Initial Developer. All Rights Reserved.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * Contributor(s):
e4dec40ee9c070be42661febd9ae047056007ec5vboxsync * Alternatively, the contents of this file may be used under the terms of
e4dec40ee9c070be42661febd9ae047056007ec5vboxsync * either of the GNU General Public License Version 2 or later (the "GPL"),
e4dec40ee9c070be42661febd9ae047056007ec5vboxsync * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
e4dec40ee9c070be42661febd9ae047056007ec5vboxsync * in which case the provisions of the GPL or the LGPL are applicable instead
e4dec40ee9c070be42661febd9ae047056007ec5vboxsync * of those above. If you wish to allow use of your version of this file only
e4dec40ee9c070be42661febd9ae047056007ec5vboxsync * under the terms of either the GPL or the LGPL, and not to allow others to
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * use your version of this file under the terms of the MPL, indicate your
e4dec40ee9c070be42661febd9ae047056007ec5vboxsync * decision by deleting the provisions above and replace them with the notice
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * and other provisions required by the GPL or the LGPL. If you do not delete
e4dec40ee9c070be42661febd9ae047056007ec5vboxsync * the provisions above, a recipient may use your version of this file under
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync * the terms of any one of the MPL, the GPL or the LGPL.
83f490cd5eec4567f8ee5c9e481f9d9c739b3061vboxsync * ***** END LICENSE BLOCK ***** */
83f490cd5eec4567f8ee5c9e481f9d9c739b3061vboxsync// The return from strcmp etc is only defined to be postive, zero or
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync// negative. The magnitude of a non-zero return is irrelevant.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync// Verify that nsCRT versions of string comparison routines get the
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync// same answers as the native non-unicode versions. We only pass in
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync// iso-latin-1 strings, so the comparison must be valid.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncstatic void Check(const char* s1, const char* s2, PRIntn n)
91d3c13d786ab55099e36be254f46bd98254b482vboxsync NS_ASSERTION(sign(clib_n) == sign(u2_n), "strncmp");
91d3c13d786ab55099e36be254f46bd98254b482vboxsync#define NUM_TESTS int((sizeof(tests) / sizeof(tests[0])))