Changeset 38329 in project


Ignore:
Timestamp:
03/23/20 02:21:56 (2 weeks ago)
Author:
Kon Lovett
Message:

scheme-include by category, add utf8 chars test, add outer test level

Location:
release/5/levenshtein/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/5/levenshtein/trunk/levenshtein.egg

    r38328 r38329  
    2020  (test-dependencies test)
    2121  (components
    22     (scheme-include levenshtein-cost-interface
    23       (files "levenshtein-cost-interface.scm"))
    24     (scheme-include levenshtein-sequence-interface
    25       (files "levenshtein-sequence-interface.scm"))
    26     (scheme-include levenshtein-cost-number
    27       (component-dependencies levenshtein-cost-interface)
    28       (files "levenshtein-cost-number.scm"))
    29     (scheme-include levenshtein-cost-fixnum
    30       (component-dependencies levenshtein-cost-interface)
    31       (files "levenshtein-cost-fixnum.scm"))
    32     (scheme-include levenshtein-sequence-vector
    33       (component-dependencies levenshtein-sequence-interface)
    34       (files "levenshtein-sequence-vector.scm"))
    35     (scheme-include levenshtein-sequence-string
    36       (component-dependencies levenshtein-sequence-interface)
    37       (files "levenshtein-sequence-string.scm"))
    38     (scheme-include levenshtein-sequence-utf8
    39       (component-dependencies levenshtein-sequence-interface)
    40       (files "levenshtein-sequence-utf8.scm"))
     22    (scheme-include levenshtein-cost
     23      (files "levenshtein-cost-interface.scm"
     24              "levenshtein-cost-number.scm"
     25              "levenshtein-cost-fixnum.scm"))
     26    (scheme-include levenshtein-sequence
     27      (files "levenshtein-sequence-interface.scm"
     28              "levenshtein-sequence-vector.scm"
     29              "levenshtein-sequence-string.scm"
     30              "levenshtein-sequence-utf8.scm"))
    4131    (extension levenshtein-operators
    4232      (types-file)
     
    6757   (extension levenshtein-sequence-functor
    6858      (types-file)
    69       #;(component-dependencies levenshtein-sequence-interface levenshtein-cost-interface)
     59      #;(component-dependencies levenshtein-sequence levenshtein-cost)
    7060      (csc-options "-O3" "-d1" "-local" "-no-procedure-checks") ) ) )
  • release/5/levenshtein/trunk/tests/levenshtein-test.scm

    r38328 r38329  
    22
    33(import test)
     4
     5(test-begin "Levenshtein")
    46
    57;;;
     
    9496;;;
    9597
    96 (import srfi-63)
    97 
    98 #| ;UNUSED
     98(import (srfi 63))
    9999(import levenshtein-vector)
    100100
     
    132132
    133133(test-end "Levenshtein Vector")
    134 |#
    135 
    136 ;(import (chicken fixnum))
     134
    137135(include "levenshtein-cost-fixnum")
    138136(import levenshtein-vector-functor)
     
    285283(test-group "number cost & utf8 string"
    286284  (test 6
    287     (fnu8:levenshtein-distance/sequence "YWCQPGK" "LAWYQQKPGKA" #:elm-eql char=?))
     285    (fnu8:levenshtein-distance/sequence "YWCQPGK" "LAWYQQKPGKA"
     286      #:elm-eql char=?))
    288287  (test 5
    289288    (fnu8:levenshtein-distance/sequence "YWCQPGK" "LAWYQQKPGKA"
     
    293292      #:insert-cost 0.5 #:delete-cost 0.25 #:substitute-cost 0.75
    294293      #:elm-eql char=?))
     294
     295  (test 9
     296    (fnu8:levenshtein-distance/sequence "匷食" "匱肉匷食秋冬あいうえお"
     297      #:elm-eql char=?))
     298  (test 5
     299    (fnu8:levenshtein-distance/sequence "匷食" "匱肉匷食秋冬あいうえお"
     300      #:elm-eql char=? #:limit-cost 5))
     301  (test 2.75
     302    (fnu8:levenshtein-distance/sequence "匷食" "匱肉匷食秋冬あいうえお"
     303      #:insert-cost 0.5 #:delete-cost 0.25 #:substitute-cost 0.75
     304      #:elm-eql char=?))
    295305)
    296306
     
    299309;;;
    300310
     311(test-end "Levenshtein")
     312
    301313(test-exit)
Note: See TracChangeset for help on using the changeset viewer.