summaryrefslogtreecommitdiff
path: root/test-suite
Commit message (Collapse)AuthorAgeFilesLines
* i18n: locale-positive-separated-by-space? should return bool, not stringMike Gran2017-03-201-0/+12
| | | | | * libguile/i18n.c (scm_nl_langinfo): unpack INT_P_SEP_BY_SPACE as bool * test-suite/tests/i18n.test (nl-langinfo et al.): new tests
* i18n: add tests for locale-digit-groupingMike Gran2017-03-201-0/+20
| | | | * test-suite/tests/i18n.test ("nl-langinfo et al."): new tests
* i18n: add tests for locale AM/PMMike Gran2017-03-201-0/+20
| | | | * test-suite/tests/i18n.test ("nl-langinfo et al."): new tests
* i18n: rename locale-monetary-digit-grouping to locale-monetary-groupingMike Gran2017-03-201-3/+24
| | | | | | | | * module/ice-9/i18n.scm (locale-monetary-digit-grouping): renamed to locale-monetary grouping (monetary-amount->locale-string): use renamed procedure * test-suite/tests/i18n.test (%french-locale): add LC_MONETARY (%french-utf8-locale): add LC_MONETARY ("nl-langinfo et al."): tests for locale-monetary-grouping
* Better eval+promise+gc testAndy Wingo2017-03-141-1/+6
| | | | | * test-suite/tests/eval.test ("promises"): Increase clear pass rate on this test.
* Resolve unresolved alist test casesAndy Wingo2017-03-141-58/+29
| | | | | * test-suite/tests/alist.test: Update unresolved cases to match current behavior. Bogus but stable :/
* Nonlocal prompt returns cause all effectsAndy Wingo2017-03-131-1/+11
| | | | | | | | * module/language/cps/effects-analysis.scm (expression-effects): Prompts cause &all-effects. I tried to limit this change to CSE but it was actually LICM that was borked, so better to be conservative * test-suite/tests/control.test ("escape-only continuations"): Add test.
* Fix bug in comparison between real and complexDaniel Llorens2017-03-091-0/+9
| | | | | | | | | This bug was introduced by 35a90592501ebde7e7ddbf2486ca9d315e317d09. * module/language/cps/specialize-numbers.scm (specialize-operations): Check that both operands are real as a condition for specialize-f64-comparison. * test-suite/tests/numbers.test: Add test.
* Fix new thread-local fluids testAndy Wingo2017-03-071-1/+1
| | | | * test-suite/tests/fluids.test ("dynamic states"): Fix test.
* Add thread local fluidsAndy Wingo2017-03-071-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libguile/fluids.h (struct scm_dynamic_state): Add thread_local_values table. Thread locals are flushed to a separate thread-local table. The references are strong references since the table never escapes the thread. (scm_make_thread_local_fluid, scm_fluid_thread_local_p): New functions. * libguile/fluids.c (FLUID_F_THREAD_LOCAL): (SCM_I_FLUID_THREAD_LOCAL_P): New macros. (restore_dynamic_state): Add comment about precondition. (save_dynamic_state): Flush thread locals. (scm_i_fluid_print): Print thread locals nicely. (new_fluid): Add flags arg. (scm_make_fluid, scm_make_fluid_with_default, scm_make_unbound_fluid): Adapt. (scm_make_thread_local_fluid, scm_fluid_thread_local_p): New functions. (fluid_set_x): Special flushing logic for thread-locals. (fluid_ref): Special cache miss logic for thread locals. * libguile/stacks.c (scm_init_stacks): * libguile/throw.c (scm_init_throw): %stacks and %exception-handler are thread-locals. * libguile/threads.c (guilify_self_2): Init thread locals table. * test-suite/tests/fluids.test ("dynamic states"): Add test. * doc/ref/api-control.texi (Fluids and Dynamic States): Add link to Thread-Local Variables. * doc/ref/api-scheduling.texi (Thread Local Variables): Update with real thread-locals. * NEWS: Update.
* Check for working profiling and virtual itimersMike Gran2017-03-063-41/+55
| | | | | | | | | | | * configure.ac (HAVE_USABLE_GETITIMER_PROF, HAVE_USABLE_GETITIMER_VIRTUAL): new tests * doc/ref/posix.texi (setitimer, getitimer): document provided? 'ITIMER_VIRTUAL and 'ITIMER_PROF * doc/ref/statprof.texi (statprof): document ITIMER_PROF requirements * libguile/scmsigs.c (scm_setitimer, scm_getitimer): document (provided? 'ITIMER_VIRTUAL) and (provided? 'ITIMER_PROF) (scm_init_scmsigs): add features ITIMER_VIRTUAL and ITIMER_PROF * test-suite/tests/asyncs.test ("prevention via sigprof"): throw when unsupported * test-suite/tests/signals.test: throw when not supported * test-suite/tests/statprof.test: throw when not supported
* Can't recursively search DLLs with FFI on CygwinMike Gran2017-03-053-6/+34
| | | | | | | * doc/ref/api-foreign.text (dynamic-link): document problems with recursive DLLs. * test-suite/standalone/test-ffi (global): with Cygwin, dynamic-link C library explicitly * test-suite/standalone/test-foreign-object-scm (libc-ptr): with Cygwin, link C library explicitly * test-suite/tests/foreign.test (qsort): with Cygwin, link C library explicitly
* Disable Turkish locale tests on CygwinMike Gran2017-03-041-2/+3
| | | | | | Cygwin's support of Turkish casing rules is broken. * test-suite/tests/i18n.test (under-turkish-utf8-locale-or-unresolved): modified
* Cygwin: skip tests that require working setrlimits for memoryMike Gran2017-03-032-1/+17
| | | | | | | | On Cygwin, setrlimits cannot be used to set total memory availabe for a process. * test-suite/standalone/test-out-of-memory: skip for cygwin * test-suite/standalone/test-stack-overflow: skip for cygwin
* i18n: 'number->locale-string' guesses the minimum number of decimals.Ludovic Courtès2017-03-012-11/+11
| | | | | | | | | | | | | | | | | This feature was removed by 4aead68cdb86ca60cc372f0cd558cadda90ddec5. * module/ice-9/i18n.scm (number-decimal-string): Rewrite the case where DIGIT-COUNT is not an integer. (number->locale-string): Always pass FRACTION-DIGITS to 'number-decimal-string'. * test-suite/tests/format.test ("~h localized number")["1234.5"] ["padding", "padchar"]: Remove decimal specifier. * test-suite/tests/i18n.test ("number->locale-string") ["fraction", * test-suite/tests/i18n.test ("format ~h")["12 345,678"]: Remove decimal specifier. Remove one decimal. * doc/ref/api-i18n.texi (Number Input and Output): Update 'number->locale-string' doc to mention the number of decimals.
* i18n: Fix corner cases for monetary and number string conversions.Ludovic Courtès2017-03-012-16/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/24990>. Reported by Martin Michel <dev@famic.de>. * module/ice-9/i18n.scm (integer->string, number-decimal-string): New procedures. (monetary-amount->locale-string): Use them instead of 'number->string' followed by 'string-split'. (number->locale-string): Likewise. * test-suite/tests/i18n.test ("number->locale-string")["fraction"]: Add second argument to 'number->locale-string'. ["fraction, 1 digit"]: Round up. ["fraction, 10 digits", "trailing zeros", "negative integer"]: New tests. * test-suite/tests/i18n.test ("format ~h"): Pass the number of decimals for ~h. ("monetary-amount->locale-string")["French"]: Always expect two decimals after the comma. ["one cent", "very little money"]: New tests. * test-suite/tests/format.test ("~h localized number")["1234.5"]: Specify the number of decimals explicitly. ["padding"]: Expect zero decimals. ["padchar"]: Ask for one decimal. ["decimals", "locale"]: Adjust rounding.
* tests: Choose a more plausible US English locale name.Ludovic Courtès2017-03-011-1/+1
| | | | | * test-suite/tests/i18n.test (%american-english-locale-name): Change to en_US.utf8".
* tests: Use 'pass-if-equal' for (ice-9 i18n) tests.Ludovic Courtès2017-03-011-34/+40
| | | | | | * test-suite/tests/i18n.test ("number->locale-string") ("format ~h", "monetary-amount->locale-string"): Use 'pass-if-equal' instead of 'pass-if'.
* i18n: Do not represent zero as "-0".Ludovic Courtès2017-03-011-3/+14
| | | | | | | | | | | | Partly fixes <http://bugs.gnu.org/24990>. Reported by Martin Michel <dev@famic.de>. * module/ice-9/i18n.scm (monetary-amount->locale-string): Don't negate AMOUNT when it's zero. (number->locale-string): Likewise. * test-suite/tests/i18n.test ("number->locale-string")["positive inexact zero, 1 digit"]: New test. ("monetary-amount->locale-string")["positive inexact zero"]: New test.
* tests: Avoid statprof test failure on systems without 'setitimer'.Ludovic Courtès2017-03-011-11/+12
| | | | | | | | Partly fixes <http://bugs.gnu.org/25463>. Reported by rennes@openmailbox.org. * test-suite/tests/statprof.test ("return values"): Wrap in 'when-implemented'.
* Disable REPL server tests if no threadsAndy Wingo2017-03-011-1/+7
| | | | | | * test-suite/tests/00-repl-server.test (call-with-repl-server): The REPL server needs threads so don't bother testing if we have no threads. Also, prevent SIGPIPE from killing the parent process.
* tests: Avoid race condition in REPL server test.Ludovic Courtès2017-03-011-2/+8
| | | | | | | | Fixes <http://bugs.gnu.org/24769>. Reported by Rob Browning <rlb@defaultvalue.org>. * test-suite/tests/00-repl-server.test ("simple expression"): Add call to 'select' before 'display'.
* tests: Throw 'unresolved when the REPL server is too slow.Ludovic Courtès2017-03-011-4/+5
| | | | | | * test-suite/tests/00-repl-server.test (call-with-repl-server): Use (usleep 100) instead of (sleep 1). Throw 'unresolved when TRIES is too high.
* tests: Add REPL server test for CVE-2016-8606.Ludovic Courtès2017-03-012-0/+140
| | | | | | | This is a followup to 08c021916dbd3a235a9f9cc33df4c418c0724e03. * test-suite/tests/00-repl-server.test: New file. * test-suite/Makefile.am (SCM_TESTS): Add it.
* tests: Use the "normalized codeset" in locale names.Ludovic Courtès2017-03-011-6/+6
| | | | | | | * test-suite/tests/i18n.test (%french-locale-name) (%french-utf8-locale-name, %turkish-utf8-locale-name) (%german-utf8-locale-name, %greek-utf8-locale-name): Use the normalized codeset for ISO-8859-1 and UTF-8.
* Remove extraneous debugging output in testAndy Wingo2017-03-011-1/+0
| | | | | * test-suite/standalone/test-scm-c-bind-keyword-arguments.c (missing_value_error_handler): Remove debugging write.
* Fix class slot allocation since GOOPS rewriteAndy Wingo2017-03-011-0/+9
| | | | | | | * module/oop/goops.scm (%compute-layout): Fix class slot layout. Before, a #:class that was an argument to #:allocation was getting interpreted as a keyword with a value. * test-suite/tests/goops.test ("#:class slot allocation"): Add test.
* Flush when getting string from r6rs string output portAndy Wingo2017-03-011-0/+15
| | | | | | | * module/rnrs/io/ports.scm (open-string-output-port): Calling the get-string proc should flush the buffer and reset the file position. * test-suite/tests/r6rs-ports.test ("8.2.10 Output ports"): Add tests. Thanks to Freja Nordsiek for the report.
* String ports can be truncatedAndy Wingo2017-03-011-0/+39
| | | | | | * libguile/strports.c (string_port_truncate): (scm_make_string_port_type): Support truncate-file on string ports. * test-suite/tests/ports.test ("string ports"): Add tests.
* Minor expansion of guile-test commentsAndy Wingo2017-03-011-1/+1
| | | | * test-suite/guile-test: Add -L to example.
* Better errors for odd-length keyword argsAndy Wingo2017-02-282-12/+26
| | | | | | | | | | | | | | | | * libguile/vm-engine.c (bind-kwargs): * libguile/vm.c (vm_error_kwargs_missing_value): * libguile/eval.c (error_missing_value) (prepare_boot_closure_env_for_apply): Adapt to mirror VM behavior. * libguile/keywords.c (scm_c_bind_keyword_arguments): Likewise. * module/ice-9/eval.scm (primitive-eval): Update to error on (foo #:kw) with a "Keyword argument has no value" instead of the horrible "odd argument list length". Also adapts to the expected args format for the keyword-argument-error exception printer in all cases. Matches 1.8 optargs behavior also. * test-suite/standalone/test-scm-c-bind-keyword-arguments.c (test_missing_value): (missing_value_error_handler): Update test. * test-suite/tests/optargs.test: Add tests.
* Declare module exports before loading importsAndy Wingo2017-02-281-0/+41
| | | | | | | * module/ice-9/boot-9.scm (define-module*): Process module imports after module exports. Allows for an additional kind of circular module imports (see https://bugs.gnu.org/15540). * test-suite/tests/modules.test ("circular imports"): Add test.
* Fix multi-arity dispatch in GOOPSAndy Wingo2017-02-221-0/+11
| | | | | | | * module/oop/goops.scm (multiple-arity-dispatcher): Fix dispatch for max-arity+1 when a generic is already in multiple-arity dispatch. Fixes #24454. * test-suite/tests/goops.test ("dispatch"): Add test.
* Fix flonum/complex type inference.Andy Wingo2017-02-191-0/+12
| | | | | | * module/language/cps/types.scm (define-binary-result!): Arithmetic where one argument is a flonum may produce a complex. * test-suite/tests/compiler.test: Add test.
* Stringbufs immutable by defaultAndy Wingo2017-02-161-8/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | * libguile/snarf.h (SCM_IMMUTABLE_STRINGBUF): Remove shared flag. Stringbufs are immutable by default. * libguile/strings.c: Rewrite blurb. Change to have stringbufs be immutable by default and mutable only when marked as such. Going mutable means making a private copy. (STRINGBUF_MUTABLE, STRINGBUF_F_MUTABLE): New definitions. (SET_STRINGBUF_SHARED): Remove. (scm_i_print_stringbuf): Simplify to just alias the stringbuf as-is. (substring_with_immutable_stringbuf): New helper. (scm_i_substring, scm_i_substring_read_only, scm_i_substring_copy): use new helper. (scm_i_string_ensure_mutable_x): New helper. (scm_i_substring_shared): Use scm_i_string_ensure_mutable_x. (stringbuf_write_mutex): Remove; yaaaaaaaay. (scm_i_string_start_writing): Use scm_i_string_ensure_mutable_x. No more mutex. (scm_i_string_stop_writing): Now a no-op. (scm_i_make_symbol): Use substring/copy. (scm_sys_string_dump, scm_sys_symbol_dump): Update. * libguile/strings.h (SCM_I_STRINGBUF_F_SHARED): Remove. (SCM_I_STRINGBUF_F_MUTABLE): Add. * module/system/vm/assembler.scm (link-data): Don't add shared flag any more. Existing compiled flags are harmless tho. * test-suite/tests/strings.test ("string internals"): Update.
* Modernize (web http) a bitAndy Wingo2017-02-081-5/+22
| | | | | | | | | | | * module/web/http.scm: Modernize the Guile Scheme by using more match, when, unless, and non-tail conversion. No functional change, with the exception of fixing a bug in write-key-value-list for symbols like 100-continue that shouldn't print as #{100-continue}#. * test-suite/tests/web-http.test (pass-if-only-parse): (pass-if-reparse, pass-if-parse): Arrange to also serialize and reparse values from pass-if-parse. Apply to all existing tests except fragments where we don't expect fragments to be written out.
* Fix rank 0 arrays and nested arrays in truncated-printDaniel Llorens2017-02-071-1/+28
| | | | | | | | | | * module/ice-9/pretty-print.scm (print): In the array case, pass #:inner? along to (print-sequence), unless we're at the last dimension of the array. Special case for 0-rank arrays, which cannot be empty and have no length. * test-suite/tests/print.test: Test some of the cases fixed by this patch.
* Support arrays in truncated-printDaniel Llorens2017-02-071-1/+16
| | | | | * module/ice-9/pretty-print.scm (print): Handle general arrays. * test-suite/tests/print.test: Test truncated-print with general arrays.
* Avoid stacks in dynamically-bound valuesAndy Wingo2017-02-071-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * libguile/dynstack.h: * libguile/dynstack.c (scm_dynstack_find_old_fluid_value): New function. * libguile/fluids.c (saved_dynamic_state_ref): New helper. (scm_fluid_ref): Fix docstring. (scm_fluid_ref_star): New function allowing access to previous values for a fluid. (scm_dynamic_state_ref): New internal function. * libguile/fluids.h: Add scm_fluid_ref_star and scm_dynamic_state_ref. * libguile/stacks.c (scm_stack_id): Adapt to %stacks not being a chain. * libguile/throw.c (catch, throw_without_pre_unwind): Adapt to %exception-handlers not being a chain. * module/ice-9/boot-9.scm (catch, dispatch-exception): Instead of having %exception-handlers be a chain, use fluid-ref* to access the chain that is in place at the time the exception is thrown. Prevents unintended undelimited capture of the current exception handler stack by a delimited "catch". (%start-stack): Similarly, don't be a chain. * module/system/repl/debug.scm (frame->stack-vector): * module/system/repl/error-handling.scm (call-with-error-handling): * module/ice-9/save-stack.scm (save-stack): Adapt to %stacks not being a chain. * test-suite/tests/exceptions.test ("delimited exception handlers"): Add tests. * doc/ref/api-control.texi (Fluids and Dynamic States): Add docs.
* Final names for new array functionsDaniel Llorens2017-01-092-29/+29
| | | | | | Globally rename (array-from* -> array-slice), (array-from -> array-cell-ref), (array-amend! -> array-cell-set!), (array-for-each-cell -> array-slice-for-each).
* Test format ~f with width parametersDaniel Llorens2016-12-151-0/+9
| | | | * test-suite/tests/format.test: Additional tests for ~f.
* Add suspendable-continuation?Andy Wingo2016-12-121-0/+27
| | | | | | | | | | | | | | | | | | | * doc/ref/api-control.texi (Prompt Primitives): Document suspendable-continuation?. * libguile/control.c (scm_suspendable_continuation_p): New procedure. (scm_init_ice_9_control): New extension procedure, defines suspendable-continuation?. (scm_init_control): Register scm_init_ice_9_control. * libguile/eval.c (eval): * libguile/throw.c (catch): * libguile/continuations.c (scm_i_make_continuation): Restore resumable prompt cookie after continuation invocation. * libguile/vm.c (scm_call_n): Arrange to set resumable_prompt_cookie during invocation of VM. * libguile/vm.h (struct scm_vm): Add resumable_prompt_cookie member. * module/ice-9/control.scm: Export suspendable-continuation?. * test-suite/tests/control.test ("suspendable-continuation?"): New test.
* with-dynamic-state compiler and VM supportAndy Wingo2016-12-051-0/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * libguile/dynstack.h (SCM_DYNSTACK_TYPE_DYNAMIC_STATE): * libguile/dynstack.c (DYNAMIC_STATE_WORDS, DYNAMIC_STATE_STATE_BOX): (scm_dynstack_push_dynamic_state): (scm_dynstack_unwind_dynamic_state): New definitions. (scm_dynstack_unwind_1, scm_dynstack_wind_1): Add with-dynamic-state cases. * libguile/memoize.c (push_dynamic_state, pop_dynamic_state) (do_push_dynamic_state, do_pop_dynamic_state): New definitions. (memoize, scm_init_memoize): Handle push-dynamic-state and pop-dynamic-state. * libguile/vm-engine.c (push-dynamic-state, pop-dynamic-state): New opcodes. * module/ice-9/boot-9.scm (with-dynamic-state): New definition in Scheme so that the push-dynamic-state and pop-dynamic-state always run in the VM. * module/language/cps/compile-bytecode.scm (compile-function): * module/language/cps/effects-analysis.scm: * module/language/cps/types.scm: * module/language/tree-il/effects.scm (make-effects-analyzer): * module/language/tree-il/peval.scm (peval): * module/language/tree-il/primitives.scm (*interesting-primitive-names*): * module/system/vm/assembler.scm: Add support for with-dynamic-state to the compiler. * test-suite/tests/fluids.test ("dynamic states"): Add basic tests. * doc/ref/vm.texi (Dynamic Environment Instructions): Update.
* Remove special support for fluids in GDB interfaceAndy Wingo2016-11-261-5/+2
| | | | | | | * module/system/base/types.scm (inferior-fluid?, inferior-fluid-number) (<inferior-fluid>): Remove. Fluids won't have numbers in the future. (cell->object): Adapt. * test-suite/tests/types.test ("opaque objects"): Update.
* Deprecate scm_from_contiguous_arrayDaniel Llorens2016-11-231-0/+6
| | | | | | | | | | | | | | | | | scm_from_contiguous_array() was undocumented, unused within Guile, and can be replaced by make-array + array-copy! without requiring contiguity and without loss of performance. * libguile/arrays.c (scm_array_contents): Do not rely on SCM_I_ARRAY_CONTP. * test-suite/tests/arrays.test: Test array-contents with 0-rank array. * libguile/arrays.h: Declare scm_i_shap2ra(), SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG so that scm_from_contiguous_array() can keep using them. * libguile/deprecated.c (scm_from_contiguous_array): Move here from arrays.c. * libguile/deprecated.h (scm_from_contiguous_array): Deprecate. * NEWS: Add deprecation notice.
* New functions (array-for-each-cell, array-for-each-cell-in-order)Daniel Llorens2016-11-232-3/+34
| | | | | | | | | | | | | | | | | * libguile/array-map.c (scm_i_array_rebase, scm_array_for_each_cell): New functions. Export scm_array_for_each_cell() as (array-for-each-cell). (array-for-each-cell-in-order): Define additional export. * libguile/array-map.h (scm_i_array_rebase, scm_array_for_each_cell): Add prototypes. * test-suite/tests/array-map.test: Renamed from test-suite/tests/ramap.test, fix module name. Add tests for (array-for-each-cell). * test-suite/Makefile.am: Apply rename array-map.test -> ramap.test.
* New functions array-from, array-from*, array-amend!Daniel Llorens2016-11-231-3/+112
| | | | | | | | | | | | | * libguile/arrays.h (scm_array_from, scm_array_from_s, scm_array_amend_x): New declarations. * libguile/arrays.c (scm_array_from, scm_array_from_s, scm_array_amend_x): New functions, export as array-from, array-from*, array-amend!. * test-suite/tests/arrays.test: Tests for array-from, array-from*, array-amend!. Replace with-test-prefix/c&e with with-test-prefix where the array read syntax isn't used.
* Speed up for multi-arg cases of scm_ramap functionsDaniel Llorens2016-11-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch results in a 20%-40% speedup in the > 1 argument cases of the following microbenchmarks: (define A (make-shared-array #0(1) (const '()) #e1e7)) ; 1, 2, 3 arguments. (define a 0) ,time (array-for-each (lambda (b) (set! a (+ a b))) A) (define a 0) ,time (array-for-each (lambda (b c) (set! a (+ a b c))) A A) (define a 0) ,time (array-for-each (lambda (b c d) (set! a (+ a b c d))) A A A) (define A (make-shared-array (make-array 1) (const '()) #e1e7)) (define B (make-shared-array #0(1) (const '()) #e1e7)) ; 1, 2, 3 arguments. ,time (array-map! A + B) ,time (array-map! A + B B) ,time (array-map! A + B B B) * libguile/array-map.c (scm_ramap): Note on cproc arguments. (rafill): Assume that dst's lbnd is 0. (racp): Assume that src's lbnd is 0. (ramap): Assume that ra0's lbnd is 0. When there're more than two arguments, compute the array handles before the loop. Allocate the arg list once and reuse it in the loop. (rafe): Do as in ramap(), when there's more than one argument. (AREF, ASET): Remove.
* Support typed arrays in some sort functionsDaniel Llorens2016-11-231-2/+30
| | | | | | | | | * libguile/sort.c (sort!, sort, restricted-vector-sort!, sorted?): Support arrays of rank 1, whatever the type. * libguile/quicksort.i.c: Fix accessors to handle typed arrays. * test-suite/tests/sort.test: Test also with typed arrays.
* Avoid unneeded internal use of array handlesDaniel Llorens2016-11-231-13/+63
| | | | | | | | | | | | | | | | | | * libguile/arrays.c (scm_shared_array_root): Adopt uniform check order. (scm_shared_array_offset, scm_shared_array_increments): Use the array fields directly just as scm_shared_array_root does. (scm_c_array_rank): Moved from libguile/generalized-arrays.c. Don't use array handles, but follow the same type check sequence as the other array functions (shared-array-root, etc). (scm_array_rank): Moved from libguile/generalized-arrays.h. * libguile/arrays.h: Move prototypes here. * test-suite/tests/arrays.test: Tests for shared-array-offset, shared-array-increments.