Bug 1773733 - Mark test-only methods as cfg(test); r=nordzilla

Differential Revision: https://phabricator.services.mozilla.com/D159439
This commit is contained in:
Greg Tatum 2022-10-19 21:17:29 +00:00
Родитель 75cddf17e6
Коммит 22a6e7c007
3 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -27,6 +27,8 @@ where
P: Clone,
B: Clone,
{
/// This method is useful for testing various configurations.
#[cfg(feature = "test-fluent")]
pub fn generate_bundles_for_lang(
&self,
langid: LanguageIdentifier,

Просмотреть файл

@ -52,6 +52,8 @@ impl<'a, B> L10nRegistryLocked<'a, B> {
.expect("Index out-of-range")
}
/// Get a [FileSource] by name from a metasource. This is useful for testing.
#[cfg(feature = "test-fluent")]
pub fn file_source_by_name(&self, metasource: usize, name: &str) -> Option<&FileSource> {
self.lock
.get(metasource)
@ -60,6 +62,9 @@ impl<'a, B> L10nRegistryLocked<'a, B> {
.find(|&source| source.name == name)
}
/// Get an iterator for the [FileSources](FileSource) that match the [LanguageIdentifier]
/// and [ResourceId].
#[cfg(feature = "test-fluent")]
pub fn generate_sources_for_file<'l>(
&'l self,
metasource: usize,

Просмотреть файл

@ -59,6 +59,7 @@ where
P: Clone,
B: Clone,
{
#[cfg(feature = "test-fluent")]
pub fn generate_bundles_for_lang_sync(
&self,
langid: LanguageIdentifier,