Changeset 9236060 for src/tests


Ignore:
Timestamp:
Aug 14, 2017, 2:03:39 PM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
74b007ba
Parents:
fd344aa (diff), 54cd58b0 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into references

Location:
src/tests
Files:
5 added
2 deleted
26 edited

Legend:

Unmodified
Added
Removed
  • src/tests/.expect/32/math.txt

    rfd344aa r9236060  
    22remainder:-1 -1 -1
    33remquo:7 0.0999999 7 0.1 7 0.0999999999999999999
    4 div:7 0.0999999 7 0.1 7 0.0999999999999999999
     4div:7, 0.2 7, 0.2 7, 0.2
    55fma:-2 -2 -2
    66fdim:2 2 2
     
    99exp2:2 2 2
    1010expm1:1.71828 1.71828182845905 1.71828182845904524
     11pow:1 1 1 0.273957+0.583701i 0.273957253830121+0.583700758758615i 0.273957253830121071+0.583700758758614628i
     1216 256
     13912673 256 64 -64 0.015625 -0.015625 18.3791736799526 0.264715-1.1922i
    1114log:0 0 0 0.346574+0.785398i 0.346573590279973+0.785398163397448i 0.346573590279972655+0.78539816339744831i
    1215log2:3 3 3
     
    1821cbrt:3 3 3
    1922hypot:1.41421 1.4142135623731 1.41421356237309505
    20 pow:1 1 1 0.273957+0.583701i 0.273957253830121+0.583700758758615i 0.273957253830121071+0.583700758758614628i
    2123sin:0.841471 0.841470984807897 0.841470984807896507 1.29846+0.634964i 1.29845758141598+0.634963914784736i 1.29845758141597729+0.634963914784736108i
    2224cos:0.540302 0.54030230586814 0.540302305868139717 0.83373-0.988898i 0.833730025131149-0.988897705762865i 0.833730025131149049-0.988897705762865096i
     
    5355frexp:0.5 3 0.5 3 0.5 3
    5456ldexp:8 8 8
    55 modf:2 0.3 2 0.3 2 0.3 nextafter:2 2 2
     57modf:2 0.3 2 0.3 2 0.3
     58modf:2, 0.3 2, 0.3 2, 0.3
     59nextafter:2 2 2
    5660nexttoward:2 2 2
    5761scalbn:16 16 16
  • src/tests/.expect/64/math.txt

    rfd344aa r9236060  
    22remainder:-1 -1 -1
    33remquo:7 0.0999999 7 0.1 7 0.0999999999999999999
    4 div:7 0.0999999 7 0.1 7 0.0999999999999999999
     4div:7, 0.2 7, 0.2 7, 0.2
    55fma:-2 -2 -2
    66fdim:2 2 2
     
    99exp2:2 2 2
    1010expm1:1.71828 1.71828182845905 1.71828182845904524
     11pow:1 1 1 0.273957+0.583701i 0.273957253830121+0.583700758758615i 0.273957253830121071+0.583700758758614627i
     1216 256
     13912673 256 64 -64 0.015625 -0.015625 18.3791736799526 0.264715-1.1922i
    1114log:0 0 0 0.346574+0.785398i 0.346573590279973+0.785398163397448i 0.346573590279972655+0.78539816339744831i
    1215log2:3 3 3
     
    1821cbrt:3 3 3
    1922hypot:1.41421 1.4142135623731 1.41421356237309505
    20 pow:1 1 1 0.273957+0.583701i 0.273957253830121+0.583700758758615i 0.273957253830121071+0.583700758758614628i
    2123sin:0.841471 0.841470984807897 0.841470984807896507 1.29846+0.634964i 1.29845758141598+0.634963914784736i 1.29845758141597729+0.634963914784736108i
    2224cos:0.540302 0.54030230586814 0.540302305868139717 0.83373-0.988898i 0.833730025131149-0.988897705762865i 0.833730025131149049-0.988897705762865096i
     
    5355frexp:0.5 3 0.5 3 0.5 3
    5456ldexp:8 8 8
    55 modf:2 0.3 2 0.3 2 0.3 nextafter:2 2 2
     57modf:2 0.3 2 0.3 2 0.3
     58modf:2, 0.3 2, 0.3 2, 0.3
     59nextafter:2 2 2
    5660nexttoward:2 2 2
    5761scalbn:16 16 16
  • src/tests/alloc.c

    rfd344aa r9236060  
    1010// Created On       : Wed Feb  3 07:56:22 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jun  2 15:13:03 2017
    13 // Update Count     : 316
    14 //
    15 
    16 #include <assert>
    17 extern "C" {
    18 #include <malloc.h>                                     // malloc_usable_size
    19 #include <stdint.h>                                     // uintptr_t
    20 #include <stdlib.h>                                     // posix_memalign
    21 } // extern
     12// Last Modified On : Thu Jul 20 16:01:10 2017
     13// Update Count     : 318
     14//
     15
     16#include <assert.h>
     17#include <malloc.h>                                                                             // malloc_usable_size
     18#include <stdint.h>                                                                             // uintptr_t
     19#include <stdlib.h>                                                                             // posix_memalign
    2220#include <fstream>
    23 #include <stdlib>                                       // access C malloc, realloc
     21#include <stdlib>                                                                                       // access C malloc, realloc
    2422
    2523int * foo( int * p, int c ) { return p; }
  • src/tests/attributes.c

    rfd344aa r9236060  
    1 //                               -*- Mode: C -*-
    21//
    32// Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo
     
    1110// Created On       : Mon Feb  6 16:07:02 2017
    1211// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Mon Feb  6 16:08:21 2017
    14 // Update Count     : 2
     12// Last Modified On : Fri Jul 21 23:05:52 2017
     13// Update Count     : 3
    1514//
    1615
  • src/tests/avltree/avl-private.h

    rfd344aa r9236060  
    1 #ifndef AVL_PRIVATE_H
     1#pragma once
    22#include "avl.h"
    33
     
    1414forall(otype K | Comparable(K), otype V)
    1515int height(tree(K, V) * t);
    16 
    17 #endif
  • src/tests/avltree/avl.h

    rfd344aa r9236060  
    1 #ifndef AVL_TREE_H
    2 #define AVL_TREE_H
     1#pragma once
    32
    43extern "C" {
     
    104103//     printTree(t, 0);
    105104// }
    106 
    107 
    108 #endif
  • src/tests/designations.c

    rfd344aa r9236060  
    99// Author           : Rob Schluntz
    1010// Created On       : Thu Jun 29 15:26:36 2017
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Thu Jun 29 15:27:05 2017
    13 // Update Count     : 2
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Thu Jul 27 11:46:35 2017
     13// Update Count     : 3
    1414//
    1515
     
    8989};
    9090
     91struct Fred {
     92    double i[3];
     93    int j;
     94    struct Mary {
     95        struct Jane {
     96            double j;
     97        } j;
     98        double i;
     99    } m;
     100};
     101struct Fred s1 @= { .m.j : 3 };
     102struct Fred s2 @= { .i : { [2] : 2 } };
     103
    91104int main() {
    92105        // simple designation case - starting from beginning of structure, leaves ptr default-initialized (zero)
     
    199212        };
    200213#endif
    201 
     214        // array designation
     215        int i[2] = { [1] : 3 };
    202216        // allowed to have 'too many' initialized lists - essentially they are ignored.
    203217        int i1 = { 3 };
     
    240254        const char * str0 = "hello";
    241255        char str1[] = "hello";
     256        const char c1[] = "abc";
     257        const char c2[] = { 'a', 'b', 'c' };
     258        const char c3[][2] = { { 'a', 'b' }, { 'c', 'd'}, { 'c', 'd'} };
    242259}
    243260
  • src/tests/except-0.c

    rfd344aa r9236060  
    66#include <stdbool.h>
    77
     8// Local type to mark exits from scopes. (see ERROR)
    89struct signal_exit {
    910        const char * area;
     
    1920}
    2021
    21 void terminate(int except_value) {
     22
     23// Local Exception Types and manual vtable types.
     24//#define TRIVIAL_EXCEPTION(name) //TRIVAL_EXCEPTION(yin)
     25struct yin;
     26struct yin_vtable {
     27        struct exception_t_vtable const * parent;
     28        size_t size;
     29    void (*copy)(yin *this, yin * other);
     30    void (*free)(yin *this);
     31    const char (*msg)(yin *this);
     32};
     33struct yin {
     34        struct yin_vtable const * parent;
     35};
     36void yin_msg(yin) {
     37        return "in";
     38}
     39yin_vtable _yin_vtable_instance = {
     40        &_exception_t_vtable_instance, sizeof(yin), ?{}, ^?{}, yin_msg
     41}
     42
     43
     44void terminate(exception * except_value) {
    2245        signal_exit a = {"terminate function"};
    2346        throw except_value;
     
    2548}
    2649
    27 void resume(int except_value) {
     50void resume(exception * except_value) {
    2851        signal_exit a = {"resume function"};
    2952        throwResume except_value;
  • src/tests/gmp.c

    rfd344aa r9236060  
    1010// Created On       : Tue Apr 19 08:55:51 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed May 24 22:05:38 2017
    13 // Update Count     : 540
     12// Last Modified On : Thu Jul 13 16:35:01 2017
     13// Update Count     : 541
    1414//
    1515
     
    9595// Local Variables: //
    9696// tab-width: 4 //
    97 // compile-command: "cfa gmp.c -l gmp" //
     97// compile-command: "cfa gmp.c -lgmp" //
    9898// End: //
  • src/tests/math.c

    rfd344aa r9236060  
    1010// Created On       : Fri Apr 22 14:59:21 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed May 24 13:04:33 2017
    13 // Update Count     : 71
     12// Last Modified On : Wed Aug  9 07:20:49 2017
     13// Update Count     : 77
    1414//
    1515
     
    3131        l = remquo( 3.6L, 0.5L, &quot );
    3232        sout | quot | l | endl;
    33         f = div( 3.6F, 0.5F, &quot );
    34         sout | "div:" | quot | f;
    35         d = div( 3.6D, 0.5F, &quot );
    36         sout | quot | d;
    37         l = div( 3.6L, 0.5L, &quot );
    38         sout | quot | l | endl;
     33        sout | "div:" | div( 3.6F, 0.5F ) | div( 3.6D, 0.5D ) | div( 3.6L, 0.5L ) | endl;
    3934        sout | "fma:" | fma( 3.0F, -1.0F, 1.0F ) | fma( 3.0D, -1.0D, 1.0D ) | fma( 3.0L, -1.0L, , 1.0L ) | endl;
    4035        sout | "fdim:" | fdim( 1.0F, -1.0F ) | fdim( 1.0D, -1.0D ) | fdim( 1.0L, -1.0L ) | endl;
     
    4641        sout | "exp2:" | exp2( 1.0F ) | exp2( 1.0D ) | exp2( 1.0L ) | endl;
    4742        sout | "expm1:" | expm1( 1.0F ) | expm1( 1.0D ) | expm1( 1.0L ) | endl;
     43        sout | "pow:" | pow( 1.0F, 1.0F ) | pow( 1.0D, 1.0D ) | pow( 1.0L, 1.0L ) | pow( 1.0F+1.0FI, 1.0F+1.0FI ) | pow( 1.0D+1.0DI, 1.0D+1.0DI ) | pow( 1.0DL+1.0LI, 1.0DL+1.0LI ) | endl;
     44
     45        int b = 4;
     46        unsigned int e = 2;
     47    b \= e;
     48    sout | b | b \ e | endl;
     49    sout | 'a' \ 3u | 2 \ 8u | 4 \ 3u | -4 \ 3u | 4 \ -3 | -4 \ -3 | 4.0 \ 2.1 | (1.0f+2.0fi) \ (3.0f+2.0fi) | endl;
     50
     51        //---------------------- Logarithm ----------------------
     52
    4853        sout | "log:" | log( 1.0F ) | log( 1.0D ) | log( 1.0L ) | log( 1.0F+1.0FI ) | log( 1.0D+1.0DI ) | log( 1.0DL+1.0LI ) | endl;
    4954        sout | "log2:" | log2( 8.0F ) | log2( 8.0D ) | log2( 8.0L ) | endl;
     
    5358        sout | "logb:" | logb( 8.0F ) | logb( 8.0D ) | logb( 8.0L ) | endl;
    5459
    55         //---------------------- Power ----------------------
    56 
    5760        sout | "sqrt:" | sqrt( 1.0F ) | sqrt( 1.0D ) | sqrt( 1.0L ) | sqrt( 1.0F+1.0FI ) | sqrt( 1.0D+1.0DI ) | sqrt( 1.0DL+1.0LI ) | endl;
    5861        sout | "cbrt:" | cbrt( 27.0F ) | cbrt( 27.0D ) | cbrt( 27.0L ) | endl;
    5962        sout | "hypot:" | hypot( 1.0F, -1.0F ) | hypot( 1.0D, -1.0D ) | hypot( 1.0L, -1.0L ) | endl;
    60         sout | "pow:" | pow( 1.0F, 1.0F ) | pow( 1.0D, 1.0D ) | pow( 1.0L, 1.0L ) | pow( 1.0F+1.0FI, 1.0F+1.0FI ) | pow( 1.0D+1.0DI, 1.0D+1.0DI ) | pow( 1.0DL+1.0LI, 1.0DL+1.0LI ) | endl;
    6163
    6264        //---------------------- Trigonometric ----------------------
     
    130132        sout | di | d;
    131133        l = modf( 2.3L, &ldi );
    132         sout | ldi | l;
     134        sout | ldi | l | endl;
     135        sout | "modf:" | modf( 2.3F ) | modf( 2.3D ) | modf( 2.3L ) | endl;
    133136        sout | "nextafter:" | nextafter( 2.0F, 3.0F ) | nextafter( 2.0D, 3.0D ) | nextafter( 2.0L, 3.0L ) | endl;
    134137        sout | "nexttoward:" | nexttoward( 2.0F, 3.0F ) | nexttoward( 2.0D, 3.0D ) | nexttoward( 2.0L, 3.0L ) | endl;
  • src/tests/maybe.c

    rfd344aa r9236060  
    99// Author           : Andrew Beach
    1010// Created On       : Thr May 25 16:02:00 2017
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Fri May 16 15:43:00 2017
    13 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Thu Jul 20 15:24:07 2017
     13// Update Count     : 1
    1414//
    1515
    16 #include <assert>
     16#include <assert.h>
    1717#include <containers/maybe>
    1818
  • src/tests/preempt_longrun/Makefile.am

    rfd344aa r9236060  
    2525CC = @CFA_BINDIR@/@CFA_NAME@
    2626
    27 TESTS = barge block create disjoint enter enter3 processor stack wait yield
     27TESTS = block create disjoint enter enter3 processor stack wait yield
    2828
    2929.INTERMEDIATE: ${TESTS}
    3030
    3131all-local: ${TESTS:=.run}
     32
     33clean-local:
     34        rm -f ${TESTS}
    3235
    3336% : %.c ${CC}
  • src/tests/preempt_longrun/Makefile.in

    rfd344aa r9236060  
    453453REPEAT = ${abs_top_srcdir}/tools/repeat -s
    454454BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -debug -O2 -DPREEMPTION_RATE=${preempt}
    455 TESTS = barge block create disjoint enter enter3 processor stack wait yield
     455TESTS = block create disjoint enter enter3 processor stack wait yield
    456456all: all-am
    457457
     
    635635                TEST_LOGS="$$log_list"; \
    636636        exit $$?
    637 barge.log: barge
    638         @p='barge'; \
    639         b='barge'; \
    640         $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
    641         --log-file $$b.log --trs-file $$b.trs \
    642         $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
    643         "$$tst" $(AM_TESTS_FD_REDIRECT)
    644637block.log: block
    645638        @p='block'; \
     
    790783clean: clean-am
    791784
    792 clean-am: clean-generic mostlyclean-am
     785clean-am: clean-generic clean-local mostlyclean-am
    793786
    794787distclean: distclean-am
     
    857850
    858851.PHONY: all all-am all-local check check-TESTS check-am clean \
    859         clean-generic cscopelist-am ctags-am distclean \
     852        clean-generic clean-local cscopelist-am ctags-am distclean \
    860853        distclean-generic distdir dvi dvi-am html html-am info info-am \
    861854        install install-am install-data install-data-am install-dvi \
     
    875868all-local: ${TESTS:=.run}
    876869
     870clean-local:
     871        rm -f ${TESTS}
     872
    877873% : %.c ${CC}
    878874        ${AM_V_GEN}${CC} ${CFLAGS} ${<} -o ${@}
  • src/tests/preempt_longrun/create.c

    rfd344aa r9236060  
    11#include <kernel>
    22#include <thread>
     3
     4static const unsigned long N = 2_000ul;
    35
    46#ifndef PREEMPTION_RATE
     
    1618int main(int argc, char* argv[]) {
    1719        processor p;
    18         for(int i = 0; i < 10_000ul; i++) {
     20        for(int i = 0; i < N; i++) {
    1921                worker_t w[7];
    2022        }
  • src/tests/preempt_longrun/enter.c

    rfd344aa r9236060  
    33#include <thread>
    44
    5 #undef N
    65static const unsigned long N  = 70_000ul;
    76
  • src/tests/preempt_longrun/enter3.c

    rfd344aa r9236060  
    33#include <thread>
    44
    5 #undef N
    65static const unsigned long N  = 50_000ul;
    76
  • src/tests/preempt_longrun/processor.c

    rfd344aa r9236060  
    11#include <kernel>
    22#include <thread>
     3
     4static const unsigned long N = 5_000ul;
    35
    46#ifndef PREEMPTION_RATE
     
    1517
    1618int main(int argc, char* argv[]) {
    17         for(int i = 0; i < 10_000ul; i++) {
     19        for(int i = 0; i < N; i++) {
    1820                processor p;
    1921        }
  • src/tests/preempt_longrun/yield.c

    rfd344aa r9236060  
    11#include <kernel>
    22#include <thread>
     3
     4static const unsigned long N = 325_000ul;
    35
    46#ifndef PREEMPTION_RATE
     
    1315
    1416void main(worker_t * this) {
    15         for(int i = 0; i < 325_000ul; i++) {
     17        for(int i = 0; i < N; i++) {
    1618                yield();
    1719        }
  • src/tests/result.c

    rfd344aa r9236060  
    99// Author           : Andrew Beach
    1010// Created On       : Thr May 25 16:50:00 2017
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Fri Jun 16 15:42:00 2017
    13 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Thu Jul 20 15:24:12 2017
     13// Update Count     : 1
    1414//
    1515
    16 #include <assert>
     16#include <assert.h>
    1717#include <containers/result>
    1818
  • src/tests/sched-int-barge.c

    rfd344aa r9236060  
    55#include <thread>
    66
     7static const unsigned long N = 50_000ul;
     8
     9#ifndef PREEMPTION_RATE
     10#define PREEMPTION_RATE 10_000ul
     11#endif
     12
     13unsigned int default_preemption() {
     14        return 0;
     15}
    716enum state_t { WAIT, SIGNAL, BARGE };
    817
     
    1019
    1120monitor global_data_t {
    12         bool done;
     21        volatile bool done;
    1322        int counter;
    1423        state_t state;
     
    5160                c.do_wait2 = ((unsigned)rand48()) % (c.do_signal);
    5261
    53                 // if(c.do_wait1 == c.do_wait2) sout | "Same" | endl;
     62                if(c.do_wait1 == c.do_wait2) sout | "Same" | endl;
    5463        }
    5564
     
    7382        }
    7483
    75         if( c.counter >= 100_000 ) c.done = true;
     84        if( c.counter >= N ) c.done = true;
    7685        return !c.done;
    7786}
     
    8998}
    9099
     100static thread_desc * volatile the_threads;
     101
    91102int main(int argc, char* argv[]) {
    92103        rand48seed(0);
     
    94105        {
    95106                Threads t[17];
     107                the_threads = (thread_desc*)t;
    96108        }
    97109}
  • src/tests/sched-int-block.c

    rfd344aa r9236060  
    55#include <thread>
    66
    7 #ifndef N
    8 #define N 10_000
     7#include <time.h>
     8
     9static const unsigned long N = 5_000ul;
     10
     11#ifndef PREEMPTION_RATE
     12#define PREEMPTION_RATE 10_000ul
    913#endif
     14
     15unsigned int default_preemption() {
     16        return PREEMPTION_RATE;
     17}
    1018
    1119enum state_t { WAITED, SIGNAL, BARGE };
     
    102110
    103111int main(int argc, char* argv[]) {
    104         rand48seed(0);
     112        rand48seed( time( NULL ) );
    105113        done = false;
    106114        processor p;
  • src/tests/sched-int-disjoint.c

    rfd344aa r9236060  
    44#include <thread>
    55
    6 #ifndef N
    7 #define N 10_000
     6static const unsigned long N = 10_000ul;
     7
     8#ifndef PREEMPTION_RATE
     9#define PREEMPTION_RATE 10_000ul
    810#endif
     11
     12unsigned int default_preemption() {
     13        return PREEMPTION_RATE;
     14}
    915
    1016enum state_t { WAIT, SIGNAL, BARGE };
  • src/tests/sched-int-wait.c

    rfd344aa r9236060  
    55#include <thread>
    66
    7 #ifndef N
    8 #define N 10_000
     7static const unsigned long N = 10_000ul;
     8
     9#ifndef PREEMPTION_RATE
     10#define PREEMPTION_RATE 10_000ul
    911#endif
     12
     13unsigned int default_preemption() {
     14        return PREEMPTION_RATE;
     15}
    1016
    1117monitor global_t {};
     
    114120int main(int argc, char* argv[]) {
    115121        waiter_left = 4;
    116         processor p;
     122        processor p[2];
    117123        sout | "Starting" | endl;
    118124        {
  • src/tests/test.py

    rfd344aa r9236060  
    221221                if   retcode == TestResult.SUCCESS:     result_txt = "Done"
    222222                elif retcode == TestResult.TIMEOUT:     result_txt = "TIMEOUT"
    223                 else :                                          result_txt = "ERROR"
     223                else :                                          result_txt = "ERROR code %d" % retcode
    224224        else :
    225225                if   retcode == TestResult.SUCCESS:     result_txt = "PASSED"
    226226                elif retcode == TestResult.TIMEOUT:     result_txt = "TIMEOUT"
    227                 else :                                          result_txt = "FAILED"
     227                else :                                          result_txt = "FAILED with code %d" % retcode
    228228
    229229        #print result with error if needed
  • src/tests/vector/array.h

    rfd344aa r9236060  
    99// Author           : Richard C. Bilson
    1010// Created On       : Wed May 27 17:56:53 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Apr 27 17:26:04 2016
    13 // Update Count     : 5
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 10:04:20 2017
     13// Update Count     : 6
    1414//
    1515
    16 #ifndef ARRAY_H
    17 #define ARRAY_H
     16#pragma once
    1817
    1918//#include <iterator>
     
    4544elt_type * end( array_type * array );
    4645
    47 #endif // ARRAY_H
    48 
    4946// Local Variables: //
    5047// tab-width: 4 //
  • src/tests/vector/vector_int.h

    rfd344aa r9236060  
    99// Author           : Richard C. Bilson
    1010// Created On       : Wed May 27 17:56:53 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Apr 27 17:26:59 2016
    13 // Update Count     : 2
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 10:04:02 2017
     13// Update Count     : 4
    1414//
    1515
    16 #ifndef VECTOR_INT_H
    17 #define VECTOR_INT_H
     16#pragma once
    1817
    1918// A flexible array, similar to a C++ vector, that holds integers and can be resized dynamically
     
    2726void ?{}( vector_int & );                                                               // allocate vector with default capacity
    2827void ?{}( vector_int &, int reserve );                                  // allocate vector with specified capacity
    29 void ?{}( vector_int & vec, vector_int other );                 // copy constructor
    30 void ^?{}( vector_int & );                                                              // deallocate vector's storage
     28void ?{}( vector_int & vec, vector_int other );     // copy constructor
     29void ^?{}( vector_int & );                // deallocate vector's storage
    3130
    3231void reserve( vector_int *vec, int reserve );                   // reserve more capacity
     
    3635
    3736int & ?[?]( vector_int * vec, int index );                              // access to arbitrary element (does not resize)
    38 int last( vector_int * vec );                                                   // return last element
    39 
    40 #endif // VECTOR_INT_H
     37int last( vector_int * vec );             // return last element
    4138
    4239// Local Variables: //
Note: See TracChangeset for help on using the changeset viewer.