Skip to content

Hk crystal bump #91

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ version: 2
jobs:
test-crystal: &test-template
docker:
- image: crystallang/crystal:1.3.2
- image: crystallang/crystal:1.4.0
steps:
- checkout
test-crystal-1.3.2:
test-crystal-1.4.0:
<<: *test-template
steps:
- checkout
Expand All @@ -29,7 +29,7 @@ workflows:
version: 2
ci:
jobs:
- test-crystal-1.3.2
- test-crystal-1.4.0
nightly:
triggers:
- schedule:
Expand All @@ -38,4 +38,4 @@ workflows:
branches:
only: master
jobs:
- test-crystal-1.3.2
- test-crystal-1.4.0
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Support for crystal `1.2.2`
- Support for crystal `1.4.0`. Fixed a bug where the `NumberLiteralSignFlip` mutant would apply to unsigned integers

## [8.0.0] - 2021-09-03

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SHARDS_BIN ?= $(shell which shards)
SHARD_BIN ?= ../../bin
CRYSTAL_VERSION ?= 1.3.2
CRYSTAL_VERSION ?= 1.4.0

build: bin/crytic
bin/crytic:
Expand Down
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ scripts:
development_dependencies:
ameba:
github: veelenga/ameba
version: ~> 0.13
version: ~> 1.0
2 changes: 1 addition & 1 deletion spec/mutant/number_literal_sign_flip_possibilities_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module Crytic
end

it "doesn't consider unsigned integer types" do
ast = ast_from("1_u8; 1_u16; 1_u32; 1_u64;")
ast = ast_from("1_u8; 1_u16; 1_u32; 1_u64; 1_u128;")
possibilities = Mutant::NumberLiteralSignFlipPossibilities.new
ast.accept(possibilities)
possibilities.empty?.should be_true
Expand Down
8 changes: 1 addition & 7 deletions src/crytic/mutant/number_literal_sign_flip_possibilities.cr
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,7 @@ module Crytic::Mutant
end

private def is_unsigned_type(node)
node.kind
case node.kind
when :u8, :u16, :u32, :u64
true
else
false
end
node.kind.to_s.starts_with?("u")
end
end
end