Skip to content

Commit

Permalink
check if not necessary to sort settings lists (#8573)
Browse files Browse the repository at this point in the history
* check if not necessary to sort settings lists

* try fixing tests

* fixing test
  • Loading branch information
memsharded committed Mar 2, 2021
1 parent 9a173b0 commit 36d0a07
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion conans/model/settings.py
Expand Up @@ -45,7 +45,7 @@ def __init__(self, definition, name):
self._definition = "ANY"
else:
# list or tuple of possible values
self._definition = sorted(str(v) for v in definition)
self._definition = [str(v) for v in definition]

def __contains__(self, value):
return value in (self._value or "")
Expand Down
4 changes: 2 additions & 2 deletions conans/test/functional/generators/cmake_test.py
Expand Up @@ -429,9 +429,9 @@ def build(self):
self.assertIn("comp compile options: one;two;three;four", client.out)
else:
self.assertIn("$<$<CONFIG:Debug>:;>;"
"$<$<CONFIG:MinSizeRel>:;>;"
"$<$<CONFIG:Release>:;one;two;three;four>;"
"$<$<CONFIG:RelWithDebInfo>:;>;"
"$<$<CONFIG:Release>:;one;two;three;four>"
"$<$<CONFIG:MinSizeRel>:;>"
, client.out)
else:
generate_files({"cflags": ["one", "two"], "cxxflags": ["three", "four"]},
Expand Down
2 changes: 1 addition & 1 deletion conans/test/integration/settings/cppstd_test.py
Expand Up @@ -23,7 +23,7 @@ class TestConan(ConanFile):
'-s compiler.version="4.6" -s cppstd=17', assert_error=True)

self.assertIn("The specified 'cppstd=17' is not available for 'gcc 4.6'", client.out)
self.assertIn("Possible values are ['11', '98', 'gnu11', 'gnu98']", client.out)
self.assertIn("Possible values are ['98', 'gnu98', '11', 'gnu11']", client.out)

client.run('create . user/testing -s compiler="gcc" -s compiler.libcxx="libstdc++11" '
'-s compiler.version="6.3" -s cppstd=17')
Expand Down
2 changes: 1 addition & 1 deletion conans/test/unittests/model/settings_test.py
Expand Up @@ -327,7 +327,7 @@ def test_constraint3(self):
with self.assertRaises(ConanException) as cm:
self.sut.constraint(s2)
self.assertEqual(str(cm.exception),
bad_value_msg("os", "Win", ["Linux", "Windows"]))
bad_value_msg("os", "Win", ["Windows", "Linux"]))

def test_constraint4(self):
s2 = {"os": ["Windows"]}
Expand Down

0 comments on commit 36d0a07

Please sign in to comment.