From 7bf5e5c6189a7316b7d1dbcb749c0feb8564c3e5 Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Tue, 1 Jun 2010 18:39:43 -0700 Subject: EXT-3780 FIX Added llprocessor regression test --- indra/llcommon/tests/llprocessor_test.cpp | 67 +++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 indra/llcommon/tests/llprocessor_test.cpp (limited to 'indra/llcommon/tests/llprocessor_test.cpp') diff --git a/indra/llcommon/tests/llprocessor_test.cpp b/indra/llcommon/tests/llprocessor_test.cpp new file mode 100644 index 0000000000..33c75bf229 --- /dev/null +++ b/indra/llcommon/tests/llprocessor_test.cpp @@ -0,0 +1,67 @@ +/** + * @file llprocessor_test.cpp + * @date 2010-06-01 + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "linden_common.h" +#include "../test/lltut.h" + +#include "../llprocessor.h" + + +namespace tut +{ + struct processor + { + }; + + typedef test_group processor_t; + typedef processor_t::object processor_object_t; + tut::processor_t tut_processor("processor"); + + template<> template<> + void processor_object_t::test<1>() + { + set_test_name("LLProcessorInfo regression test"); + + LLProcessorInfo pi; + F64 freq = pi.getCPUFrequency(); + //bool sse = pi.hasSSE(); + //bool sse2 = pi.hasSSE2(); + //bool alitvec = pi.hasAltivec(); + std::string family = pi.getCPUFamilyName(); + std::string brand = pi.getCPUBrandName(); + //std::string steam = pi.getCPUFeatureDescription(); + + ensure_not_equals("Unknown Brand name", brand, "Unknown"); + ensure_not_equals("Unknown Family name", family, "Unknown"); + ensure_not_equals("Undetected Frequency", freq, LLSD(0).asReal()); + } +} \ No newline at end of file -- cgit v1.2.3 From 070954495ab8d6090352ea60c101c7cc30f17b3f Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Tue, 1 Jun 2010 18:43:41 -0700 Subject: Added eol-at-eof --- indra/llcommon/tests/llprocessor_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcommon/tests/llprocessor_test.cpp') diff --git a/indra/llcommon/tests/llprocessor_test.cpp b/indra/llcommon/tests/llprocessor_test.cpp index 33c75bf229..83b235cae5 100644 --- a/indra/llcommon/tests/llprocessor_test.cpp +++ b/indra/llcommon/tests/llprocessor_test.cpp @@ -64,4 +64,4 @@ namespace tut ensure_not_equals("Unknown Family name", family, "Unknown"); ensure_not_equals("Undetected Frequency", freq, LLSD(0).asReal()); } -} \ No newline at end of file +} -- cgit v1.2.3 From 71f39136795609700a6eb46aad7b0f1397a860d0 Mon Sep 17 00:00:00 2001 From: "palange@pdp47.lindenlab.com" Date: Wed, 2 Jun 2010 15:24:59 -0700 Subject: EXT-3780 FIX Fixed CPU MHz to be MHz on all platforms. --- indra/llcommon/tests/llprocessor_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcommon/tests/llprocessor_test.cpp') diff --git a/indra/llcommon/tests/llprocessor_test.cpp b/indra/llcommon/tests/llprocessor_test.cpp index 83b235cae5..a9e312b70b 100644 --- a/indra/llcommon/tests/llprocessor_test.cpp +++ b/indra/llcommon/tests/llprocessor_test.cpp @@ -62,6 +62,6 @@ namespace tut ensure_not_equals("Unknown Brand name", brand, "Unknown"); ensure_not_equals("Unknown Family name", family, "Unknown"); - ensure_not_equals("Undetected Frequency", freq, LLSD(0).asReal()); + ensure("Reasonable CPU Frequency > 100 && < 10000", freq > 100 && freq < 10000); } } -- cgit v1.2.3