File tree Expand file tree Collapse file tree 2 files changed +1
-18
lines changed Expand file tree Collapse file tree 2 files changed +1
-18
lines changed Original file line number Diff line number Diff line change @@ -2260,7 +2260,7 @@ ${unsafeOperationComment(x.operator)}
2260
2260
2261
2261
@inline ( __always)
2262
2262
public init< T : BinaryInteger> ( extendingOrTruncating source: T) {
2263
- if Self . bitWidth <= ${ word_bits} || source . bitWidth <= $ { word_bits } {
2263
+ if Self . bitWidth <= ${ word_bits} {
2264
2264
self = Self . init ( _truncatingBits: source. _lowWord)
2265
2265
}
2266
2266
else {
Original file line number Diff line number Diff line change @@ -622,21 +622,4 @@ tests.test("signum/concrete") {
622
622
}
623
623
624
624
625
- dwTests. test( " Words " ) {
626
- expectEqualSequence ( ( 0 as DoubleWidth < Int8 > ) . words, [ 0 ] )
627
- expectEqualSequence ( ( 1 as DoubleWidth < Int8 > ) . words, [ 1 ] )
628
- expectEqualSequence ( ( - 1 as DoubleWidth < Int8 > ) . words, [ UInt . max] )
629
- expectEqualSequence ( ( 256 as DoubleWidth < Int8 > ) . words, [ 256 ] )
630
- expectEqualSequence ( ( - 256 as DoubleWidth < Int8 > ) . words, [ UInt . max - 255 ] )
631
- expectEqualSequence ( DoubleWidth < Int8 > . max. words, [ 32767 ] )
632
- expectEqualSequence ( DoubleWidth < Int8 > . min. words, [ UInt . max - 32767 ] )
633
-
634
- expectEqualSequence ( ( 0 as Int1024 ) . words,
635
- repeatElement ( 0 as UInt , count: 1024 / UInt. bitWidth) )
636
- expectEqualSequence ( ( - 1 as Int1024 ) . words,
637
- repeatElement ( UInt . max, count: 1024 / UInt. bitWidth) )
638
- expectEqualSequence ( ( 1 as Int1024 ) . words,
639
- [ 1 ] + Array( repeating: 0 , count: 1024 / UInt. bitWidth - 1 ) )
640
- }
641
-
642
625
runAllTests( )
You can’t perform that action at this time.
0 commit comments