Skip to content

Commit

Permalink
Merge pull request #11 from hanneskaeufler/hk-crystal-0.27.0
Browse files Browse the repository at this point in the history
Test on newest crystal
  • Loading branch information
hanneskaeufler committed Nov 5, 2018
2 parents 322d684 + 7524de4 commit 6d8811b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
11 changes: 5 additions & 6 deletions .circleci/config.yml
@@ -1,24 +1,23 @@
version: 2

jobs:
test-crystal-0.25.1: &test-template
test-crystal: &test-template
docker:
- image: crystallang/crystal:0.25.1
- image: crystallang/crystal:0.27.0
steps:
- checkout
- run: shards
- run: ./bin/static-analysis
- run: ./bin/code-style
- run: SPEC_VERBOSE=1 ./bin/test
- run: SPEC_VERBOSE=1 ./bin/test-coverage
test-crystal-0.26.1:
test-crystal-0.27.0:
<<: *test-template
docker:
- image: crystallang/crystal:0.26.1
- image: crystallang/crystal:0.27.0

workflows:
version: 2
ci:
jobs:
- test-crystal-0.25.1
- test-crystal-0.26.1
- test-crystal-0.27.0
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed
- NumberLiteralChange mutant now outputs 0 (for everything != 0) and 1 (for 0)
- Depending on crystal 0.27.0, dropping all previous versions

## [1.2.0] - 2018-10-29

Expand Down
3 changes: 2 additions & 1 deletion shard.yml
Expand Up @@ -19,4 +19,5 @@ development_dependencies:
ameba:
github: veelenga/ameba
coverage:
github: anykeyh/crystal-coverage
github: hanneskaeufler/crystal-coverage
branch: patch-1
4 changes: 2 additions & 2 deletions src/crytic/diff.cr
Expand Up @@ -176,8 +176,8 @@ module Crytic

chunks.each_with_index do |cur, i|
next if cur.no_change?
prv = i > 0 ? chunks.at(i - 1) : Chunk.new(diff, Type::NO_CHANGE, 0...0, 0...0)
nxt = chunks.at(i + 1) { Chunk.new(diff, Type::NO_CHANGE, a.size...a.size, b.size...b.size) }
prv = i > 0 ? chunks[i - 1] : Chunk.new(diff, Type::NO_CHANGE, 0...0, 0...0)
nxt = chunks.fetch(i + 1) { Chunk.new(diff, Type::NO_CHANGE, a.size...a.size, b.size...b.size) }

if group.empty? && prv.no_change?
start_a = {prv.range_a.end - n, 0}.max
Expand Down
3 changes: 1 addition & 2 deletions src/crytic/mutation/mutation.cr
Expand Up @@ -6,7 +6,6 @@ require "../source"
require "./inject_mutated_subject_into_specs"
require "./result"
require "compiler/crystal/syntax/*"
require "tempfile"

module Crytic::Mutation
# Represents a single mutation to a single source file
Expand Down Expand Up @@ -52,7 +51,7 @@ module Crytic::Mutation
@process_runner = ProcessProcessRunner.new
@file_remover = ->File.delete(String)
@tempfile_writer = ->(name : String, extension : String, content : String) {
Tempfile.open(name, extension) { |file| file.print(content) }.path
File.tempfile(name, extension) { |file| file.print(content) }.path
}
end

Expand Down

0 comments on commit 6d8811b

Please sign in to comment.