00001 /* 00002 * Scale Stack 00003 * 00004 * Copyright 2010 Eric Day 00005 * 00006 * Licensed under the Apache License, Version 2.0 (the "License"); 00007 * you may not use this file except in compliance with the License. 00008 * You may obtain a copy of the License at 00009 * 00010 * http://www.apache.org/licenses/LICENSE-2.0 00011 * 00012 * Unless required by applicable law or agreed to in writing, software 00013 * distributed under the License is distributed on an "AS IS" BASIS, 00014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 * See the License for the specific language governing permissions and 00016 * limitations under the License. 00017 */ 00018 00024 #include "config.h" 00025 00026 #include <scalestack/kernel/test.h> 00027 00028 class test_suite: public scalestack::kernel::test_suite<test_suite> 00029 { 00030 public: 00031 00032 void setup(void) 00033 { 00034 core->add_module_option_value("threading::service", "", 00035 "threading::pthreads"); 00036 core->get_or_add_module("threading::test"); 00037 } 00038 00039 void test_default(void) 00040 { 00041 core->run(); 00042 } 00043 00044 void test_stack_size(void) 00045 { 00046 core->add_module_option_value("threading::pthreads", "thread_stack_size", 00047 "16384"); 00048 core->run(); 00049 } 00050 00051 test_suite(int argc, const char** argv): 00052 scalestack::kernel::test_suite<test_suite>(argc, argv) 00053 { 00054 test_case(test_suite::test_default); 00055 test_case(test_suite::test_stack_size); 00056 } 00057 }; 00058 00059 int main(int argc, const char* argv[]) 00060 { 00061 test_suite test_suite(argc - 1, argv + 1); 00062 test_suite.run(); 00063 return 0; 00064 }
1.6.3