Skip to content
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

check if not necessary to sort settings lists #8573

Merged
merged 3 commits into from Mar 2, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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