Raymond Toy pushed to branch rtoy-xoro-default at cmucl / cmucl

Commits:

1 changed file:

Changes:

  • tests/rng.lisp
    ... ... @@ -6,7 +6,7 @@
    6 6
     (in-package "RNG-TESTS")
    
    7 7
     
    
    8 8
     (defun 64-bit-rng-state (rng)
    
    9
    -  (let ((state (kernel::xoro-random-state-state rng)))
    
    9
    +  (let ((state (kernel::random-state-state rng)))
    
    10 10
         (flet ((convert (x)
    
    11 11
     	     (multiple-value-bind (hi lo)
    
    12 12
     		 (kernel:double-float-bits x)
    
    ... ... @@ -15,29 +15,29 @@
    15 15
           (values (convert (aref state 0)) (convert (aref state 1))))))
    
    16 16
     
    
    17 17
     (defun 64-bit-value (rng)
    
    18
    -  (logior (ash (kernel::xoroshiro-chunk rng) 32)
    
    19
    -	  (kernel::xoroshiro-chunk rng)))
    
    18
    +  (logior (ash (kernel::random-chunk rng) 32)
    
    19
    +	  (kernel::random-chunk rng)))
    
    20 20
     
    
    21 21
     (defvar *test-state*)
    
    22 22
       
    
    23 23
     (define-test rng.initial-state
    
    24 24
       (setf *test-state*
    
    25
    -	(kernel::make-xoroshiro-object :state (kernel::init-xoro-state #x12345678)
    
    26
    -				       :rand 0
    
    27
    -				       :cached-p nil))
    
    25
    +	(kernel::make-random-object :state (kernel::init-random-state #x12345678)
    
    26
    +				    :rand 0
    
    27
    +				    :cached-p nil))
    
    28 28
       (multiple-value-bind (s0 s1)
    
    29 29
           (64-bit-rng-state *test-state*)
    
    30 30
         (assert-equal #x38f1dc39d1906b6f s0)
    
    31 31
         (assert-equal #xdfe4142236dd9517 s1)
    
    32
    -    (assert-equal 0 (kernel::xoro-random-state-rand *test-state*))
    
    33
    -    (assert-equal nil (kernel::xoro-random-state-cached-p *test-state*))))
    
    32
    +    (assert-equal 0 (kernel::random-state-rand *test-state*))
    
    33
    +    (assert-equal nil (kernel::random-state-cached-p *test-state*))))
    
    34 34
     
    
    35 35
     
    
    36 36
     (define-test rng.values-test
    
    37 37
       (assert-equal (list #x38f1dc39d1906b6f #xdfe4142236dd9517)
    
    38 38
     		(multiple-value-list (64-bit-rng-state *test-state*)))
    
    39
    -  (assert-equal 0 (kernel::xoro-random-state-rand *test-state*))
    
    40
    -  (assert-equal nil (kernel::xoro-random-state-cached-p *test-state*))
    
    39
    +  (assert-equal 0 (kernel::random-state-rand *test-state*))
    
    40
    +  (assert-equal nil (kernel::random-state-cached-p *test-state*))
    
    41 41
     
    
    42 42
       (dolist (item '((#x18d5f05c086e0086 (#x228f4926843b364d #x74dfe78e715c81be))
    
    43 43
     		  (#x976f30b4f597b80b (#x5b6bd4558bd96a68 #x567b7f35650aea8f))