build-tests: The allowed method is used by default

The allowed method returns true when the feature is set to `enabled`
or `auto`.
The allowed method returns false when the feature is set to
`disabled`.
So we prefer to use the `allowed` method instead of `enabled`.

Change-Id: I1f1bb8bf40c1312d6943e67a81abc58dabfd94cd
Signed-off-by: George Liu <liuxiwei@inspur.com>
diff --git a/meson_options.txt b/meson_options.txt
index c0c3b2b..af933fe 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,3 +1,3 @@
 option ('erase_min_geometry', type : 'integer', min : 0, max : 18446744073709551615, value : 10, description : 'The min size allowed in bytes, used by the geometry check')
 option ('erase_max_geometry', type : 'integer', min : 0, max : 18446744073709551615, value : 5368709120, description : 'the max size allowed in bytes, used by the geometry check')
-option('tests', type: 'feature', description: 'Build tests')
+option('tests', type: 'feature', value: 'enabled', description: 'Build tests')
diff --git a/src/meson.build b/src/meson.build
index e34838c..4383d72 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -56,7 +56,7 @@
 )
 
 build_tests = get_option('tests')
-if not build_tests.disabled()
+if build_tests.allowed()
   subdir('test')
 endif